diff --git a/awsproviderlint/go.mod b/awsproviderlint/go.mod index 2884ab8eaf0..809ebc79643 100644 --- a/awsproviderlint/go.mod +++ b/awsproviderlint/go.mod @@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-aws/awsproviderlint go 1.15 require ( - github.com/aws/aws-sdk-go v1.34.33 + github.com/aws/aws-sdk-go v1.35.2 github.com/bflad/tfproviderlint v0.18.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.0 golang.org/x/tools v0.0.0-20200928201943-a0ef9b62deab diff --git a/awsproviderlint/go.sum b/awsproviderlint/go.sum index c416e656503..ecce724cdb1 100644 --- a/awsproviderlint/go.sum +++ b/awsproviderlint/go.sum @@ -49,8 +49,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.34.33 h1:ymkFm0rNPEOlgjyX3ojEd4zqzW6kGICBkqWs7LqgHtU= -github.com/aws/aws-sdk-go v1.34.33/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/aws/aws-sdk-go v1.35.2 h1:qK+noh6b9KW+5CP1NmmWsQCUbnzucSGrjHEs69MEl6A= +github.com/aws/aws-sdk-go v1.35.2/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/bflad/gopaniccheck v0.1.0 h1:tJftp+bv42ouERmUMWLoUn/5bi/iQZjHPznM00cP/bU= github.com/bflad/gopaniccheck v0.1.0/go.mod h1:ZCj2vSr7EqVeDaqVsWN4n2MwdROx1YL+LFo47TSWtsA= github.com/bflad/tfproviderlint v0.18.0 h1:E4EWq051fp2zjxdUj9x6gNG27AcdyRkxip5XP03N840= diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 5dc078b1c67..8a2c56945f6 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -3127,6 +3127,9 @@ var awsPartition = partition{ "identitystore": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -4038,6 +4041,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -5553,6 +5557,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -6582,9 +6587,21 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "workspaces-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "workspaces-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "xray": service{ @@ -7050,6 +7067,23 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "iotevents": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, + "ioteventsdata": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{ + Hostname: "data.iotevents.cn-north-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + }, + }, "iotsecuredtunneling": service{ Endpoints: endpoints{ @@ -7176,6 +7210,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "resource-groups": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "route53": service{ PartitionEndpoint: "aws-cn-global", IsRegionalized: boxedFalse, @@ -8452,6 +8493,12 @@ var awsusgovPartition = partition{ }, }, Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "pinpoint.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-west-1": endpoint{}, }, }, @@ -8951,6 +8998,25 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "transfer": service{ + + Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "transfer-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "transfer-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "translate": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -8985,6 +9051,12 @@ var awsusgovPartition = partition{ "workspaces": service{ Endpoints: endpoints{ + "fips-us-gov-west-1": endpoint{ + Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-west-1": endpoint{}, }, }, diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/version.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/version.go index c5cee5fa87a..868d36f1e01 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.34.33" +const SDKVersion = "1.35.2" diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/internal/arn/accesspoint_arn.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go similarity index 54% rename from awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/internal/arn/accesspoint_arn.go rename to awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go index 2f93f96fd50..bf18031a38e 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/internal/arn/accesspoint_arn.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go @@ -19,23 +19,28 @@ func (a AccessPointARN) GetARN() arn.ARN { // ParseAccessPointResource attempts to parse the ARN's resource as an // AccessPoint resource. +// +// 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 +// func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error) { if len(a.Region) == 0 { - return AccessPointARN{}, InvalidARNError{a, "region not set"} + return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "region not set"} } if len(a.AccountID) == 0 { - return AccessPointARN{}, InvalidARNError{a, "account-id not set"} + return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "account-id not set"} } if len(resParts) == 0 { - return AccessPointARN{}, InvalidARNError{a, "resource-id not set"} + return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "resource-id not set"} } if len(resParts) > 1 { - return AccessPointARN{}, InvalidARNError{a, "sub resource not supported"} + return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "sub resource not supported"} } resID := resParts[0] if len(strings.TrimSpace(resID)) == 0 { - return AccessPointARN{}, InvalidARNError{a, "resource-id not set"} + return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "resource-id not set"} } return AccessPointARN{ diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/internal/arn/arn.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go similarity index 75% rename from awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/internal/arn/arn.go rename to awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go index a942d887f7a..7a8e46fbdae 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/internal/arn/arn.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go @@ -1,6 +1,7 @@ package arn import ( + "fmt" "strings" "github.com/aws/aws-sdk-go/aws/arn" @@ -25,13 +26,14 @@ func ParseResource(s string, resParser ResourceParser) (resARN Resource, err err } if len(a.Partition) == 0 { - return nil, InvalidARNError{a, "partition not set"} + return nil, InvalidARNError{ARN: a, Reason: "partition not set"} } - if a.Service != "s3" { - return nil, InvalidARNError{a, "service is not S3"} + + if a.Service != "s3" && a.Service != "s3-outposts" { + return nil, InvalidARNError{ARN: a, Reason: "service is not supported"} } if len(a.Resource) == 0 { - return nil, InvalidARNError{a, "resource not set"} + return nil, InvalidARNError{ARN: a, Reason: "resource not set"} } return resParser(a) @@ -66,6 +68,7 @@ type InvalidARNError struct { Reason string } +// Error returns a string denoting the occurred InvalidARNError func (e InvalidARNError) Error() string { - return "invalid Amazon S3 ARN, " + e.Reason + ", " + e.ARN.String() + return fmt.Sprintf("invalid Amazon %s ARN, %s, %s", e.ARN.Service, e.Reason, e.ARN.String()) } diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go new file mode 100644 index 00000000000..1e10f8de00b --- /dev/null +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go @@ -0,0 +1,126 @@ +package arn + +import ( + "strings" + + "github.com/aws/aws-sdk-go/aws/arn" +) + +// OutpostARN interface that should be satisfied by outpost ARNs +type OutpostARN interface { + Resource + GetOutpostID() string +} + +// ParseOutpostARNResource will parse a provided ARNs resource using the appropriate ARN format +// and return a specific OutpostARN type +// +// Currently supported outpost ARN formats: +// * 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 +// +// * Outpost Bucket ARN format: +// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName} +// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket +// +// Other outpost ARN formats may be supported and added in the future. +// +func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error) { + if len(a.Region) == 0 { + return nil, InvalidARNError{ARN: a, Reason: "region not set"} + } + + if len(a.AccountID) == 0 { + return nil, InvalidARNError{ARN: a, Reason: "account-id not set"} + } + + // verify if outpost id is present and valid + if len(resParts) == 0 || len(strings.TrimSpace(resParts[0])) == 0 { + return nil, InvalidARNError{ARN: a, Reason: "outpost resource-id not set"} + } + + // verify possible resource type exists + if len(resParts) < 3 { + return nil, InvalidARNError{ + ARN: a, Reason: "incomplete outpost resource type. Expected bucket or access-point resource to be present", + } + } + + // Since we know this is a OutpostARN fetch outpostID + outpostID := strings.TrimSpace(resParts[0]) + + switch resParts[1] { + case "accesspoint": + accesspointARN, err := ParseAccessPointResource(a, resParts[2:]) + if err != nil { + return OutpostAccessPointARN{}, err + } + return OutpostAccessPointARN{ + AccessPointARN: accesspointARN, + OutpostID: outpostID, + }, nil + + case "bucket": + bucketName, err := parseBucketResource(a, resParts[2:]) + if err != nil { + return nil, err + } + return OutpostBucketARN{ + ARN: a, + BucketName: bucketName, + OutpostID: outpostID, + }, nil + + default: + return nil, InvalidARNError{ARN: a, Reason: "unknown resource set for outpost ARN"} + } +} + +// OutpostAccessPointARN represents outpost access point ARN. +type OutpostAccessPointARN struct { + AccessPointARN + OutpostID string +} + +// GetOutpostID returns the outpost id of outpost access point arn +func (o OutpostAccessPointARN) GetOutpostID() string { + return o.OutpostID +} + +// OutpostBucketARN represents the outpost bucket ARN. +type OutpostBucketARN struct { + arn.ARN + BucketName string + OutpostID string +} + +// GetOutpostID returns the outpost id of outpost bucket arn +func (o OutpostBucketARN) GetOutpostID() string { + return o.OutpostID +} + +// GetARN retrives the base ARN from outpost bucket ARN resource +func (o OutpostBucketARN) GetARN() arn.ARN { + return o.ARN +} + +// parseBucketResource attempts to parse the ARN's bucket resource and retrieve the +// bucket resource id. +// +// parseBucketResource only parses the bucket resource id. +// +func parseBucketResource(a arn.ARN, resParts []string) (bucketName string, err error) { + if len(resParts) == 0 { + return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"} + } + if len(resParts) > 1 { + return bucketName, InvalidARNError{ARN: a, Reason: "sub resource not supported"} + } + + bucketName = strings.TrimSpace(resParts[0]) + if len(bucketName) == 0 { + return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"} + } + return bucketName, err +} diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go new file mode 100644 index 00000000000..e756b2f8733 --- /dev/null +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go @@ -0,0 +1,189 @@ +package s3shared + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/internal/s3shared/arn" +) + +const ( + invalidARNErrorErrCode = "InvalidARNError" + configurationErrorErrCode = "ConfigurationError" +) + +// InvalidARNError denotes the error for Invalid ARN +type InvalidARNError struct { + message string + resource arn.Resource + origErr error +} + +// Error returns the InvalidARNError +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) +} + +// 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 +} + +// OrigErr is the original error wrapped by Invalid ARN Error +func (e InvalidARNError) OrigErr() error { + return e.origErr +} + +// NewInvalidARNError denotes invalid arn error +func NewInvalidARNError(resource arn.Resource, err error) InvalidARNError { + return InvalidARNError{ + message: "invalid ARN", + origErr: err, + resource: resource, + } +} + +// 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{ + message: "resource ARN not supported for the target ARN partition", + origErr: err, + resource: resource, + } +} + +// NewInvalidARNWithFIPSError ARN not supported for FIPS region +func NewInvalidARNWithFIPSError(resource arn.Resource, err error) InvalidARNError { + return InvalidARNError{ + message: "resource ARN not supported for FIPS region", + resource: resource, + origErr: err, + } +} + +// ConfigurationError is used to denote a client configuration error +type ConfigurationError struct { + message string + resource arn.Resource + clientPartitionID string + clientRegion string + origErr error +} + +// Error returns the Configuration error string +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 +} + +// OrigErr is the original error wrapped by Configuration Error +func (e ConfigurationError) OrigErr() error { + return e.origErr +} + +// NewClientPartitionMismatchError stub +func NewClientPartitionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { + return ConfigurationError{ + message: "client partition does not match provided ARN partition", + origErr: err, + resource: resource, + clientPartitionID: clientPartitionID, + clientRegion: clientRegion, + } +} + +// NewClientRegionMismatchError denotes cross region access error +func NewClientRegionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { + return ConfigurationError{ + message: "client region does not match provided ARN region", + origErr: err, + resource: resource, + clientPartitionID: clientPartitionID, + clientRegion: clientRegion, + } +} + +// NewFailedToResolveEndpointError denotes endpoint resolving error +func NewFailedToResolveEndpointError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { + return ConfigurationError{ + message: "endpoint resolver failed to find an endpoint for the provided ARN region", + origErr: err, + resource: resource, + clientPartitionID: clientPartitionID, + clientRegion: clientRegion, + } +} + +// NewClientConfiguredForFIPSError denotes client config error for unsupported cross region FIPS access +func NewClientConfiguredForFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { + return ConfigurationError{ + message: "client configured for fips but cross-region resource ARN provided", + origErr: err, + resource: resource, + clientPartitionID: clientPartitionID, + clientRegion: clientRegion, + } +} + +// NewClientConfiguredForAccelerateError denotes client config error for unsupported S3 accelerate +func NewClientConfiguredForAccelerateError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { + return ConfigurationError{ + message: "client configured for S3 Accelerate but is not supported with resource ARN", + origErr: err, + resource: resource, + clientPartitionID: clientPartitionID, + clientRegion: clientRegion, + } +} + +// NewClientConfiguredForCrossRegionFIPSError denotes client config error for unsupported cross region FIPS request +func NewClientConfiguredForCrossRegionFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { + return ConfigurationError{ + message: "client configured for FIPS with cross-region enabled but is supported with cross-region resource ARN", + origErr: err, + resource: resource, + clientPartitionID: clientPartitionID, + clientRegion: clientRegion, + } +} + +// NewClientConfiguredForDualStackError denotes client config error for unsupported S3 Dual-stack +func NewClientConfiguredForDualStackError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { + return ConfigurationError{ + message: "client configured for S3 Dual-stack but is not supported with resource ARN", + origErr: err, + resource: resource, + clientPartitionID: clientPartitionID, + clientRegion: clientRegion, + } +} diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go new file mode 100644 index 00000000000..9f70a64ecff --- /dev/null +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go @@ -0,0 +1,62 @@ +package s3shared + +import ( + "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/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) +} + +// UseFIPS returns true if request config region is FIPS +func (r ResourceRequest) UseFIPS() bool { + return IsFIPS(aws.StringValue(r.Request.Config.Region)) +} + +// ResourceConfiguredForFIPS returns true if resource ARNs region is FIPS +func (r ResourceRequest) ResourceConfiguredForFIPS() bool { + return IsFIPS(r.ARN().Region) +} + +// 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 +} + +// IsFIPS returns true if region is a fips region +func IsFIPS(clientRegion string) bool { + return strings.HasPrefix(clientRegion, "fips-") || strings.HasSuffix(clientRegion, "-fips") +} + +// 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/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go similarity index 100% rename from awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go rename to awsproviderlint/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 2ccad45a71c..62e4783a590 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -14,13 +14,13 @@ import ( "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/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" - "github.com/aws/aws-sdk-go/service/s3/internal/arn" ) const opAbortMultipartUpload = "AbortMultipartUpload" @@ -530,20 +530,23 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request // CreateBucket API operation for Amazon Simple Storage Service. // -// Creates a new bucket. To create a bucket, you must register with Amazon S3 -// and have a valid AWS Access Key ID to authenticate requests. Anonymous requests -// are never allowed to create buckets. By creating the bucket, you become the -// bucket owner. +// Creates a new S3 bucket. To create a bucket, you must register with Amazon +// S3 and have a valid AWS Access Key ID to authenticate requests. Anonymous +// requests are never allowed to create buckets. By creating the bucket, you +// become the bucket owner. // -// Not every string is an acceptable bucket name. For information on bucket -// naming restrictions, see Working with Amazon S3 Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html). +// Not every string is an acceptable bucket name. For information about bucket +// naming restrictions, see Working with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.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 -// How to Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro). +// 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 @@ -551,7 +554,7 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request // 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). +// 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. @@ -566,7 +569,7 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request // * 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 +// 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 @@ -602,7 +605,7 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request // Returned Error Codes: // * ErrCodeBucketAlreadyExists "BucketAlreadyExists" // 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. +// 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 @@ -900,7 +903,7 @@ func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request // DeleteBucket API operation for Amazon Simple Storage Service. // -// Deletes the bucket. All objects (including all object versions and delete +// 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 @@ -1493,6 +1496,92 @@ func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input 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 @@ -2960,8 +3049,8 @@ func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleCon // an object key name prefix, one or more object tags, or a combination of both. // Accordingly, this section describes the latest API. The response describes // the new filter element that you can use to specify a filter to select a subset -// of objects to which the rule applies. If you are still using previous version -// of the lifecycle configuration, it works. For the earlier API description, +// of objects to which the rule applies. If you are using a previous version +// of the lifecycle configuration, it still works. For the earlier API description, // see GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html). // // Returns the lifecycle configuration information set on the bucket. For information @@ -3447,6 +3536,91 @@ func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, inpu 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/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 +// +// Returns awserr.Error for service API and SDK errors. Use runtime 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 @@ -4324,6 +4498,8 @@ func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request // 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. @@ -4417,6 +4593,8 @@ func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *req // 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. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4569,6 +4747,8 @@ func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *req // 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. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -4733,16 +4913,18 @@ func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request // GetObjectTorrent API operation for Amazon Simple Storage Service. // -// Return torrent files from a bucket. BitTorrent can save you bandwidth when +// Returns torrent files from a bucket. BitTorrent can save you bandwidth when // you're distributing large files. For more information about BitTorrent, see -// Amazon S3 Torrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html). +// 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 customer-provided +// 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 operation is related to GetObjectTorrent: // // * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) @@ -5687,15 +5869,17 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req // ListObjectVersions API operation for Amazon Simple Storage Service. // -// Returns metadata about all of the versions of objects in a bucket. You can -// also use request parameters as selection criteria to return metadata about -// a subset of all the object versions. +// 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. // // 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) @@ -7720,6 +7904,93 @@ func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, inpu 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) + 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: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: +// +// * 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 @@ -8507,10 +8778,11 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp // // Storage Class Options // -// By default, Amazon S3 uses the STANDARD storage class to store newly created +// By default, Amazon S3 uses the STANDARD Storage Class to store newly created // objects. The STANDARD storage class provides high durability and high availability. -// Depending on performance needs, you can specify a different storage class. -// For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) +// 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 Service Developer Guide. // // Versioning @@ -8609,11 +8881,13 @@ func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request // PutObjectAcl API operation for Amazon Simple Storage Service. // // Uses the acl subresource to set the access control list (ACL) permissions -// for an object that already exists in 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) +// 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 Simple Storage Service Developer 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 @@ -8776,6 +9050,8 @@ func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *req // // Applies a Legal Hold configuration to the specified object. // +// This action is not supported by Amazon S3 on Outposts. +// // Related Resources // // * Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) @@ -8945,6 +9221,8 @@ func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *req // // Places an Object Retention configuration on an object. // +// This action is not supported by Amazon S3 on Outposts. +// // Related Resources // // * Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) @@ -9240,7 +9518,9 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque // // Restores an archived copy of an object back into Amazon S3 // -// This operation performs the following types of requests: +// 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 // @@ -9520,6 +9800,8 @@ func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *r // 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 Simple Storage Service Developer Guide. @@ -9864,6 +10146,11 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou // 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 AWS 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 +// (AWS 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 @@ -10149,11 +10436,19 @@ type AbortMultipartUploadInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -10266,6 +10561,17 @@ func (s *AbortMultipartUploadInput) hasEndpointARN() bool { 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. +func (s *AbortMultipartUploadInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type AbortMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -11392,10 +11698,36 @@ func (s *CompleteMultipartUploadInput) hasEndpointARN() bool { 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. +func (s *CompleteMultipartUploadInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type CompleteMultipartUploadOutput struct { _ struct{} `type:"structure"` // The name of the bucket that contains the newly created object. + // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. Bucket *string `type:"string"` // Entity tag that identifies the newly created object's data. Objects with @@ -11648,10 +11980,27 @@ 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 API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -11690,7 +12039,12 @@ type CopyObjectInput struct { // 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 AWS Region. + // same AWS 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). @@ -11741,15 +12095,23 @@ type CopyObjectInput struct { 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. @@ -11813,7 +12175,12 @@ type CopyObjectInput struct { // S3 (for example, AES256, aws:kms). ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - // The type of storage to use for the object. Defaults to 'STANDARD'. + // 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 Service Developer 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 @@ -12135,6 +12502,17 @@ func (s *CopyObjectInput) hasEndpointARN() bool { 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. +func (s *CopyObjectInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type CopyObjectOutput struct { _ struct{} `type:"structure" payload:"CopyObjectResult"` @@ -12492,10 +12870,27 @@ 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 API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -12525,15 +12920,23 @@ type CreateMultipartUploadInput struct { 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. @@ -12593,7 +12996,12 @@ type CreateMultipartUploadInput struct { // S3 (for example, AES256, aws:kms). ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - // The type of storage to use for the object. Defaults to 'STANDARD'. + // 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 Service Developer 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. @@ -12833,6 +13241,17 @@ func (s *CreateMultipartUploadInput) hasEndpointARN() bool { 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. +func (s *CreateMultipartUploadInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type CreateMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -12852,14 +13271,22 @@ type CreateMultipartUploadOutput struct { // incomplete multipart uploads. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"` - // Name of the bucket to which the multipart upload was initiated. + // The name of the bucket to which the multipart upload was initiated. // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. Bucket *string `locationName:"Bucket" type:"string"` // Object key for which the multipart upload was initiated. @@ -13170,6 +13597,17 @@ func (s *DeleteBucketAnalyticsConfigurationInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketAnalyticsConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketAnalyticsConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -13257,6 +13695,17 @@ func (s *DeleteBucketCorsInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketCorsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketCorsOutput struct { _ struct{} `type:"structure"` } @@ -13345,10 +13794,21 @@ func (s *DeleteBucketEncryptionInput) hasEndpointARN() bool { return arn.IsARN(*s.Bucket) } -type DeleteBucketEncryptionOutput struct { - _ struct{} `type:"structure"` -} - +// 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. +func (s *DeleteBucketEncryptionInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + +type DeleteBucketEncryptionOutput struct { + _ struct{} `type:"structure"` +} + // String returns the string representation func (s DeleteBucketEncryptionOutput) String() string { return awsutil.Prettify(s) @@ -13432,6 +13892,17 @@ func (s *DeleteBucketInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketInventoryConfigurationInput struct { _ struct{} `locationName:"DeleteBucketInventoryConfigurationRequest" type:"structure"` @@ -13519,6 +13990,17 @@ func (s *DeleteBucketInventoryConfigurationInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketInventoryConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketInventoryConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -13606,6 +14088,17 @@ func (s *DeleteBucketLifecycleInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketLifecycleInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketLifecycleOutput struct { _ struct{} `type:"structure"` } @@ -13707,6 +14200,17 @@ func (s *DeleteBucketMetricsConfigurationInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketMetricsConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketMetricsConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -13735,6 +14239,101 @@ 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"` + + ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` +} + +// String returns the string representation +func (s DeleteBucketOwnershipControlsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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. +func (s *DeleteBucketOwnershipControlsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + +type DeleteBucketOwnershipControlsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBucketOwnershipControlsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBucketOwnershipControlsOutput) GoString() string { + return s.String() +} + type DeleteBucketPolicyInput struct { _ struct{} `locationName:"DeleteBucketPolicyRequest" type:"structure"` @@ -13808,6 +14407,17 @@ func (s *DeleteBucketPolicyInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketPolicyInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketPolicyOutput struct { _ struct{} `type:"structure"` } @@ -13895,6 +14505,17 @@ func (s *DeleteBucketReplicationInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketReplicationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketReplicationOutput struct { _ struct{} `type:"structure"` } @@ -13982,6 +14603,17 @@ func (s *DeleteBucketTaggingInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketTaggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketTaggingOutput struct { _ struct{} `type:"structure"` } @@ -14069,6 +14701,17 @@ func (s *DeleteBucketWebsiteInput) hasEndpointARN() bool { 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. +func (s *DeleteBucketWebsiteInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteBucketWebsiteOutput struct { _ struct{} `type:"structure"` } @@ -14188,11 +14831,19 @@ type DeleteObjectInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -14322,6 +14973,17 @@ func (s *DeleteObjectInput) hasEndpointARN() bool { 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. +func (s *DeleteObjectInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteObjectOutput struct { _ struct{} `type:"structure"` @@ -14373,11 +15035,19 @@ type DeleteObjectTaggingInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -14472,6 +15142,17 @@ func (s *DeleteObjectTaggingInput) hasEndpointARN() bool { 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. +func (s *DeleteObjectTaggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteObjectTaggingOutput struct { _ struct{} `type:"structure"` @@ -14502,11 +15183,19 @@ type DeleteObjectsInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -14630,6 +15319,17 @@ func (s *DeleteObjectsInput) hasEndpointARN() bool { 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. +func (s *DeleteObjectsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeleteObjectsOutput struct { _ struct{} `type:"structure"` @@ -14747,6 +15447,17 @@ func (s *DeletePublicAccessBlockInput) hasEndpointARN() bool { 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. +func (s *DeletePublicAccessBlockInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type DeletePublicAccessBlockOutput struct { _ struct{} `type:"structure"` } @@ -15610,7 +16321,7 @@ func (s *FilterRule) SetValue(v string) *FilterRule { type GetBucketAccelerateConfigurationInput struct { _ struct{} `locationName:"GetBucketAccelerateConfigurationRequest" type:"structure"` - // Name of the bucket for which the accelerate configuration is retrieved. + // 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"` @@ -15680,6 +16391,17 @@ func (s *GetBucketAccelerateConfigurationInput) hasEndpointARN() bool { 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. +func (s *GetBucketAccelerateConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketAccelerateConfigurationOutput struct { _ struct{} `type:"structure"` @@ -15776,6 +16498,17 @@ func (s *GetBucketAclInput) hasEndpointARN() bool { 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. +func (s *GetBucketAclInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketAclOutput struct { _ struct{} `type:"structure"` @@ -15895,6 +16628,17 @@ func (s *GetBucketAnalyticsConfigurationInput) hasEndpointARN() bool { 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. +func (s *GetBucketAnalyticsConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketAnalyticsConfigurationOutput struct { _ struct{} `type:"structure" payload:"AnalyticsConfiguration"` @@ -15991,6 +16735,17 @@ func (s *GetBucketCorsInput) hasEndpointARN() bool { 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. +func (s *GetBucketCorsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketCorsOutput struct { _ struct{} `type:"structure"` @@ -16089,6 +16844,17 @@ func (s *GetBucketEncryptionInput) hasEndpointARN() bool { 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. +func (s *GetBucketEncryptionInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketEncryptionOutput struct { _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"` @@ -16199,6 +16965,17 @@ func (s *GetBucketInventoryConfigurationInput) hasEndpointARN() bool { 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. +func (s *GetBucketInventoryConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketInventoryConfigurationOutput struct { _ struct{} `type:"structure" payload:"InventoryConfiguration"` @@ -16295,6 +17072,17 @@ func (s *GetBucketLifecycleConfigurationInput) hasEndpointARN() bool { 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. +func (s *GetBucketLifecycleConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketLifecycleConfigurationOutput struct { _ struct{} `type:"structure"` @@ -16391,6 +17179,17 @@ func (s *GetBucketLifecycleInput) hasEndpointARN() bool { 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. +func (s *GetBucketLifecycleInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketLifecycleOutput struct { _ struct{} `type:"structure"` @@ -16487,6 +17286,17 @@ func (s *GetBucketLocationInput) hasEndpointARN() bool { 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. +func (s *GetBucketLocationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketLocationOutput struct { _ struct{} `type:"structure"` @@ -16585,6 +17395,17 @@ func (s *GetBucketLoggingInput) hasEndpointARN() bool { 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. +func (s *GetBucketLoggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketLoggingOutput struct { _ struct{} `type:"structure"` @@ -16698,6 +17519,17 @@ func (s *GetBucketMetricsConfigurationInput) hasEndpointARN() bool { 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. +func (s *GetBucketMetricsConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketMetricsConfigurationOutput struct { _ struct{} `type:"structure" payload:"MetricsConfiguration"` @@ -16724,7 +17556,7 @@ func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *Metrics type GetBucketNotificationConfigurationRequest struct { _ struct{} `locationName:"GetBucketNotificationConfigurationRequest" type:"structure"` - // Name of the bucket for which to get the notification configuration. + // 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"` @@ -16794,6 +17626,122 @@ func (s *GetBucketNotificationConfigurationRequest) hasEndpointARN() bool { 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. +func (s *GetBucketNotificationConfigurationRequest) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return 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"` + + ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` +} + +// String returns the string representation +func (s GetBucketOwnershipControlsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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. +func (s *GetBucketOwnershipControlsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + +type GetBucketOwnershipControlsOutput struct { + _ struct{} `type:"structure" payload:"OwnershipControls"` + + // The OwnershipControls (BucketOwnerPreferred or ObjectWriter) currently in + // effect for this Amazon S3 bucket. + OwnershipControls *OwnershipControls `type:"structure"` +} + +// String returns the string representation +func (s GetBucketOwnershipControlsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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"` @@ -16867,6 +17815,17 @@ func (s *GetBucketPolicyInput) hasEndpointARN() bool { 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. +func (s *GetBucketPolicyInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketPolicyOutput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -16963,6 +17922,17 @@ func (s *GetBucketPolicyStatusInput) hasEndpointARN() bool { 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. +func (s *GetBucketPolicyStatusInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketPolicyStatusOutput struct { _ struct{} `type:"structure" payload:"PolicyStatus"` @@ -17059,6 +18029,17 @@ func (s *GetBucketReplicationInput) hasEndpointARN() bool { 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. +func (s *GetBucketReplicationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketReplicationOutput struct { _ struct{} `type:"structure" payload:"ReplicationConfiguration"` @@ -17156,6 +18137,17 @@ func (s *GetBucketRequestPaymentInput) hasEndpointARN() bool { 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. +func (s *GetBucketRequestPaymentInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketRequestPaymentOutput struct { _ struct{} `type:"structure"` @@ -17247,9 +18239,20 @@ func (s *GetBucketTaggingInput) getEndpointARN() (arn.Resource, error) { func (s *GetBucketTaggingInput) hasEndpointARN() bool { if s.Bucket == nil { - return false + 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. +func (s *GetBucketTaggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") } - return arn.IsARN(*s.Bucket) + s.Bucket = aws.String(v) + return nil } type GetBucketTaggingOutput struct { @@ -17350,6 +18353,17 @@ func (s *GetBucketVersioningInput) hasEndpointARN() bool { 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. +func (s *GetBucketVersioningInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketVersioningOutput struct { _ struct{} `type:"structure"` @@ -17457,6 +18471,17 @@ func (s *GetBucketWebsiteInput) hasEndpointARN() bool { 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. +func (s *GetBucketWebsiteInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetBucketWebsiteOutput struct { _ struct{} `type:"structure"` @@ -17515,7 +18540,7 @@ type GetObjectAclInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. @@ -17627,6 +18652,17 @@ func (s *GetObjectAclInput) hasEndpointARN() bool { 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. +func (s *GetObjectAclInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetObjectAclOutput struct { _ struct{} `type:"structure"` @@ -17676,11 +18712,19 @@ type GetObjectInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -17947,6 +18991,17 @@ func (s *GetObjectInput) hasEndpointARN() bool { 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. +func (s *GetObjectInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetObjectLegalHoldInput struct { _ struct{} `locationName:"GetObjectLegalHoldRequest" type:"structure"` @@ -17955,7 +19010,7 @@ type GetObjectLegalHoldInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. @@ -18067,6 +19122,17 @@ func (s *GetObjectLegalHoldInput) hasEndpointARN() bool { 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. +func (s *GetObjectLegalHoldInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetObjectLegalHoldOutput struct { _ struct{} `type:"structure" payload:"LegalHold"` @@ -18095,6 +19161,13 @@ type GetObjectLockConfigurationInput struct { // The bucket whose Object Lock configuration you want to retrieve. // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -18163,6 +19236,17 @@ func (s *GetObjectLockConfigurationInput) hasEndpointARN() bool { 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. +func (s *GetObjectLockConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetObjectLockConfigurationOutput struct { _ struct{} `type:"structure" payload:"ObjectLockConfiguration"` @@ -18515,7 +19599,7 @@ type GetObjectRetentionInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. @@ -18627,6 +19711,17 @@ func (s *GetObjectRetentionInput) hasEndpointARN() bool { 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. +func (s *GetObjectRetentionInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetObjectRetentionOutput struct { _ struct{} `type:"structure" payload:"Retention"` @@ -18657,11 +19752,19 @@ type GetObjectTaggingInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -18756,6 +19859,17 @@ func (s *GetObjectTaggingInput) hasEndpointARN() bool { 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. +func (s *GetObjectTaggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetObjectTaggingOutput struct { _ struct{} `type:"structure"` @@ -18894,6 +20008,17 @@ func (s *GetObjectTorrentInput) hasEndpointARN() bool { 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. +func (s *GetObjectTorrentInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetObjectTorrentOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -19001,6 +20126,17 @@ func (s *GetPublicAccessBlockInput) hasEndpointARN() bool { 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. +func (s *GetPublicAccessBlockInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type GetPublicAccessBlockOutput struct { _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` @@ -19215,6 +20351,21 @@ type HeadBucketInput struct { // The bucket name. // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -19283,6 +20434,17 @@ func (s *HeadBucketInput) hasEndpointARN() bool { 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. +func (s *HeadBucketInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type HeadBucketOutput struct { _ struct{} `type:"structure"` } @@ -19302,6 +20464,21 @@ type HeadObjectInput struct { // The name of the bucket containing the object. // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -19338,7 +20515,8 @@ type HeadObjectInput struct { PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"` // Downloads the specified range bytes of an object. For more information about - // the HTTP Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. + // the HTTP Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 + // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35). // // Amazon S3 doesn't support retrieving multiple ranges of data per GET request. Range *string `location:"header" locationName:"Range" type:"string"` @@ -19514,6 +20692,17 @@ func (s *HeadObjectInput) hasEndpointARN() bool { 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. +func (s *HeadObjectInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type HeadObjectOutput struct { _ struct{} `type:"structure"` @@ -20974,6 +22163,17 @@ func (s *ListBucketAnalyticsConfigurationsInput) hasEndpointARN() bool { 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. +func (s *ListBucketAnalyticsConfigurationsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListBucketAnalyticsConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -21114,6 +22314,17 @@ func (s *ListBucketInventoryConfigurationsInput) hasEndpointARN() bool { 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. +func (s *ListBucketInventoryConfigurationsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListBucketInventoryConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -21254,6 +22465,17 @@ func (s *ListBucketMetricsConfigurationsInput) hasEndpointARN() bool { 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. +func (s *ListBucketMetricsConfigurationsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListBucketMetricsConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -21359,15 +22581,23 @@ func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput { type ListMultipartUploadsInput struct { _ struct{} `locationName:"ListMultipartUploadsRequest" type:"structure"` - // Name of the bucket to which the multipart upload was initiated. + // The name of the bucket to which the multipart upload was initiated. // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -21519,10 +22749,21 @@ func (s *ListMultipartUploadsInput) hasEndpointARN() bool { 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. +func (s *ListMultipartUploadsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListMultipartUploadsOutput struct { _ struct{} `type:"structure"` - // Name of the bucket to which the multipart upload was initiated. + // The name of the bucket to which the multipart upload was initiated. Bucket *string `type:"string"` // If you specify a delimiter in the request, then the result returns each distinct @@ -21670,13 +22911,6 @@ type ListObjectVersionsInput struct { // The bucket name that contains the objects. // - // When using this API with an access point, you must direct requests to the - // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you - // provide the access point ARN in place of the bucket name. For more information - // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) - // in the Amazon Simple Storage Service Developer Guide. - // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -21817,6 +23051,17 @@ func (s *ListObjectVersionsInput) hasEndpointARN() bool { 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. +func (s *ListObjectVersionsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListObjectVersionsOutput struct { _ struct{} `type:"structure"` @@ -21857,7 +23102,7 @@ type ListObjectVersionsOutput struct { // Specifies the maximum number of objects to return. MaxKeys *int64 `type:"integer"` - // Bucket name. + // The bucket name. Name *string `type:"string"` // When the number of responses exceeds the value of MaxKeys, NextKeyMarker @@ -21974,6 +23219,21 @@ type ListObjectsInput struct { // The name of the bucket containing the objects. // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -22105,6 +23365,17 @@ func (s *ListObjectsInput) hasEndpointARN() bool { 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. +func (s *ListObjectsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListObjectsOutput struct { _ struct{} `type:"structure"` @@ -22149,7 +23420,7 @@ type ListObjectsOutput struct { // The maximum number of keys returned in the response body. MaxKeys *int64 `type:"integer"` - // Bucket name. + // The bucket name. Name *string `type:"string"` // When response is truncated (the IsTruncated element value in the response @@ -22242,11 +23513,19 @@ type ListObjectsV2Input struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -22396,6 +23675,17 @@ func (s *ListObjectsV2Input) hasEndpointARN() bool { 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. +func (s *ListObjectsV2Input) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListObjectsV2Output struct { _ struct{} `type:"structure"` @@ -22453,14 +23743,22 @@ type ListObjectsV2Output struct { // but will never contain more. MaxKeys *int64 `type:"integer"` - // Bucket name. + // The bucket name. // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. Name *string `type:"string"` // NextContinuationToken is sent when isTruncated is true, which means there @@ -22561,15 +23859,23 @@ func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output { type ListPartsInput struct { _ struct{} `locationName:"ListPartsRequest" type:"structure"` - // Name of the bucket to which the parts are being uploaded. + // The name of the bucket to which the parts are being uploaded. // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -22701,6 +24007,17 @@ func (s *ListPartsInput) hasEndpointARN() bool { 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. +func (s *ListPartsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type ListPartsOutput struct { _ struct{} `type:"structure"` @@ -22720,7 +24037,7 @@ type ListPartsOutput struct { // incomplete multipart uploads. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"` - // Name of the bucket to which the multipart upload was initiated. + // The name of the bucket to which the multipart upload was initiated. Bucket *string `type:"string"` // Container element that identifies who initiated the multipart upload. If @@ -24098,6 +25415,101 @@ func (s *Owner) SetID(v string) *Owner { 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 +func (s OwnershipControls) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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. + // + // ObjectOwnership is a required field + ObjectOwnership *string `type:"string" required:"true" enum:"ObjectOwnership"` +} + +// String returns the string representation +func (s OwnershipControlsRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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"` @@ -24375,7 +25787,7 @@ type PutBucketAccelerateConfigurationInput struct { // AccelerateConfiguration is a required field AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // Name of the bucket for which the accelerate configuration is set. + // 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"` @@ -24454,6 +25866,17 @@ func (s *PutBucketAccelerateConfigurationInput) hasEndpointARN() bool { 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. +func (s *PutBucketAccelerateConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketAccelerateConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -24610,6 +26033,17 @@ func (s *PutBucketAclInput) hasEndpointARN() bool { 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. +func (s *PutBucketAclInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketAclOutput struct { _ struct{} `type:"structure"` } @@ -24730,6 +26164,17 @@ func (s *PutBucketAnalyticsConfigurationInput) hasEndpointARN() bool { 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. +func (s *PutBucketAnalyticsConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketAnalyticsConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -24839,6 +26284,17 @@ func (s *PutBucketCorsInput) hasEndpointARN() bool { 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. +func (s *PutBucketCorsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketCorsOutput struct { _ struct{} `type:"structure"` } @@ -24949,6 +26405,17 @@ func (s *PutBucketEncryptionInput) hasEndpointARN() bool { 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. +func (s *PutBucketEncryptionInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketEncryptionOutput struct { _ struct{} `type:"structure"` } @@ -25062,11 +26529,22 @@ func (s *PutBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, e return parseEndpointARN(*s.Bucket) } -func (s *PutBucketInventoryConfigurationInput) hasEndpointARN() bool { +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. +func (s *PutBucketInventoryConfigurationInput) updateArnableField(v string) error { if s.Bucket == nil { - return false + return fmt.Errorf("member Bucket is nil") } - return arn.IsARN(*s.Bucket) + s.Bucket = aws.String(v) + return nil } type PutBucketInventoryConfigurationOutput struct { @@ -25170,6 +26648,17 @@ func (s *PutBucketLifecycleConfigurationInput) hasEndpointARN() bool { 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. +func (s *PutBucketLifecycleConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketLifecycleConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -25269,6 +26758,17 @@ func (s *PutBucketLifecycleInput) hasEndpointARN() bool { 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. +func (s *PutBucketLifecycleInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketLifecycleOutput struct { _ struct{} `type:"structure"` } @@ -25375,6 +26875,17 @@ func (s *PutBucketLoggingInput) hasEndpointARN() bool { 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. +func (s *PutBucketLoggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketLoggingOutput struct { _ struct{} `type:"structure"` } @@ -25495,6 +27006,17 @@ func (s *PutBucketMetricsConfigurationInput) hasEndpointARN() bool { 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. +func (s *PutBucketMetricsConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketMetricsConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -25602,6 +27124,17 @@ func (s *PutBucketNotificationConfigurationInput) hasEndpointARN() bool { 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. +func (s *PutBucketNotificationConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketNotificationConfigurationOutput struct { _ struct{} `type:"structure"` } @@ -25703,6 +27236,17 @@ func (s *PutBucketNotificationInput) hasEndpointARN() bool { 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. +func (s *PutBucketNotificationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketNotificationOutput struct { _ struct{} `type:"structure"` } @@ -25717,6 +27261,121 @@ 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"` + + ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` + + // The OwnershipControls (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 +func (s PutBucketOwnershipControlsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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. +func (s *PutBucketOwnershipControlsInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + +type PutBucketOwnershipControlsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutBucketOwnershipControlsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBucketOwnershipControlsOutput) GoString() string { + return s.String() +} + type PutBucketPolicyInput struct { _ struct{} `locationName:"PutBucketPolicyRequest" type:"structure" payload:"Policy"` @@ -25814,6 +27473,17 @@ func (s *PutBucketPolicyInput) hasEndpointARN() bool { 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. +func (s *PutBucketPolicyInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketPolicyOutput struct { _ struct{} `type:"structure"` } @@ -25929,6 +27599,17 @@ func (s *PutBucketReplicationInput) hasEndpointARN() bool { 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. +func (s *PutBucketReplicationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketReplicationOutput struct { _ struct{} `type:"structure"` } @@ -26035,6 +27716,17 @@ func (s *PutBucketRequestPaymentInput) hasEndpointARN() bool { 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. +func (s *PutBucketRequestPaymentInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketRequestPaymentOutput struct { _ struct{} `type:"structure"` } @@ -26141,6 +27833,17 @@ func (s *PutBucketTaggingInput) hasEndpointARN() bool { 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. +func (s *PutBucketTaggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketTaggingOutput struct { _ struct{} `type:"structure"` } @@ -26252,6 +27955,17 @@ func (s *PutBucketVersioningInput) hasEndpointARN() bool { 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. +func (s *PutBucketVersioningInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketVersioningOutput struct { _ struct{} `type:"structure"` } @@ -26358,6 +28072,17 @@ func (s *PutBucketWebsiteInput) hasEndpointARN() bool { 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. +func (s *PutBucketWebsiteInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutBucketWebsiteOutput struct { _ struct{} `type:"structure"` } @@ -26387,7 +28112,7 @@ type PutObjectAclInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. @@ -26402,22 +28127,45 @@ type PutObjectAclInput struct { // 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, overwrite, and delete any object in the bucket. 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 operation was initiated. // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -26562,6 +28310,17 @@ func (s *PutObjectAclInput) hasEndpointARN() bool { 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. +func (s *PutObjectAclInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutObjectAclOutput struct { _ struct{} `type:"structure"` @@ -26591,20 +28350,30 @@ type PutObjectInput struct { // 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"` - // Bucket name to which the PUT operation was initiated. + // The bucket name to which the PUT operation was initiated. // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -26653,15 +28422,23 @@ type PutObjectInput struct { 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 operation was initiated. @@ -26726,8 +28503,12 @@ type PutObjectInput struct { // S3 (for example, AES256, aws:kms). ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - // If you don't specify, S3 Standard is the default storage class. Amazon S3 - // supports other storage classes. + // 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 Service Developer 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. @@ -27001,6 +28782,17 @@ func (s *PutObjectInput) hasEndpointARN() bool { 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. +func (s *PutObjectInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutObjectLegalHoldInput struct { _ struct{} `locationName:"PutObjectLegalHoldRequest" type:"structure" payload:"LegalHold"` @@ -27009,7 +28801,7 @@ type PutObjectLegalHoldInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. @@ -27131,6 +28923,17 @@ func (s *PutObjectLegalHoldInput) hasEndpointARN() bool { 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. +func (s *PutObjectLegalHoldInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutObjectLegalHoldOutput struct { _ struct{} `type:"structure"` @@ -27259,6 +29062,17 @@ func (s *PutObjectLockConfigurationInput) hasEndpointARN() bool { 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. +func (s *PutObjectLockConfigurationInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutObjectLockConfigurationOutput struct { _ struct{} `type:"structure"` @@ -27403,7 +29217,7 @@ type PutObjectRetentionInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. @@ -27535,6 +29349,17 @@ func (s *PutObjectRetentionInput) hasEndpointARN() bool { 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. +func (s *PutObjectRetentionInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutObjectRetentionOutput struct { _ struct{} `type:"structure"` @@ -27566,11 +29391,19 @@ type PutObjectTaggingInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -27684,6 +29517,17 @@ func (s *PutObjectTaggingInput) hasEndpointARN() bool { 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. +func (s *PutObjectTaggingInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutObjectTaggingOutput struct { _ struct{} `type:"structure"` @@ -27799,6 +29643,17 @@ func (s *PutPublicAccessBlockInput) hasEndpointARN() bool { 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. +func (s *PutPublicAccessBlockInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type PutPublicAccessBlockOutput struct { _ struct{} `type:"structure"` } @@ -28647,11 +30502,19 @@ type RestoreObjectInput struct { // // When using this API with an access point, you must direct requests to the // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this operation using an access point through the AWS SDKs, you + // When using this operation with an access point through the AWS SDKs, you // provide the access point ARN in place of the bucket name. For more information // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) // in the Amazon Simple Storage Service Developer Guide. // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -28773,6 +30636,17 @@ func (s *RestoreObjectInput) hasEndpointARN() bool { 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. +func (s *RestoreObjectInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type RestoreObjectOutput struct { _ struct{} `type:"structure"` @@ -29586,6 +31460,17 @@ func (s *SelectObjectContentInput) hasEndpointARN() bool { 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. +func (s *SelectObjectContentInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type SelectObjectContentOutput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -30250,7 +32135,7 @@ type TargetGrant struct { // 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. + // Logging permissions assigned to the grantee for the bucket. Permission *string `type:"string" enum:"BucketLogsPermission"` } @@ -30481,6 +32366,21 @@ type UploadPartCopyInput struct { // The bucket name. // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -30496,12 +32396,17 @@ type UploadPartCopyInput struct { // * 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 the 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. + // 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 AWS Region. + // same AWS 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). @@ -30786,6 +32691,17 @@ func (s *UploadPartCopyInput) hasEndpointARN() bool { 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. +func (s *UploadPartCopyInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type UploadPartCopyOutput struct { _ struct{} `type:"structure" payload:"CopyPartResult"` @@ -30878,7 +32794,22 @@ type UploadPartInput struct { // Object data. Body io.ReadSeeker `type:"blob"` - // Name of the bucket to which the multipart upload was initiated. + // The name of the bucket to which the multipart upload was initiated. + // + // When using this API with an access point, you must direct requests to the + // access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + // When using this operation with an access point through the AWS SDKs, you + // provide the access point ARN in place of the bucket name. For more information + // about access point ARNs, see Using Access Points (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // When using this API 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 operation using S3 on Outposts through the AWS 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/dev/S3onOutposts.html) + // in the Amazon Simple Storage Service Developer Guide. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -31076,6 +33007,17 @@ func (s *UploadPartInput) hasEndpointARN() bool { 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. +func (s *UploadPartInput) updateArnableField(v string) error { + if s.Bucket == nil { + return fmt.Errorf("member Bucket is nil") + } + s.Bucket = aws.String(v) + return nil +} + type UploadPartOutput struct { _ struct{} `type:"structure"` @@ -31963,6 +33905,30 @@ func ObjectLockRetentionMode_Values() []string { } } +// 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. +const ( + // ObjectOwnershipBucketOwnerPreferred is a ObjectOwnership enum value + ObjectOwnershipBucketOwnerPreferred = "BucketOwnerPreferred" + + // ObjectOwnershipObjectWriter is a ObjectOwnership enum value + ObjectOwnershipObjectWriter = "ObjectWriter" +) + +// ObjectOwnership_Values returns all elements of the ObjectOwnership enum +func ObjectOwnership_Values() []string { + return []string{ + ObjectOwnershipBucketOwnerPreferred, + ObjectOwnershipObjectWriter, + } +} + const ( // ObjectStorageClassStandard is a ObjectStorageClass enum value ObjectStorageClassStandard = "STANDARD" @@ -31984,6 +33950,9 @@ const ( // ObjectStorageClassDeepArchive is a ObjectStorageClass enum value ObjectStorageClassDeepArchive = "DEEP_ARCHIVE" + + // ObjectStorageClassOutposts is a ObjectStorageClass enum value + ObjectStorageClassOutposts = "OUTPOSTS" ) // ObjectStorageClass_Values returns all elements of the ObjectStorageClass enum @@ -31996,6 +33965,7 @@ func ObjectStorageClass_Values() []string { ObjectStorageClassOnezoneIa, ObjectStorageClassIntelligentTiering, ObjectStorageClassDeepArchive, + ObjectStorageClassOutposts, } } @@ -32251,6 +34221,9 @@ const ( // StorageClassDeepArchive is a StorageClass enum value StorageClassDeepArchive = "DEEP_ARCHIVE" + + // StorageClassOutposts is a StorageClass enum value + StorageClassOutposts = "OUTPOSTS" ) // StorageClass_Values returns all elements of the StorageClass enum @@ -32263,6 +34236,7 @@ func StorageClass_Values() []string { StorageClassIntelligentTiering, StorageClassGlacier, StorageClassDeepArchive, + StorageClassOutposts, } } diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go index a7698d5eb94..f1959b03a95 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go @@ -3,8 +3,8 @@ package s3 import ( "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/s3err" - "github.com/aws/aws-sdk-go/service/s3/internal/arn" + "github.com/aws/aws-sdk-go/internal/s3shared/arn" + "github.com/aws/aws-sdk-go/internal/s3shared/s3err" ) func init() { @@ -69,6 +69,8 @@ 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/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go index c4048fbfb66..403aebb688c 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go @@ -6,11 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws" awsarn "github.com/aws/aws-sdk-go/aws/arn" - "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/private/protocol" - "github.com/aws/aws-sdk-go/service/s3/internal/arn" + "github.com/aws/aws-sdk-go/internal/s3shared" + "github.com/aws/aws-sdk-go/internal/s3shared/arn" ) // Used by shapes with members decorated as endpoint ARN. @@ -22,12 +20,66 @@ func accessPointResourceParser(a awsarn.ARN) (arn.Resource, error) { resParts := arn.SplitResource(a.Resource) switch resParts[0] { case "accesspoint": + if a.Service != "s3" { + return arn.AccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3"} + } return arn.ParseAccessPointResource(a, resParts[1:]) + 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 endpointHandler(req *request.Request) { endpoint, ok := req.Params.(endpointARNGetter) if !ok || !endpoint.hasEndpointARN() { @@ -37,29 +89,29 @@ func endpointHandler(req *request.Request) { resource, err := endpoint.getEndpointARN() if err != nil { - req.Error = newInvalidARNError(nil, err) + req.Error = s3shared.NewInvalidARNError(nil, err) return } - resReq := resourceRequest{ + resReq := s3shared.ResourceRequest{ Resource: resource, Request: req, } if resReq.IsCrossPartition() { - req.Error = newClientPartitionMismatchError(resource, + req.Error = s3shared.NewClientPartitionMismatchError(resource, req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) return } if !resReq.AllowCrossRegion() && resReq.IsCrossRegion() { - req.Error = newClientRegionMismatchError(resource, + req.Error = s3shared.NewClientRegionMismatchError(resource, req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) return } if resReq.HasCustomEndpoint() { - req.Error = newInvalidARNWithCustomEndpointError(resource, nil) + req.Error = s3shared.NewInvalidARNWithCustomEndpointError(resource, nil) return } @@ -69,47 +121,22 @@ func endpointHandler(req *request.Request) { if err != nil { req.Error = err } + case arn.OutpostAccessPointARN: + // outposts does not support FIPS regions + if resReq.ResourceConfiguredForFIPS() { + req.Error = s3shared.NewInvalidARNWithFIPSError(resource, nil) + return + } + + err = updateRequestOutpostAccessPointEndpoint(req, tv) + if err != nil { + req.Error = err + } default: - req.Error = newInvalidARNError(resource, nil) + req.Error = s3shared.NewInvalidARNError(resource, nil) } } -type resourceRequest struct { - Resource arn.Resource - Request *request.Request -} - -func (r resourceRequest) ARN() awsarn.ARN { - return r.Resource.GetARN() -} - -func (r resourceRequest) AllowCrossRegion() bool { - return aws.BoolValue(r.Request.Config.S3UseARNRegion) -} - -func (r resourceRequest) UseFIPS() bool { - return isFIPS(aws.StringValue(r.Request.Config.Region)) -} - -func (r resourceRequest) IsCrossPartition() bool { - return r.Request.ClientInfo.PartitionID != r.Resource.GetARN().Partition -} - -func (r resourceRequest) IsCrossRegion() bool { - return isCrossRegion(r.Request, r.Resource.GetARN().Region) -} - -func (r resourceRequest) HasCustomEndpoint() bool { - return len(aws.StringValue(r.Request.Config.Endpoint)) > 0 -} - -func isFIPS(clientRegion string) bool { - return strings.HasPrefix(clientRegion, "fips-") || strings.HasSuffix(clientRegion, "-fips") -} -func isCrossRegion(req *request.Request, otherRegion string) bool { - return req.ClientInfo.SigningRegion != otherRegion -} - func updateBucketEndpointFromParams(r *request.Request) { bucket, ok := bucketNameFromReqParams(r.Params) if !ok { @@ -124,7 +151,7 @@ func updateBucketEndpointFromParams(r *request.Request) { func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.AccessPointARN) error { // Accelerate not supported if aws.BoolValue(req.Config.S3UseAccelerate) { - return newClientConfiguredForAccelerateError(accessPoint, + return s3shared.NewClientConfiguredForAccelerateError(accessPoint, req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) } @@ -132,7 +159,7 @@ func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.Acce // are not supported. req.Config.DisableEndpointHostPrefix = aws.Bool(false) - if err := accessPointEndpointBuilder(accessPoint).Build(req); err != nil { + if err := accessPointEndpointBuilder(accessPoint).build(req); err != nil { return err } @@ -141,93 +168,34 @@ func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.Acce return nil } -func removeBucketFromPath(u *url.URL) { - u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1) - if u.Path == "" { - u.Path = "/" +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) } -} - -type accessPointEndpointBuilder arn.AccessPointARN - -const ( - accessPointPrefixLabel = "accesspoint" - accountIDPrefixLabel = "accountID" - accesPointPrefixTemplate = "{" + accessPointPrefixLabel + "}-{" + accountIDPrefixLabel + "}." -) -func (a accessPointEndpointBuilder) Build(req *request.Request) error { - resolveRegion := arn.AccessPointARN(a).Region - cfgRegion := aws.StringValue(req.Config.Region) - - if isFIPS(cfgRegion) { - if aws.BoolValue(req.Config.S3UseARNRegion) && isCrossRegion(req, resolveRegion) { - // FIPS with cross region is not supported, the SDK must fail - // because there is no well defined method for SDK to construct a - // correct FIPS endpoint. - return newClientConfiguredForCrossRegionFIPSError(arn.AccessPointARN(a), - req.ClientInfo.PartitionID, cfgRegion, nil) - } - resolveRegion = cfgRegion + // Dualstack not supported + if aws.BoolValue(req.Config.UseDualStack) { + return s3shared.NewClientConfiguredForDualStackError(accessPoint, + req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) } - endpoint, err := resolveRegionalEndpoint(req, resolveRegion) - if err != nil { - return newFailedToResolveEndpointError(arn.AccessPointARN(a), - req.ClientInfo.PartitionID, cfgRegion, err) - } + // Ignore the disable host prefix for access points since custom endpoints + // are not supported. + req.Config.DisableEndpointHostPrefix = aws.Bool(false) - if err = updateRequestEndpoint(req, endpoint.URL); err != nil { + if err := outpostAccessPointEndpointBuilder(accessPoint).build(req); err != nil { return err } - const serviceEndpointLabel = "s3-accesspoint" - - // dualstack provided by endpoint resolver - cfgHost := req.HTTPRequest.URL.Host - if strings.HasPrefix(cfgHost, "s3") { - req.HTTPRequest.URL.Host = serviceEndpointLabel + cfgHost[2:] - } - - protocol.HostPrefixBuilder{ - Prefix: accesPointPrefixTemplate, - LabelsFn: a.hostPrefixLabelValues, - }.Build(req) - - req.ClientInfo.SigningName = endpoint.SigningName - req.ClientInfo.SigningRegion = endpoint.SigningRegion - - err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host) - if err != nil { - return newInvalidARNError(arn.AccessPointARN(a), err) - } - + removeBucketFromPath(req.HTTPRequest.URL) return nil } -func (a accessPointEndpointBuilder) hostPrefixLabelValues() map[string]string { - return map[string]string{ - accessPointPrefixLabel: arn.AccessPointARN(a).AccessPointName, - accountIDPrefixLabel: arn.AccessPointARN(a).AccountID, - } -} - -func resolveRegionalEndpoint(r *request.Request, region 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.S3UsEast1RegionalEndpoint = endpoints.RegionalS3UsEast1Endpoint - }) -} - -func updateRequestEndpoint(r *request.Request, endpoint string) (err error) { - endpoint = endpoints.AddScheme(endpoint, aws.BoolValue(r.Config.DisableSSL)) - - r.HTTPRequest.URL, err = url.Parse(endpoint + r.Operation.HTTPPath) - if err != nil { - return awserr.New(request.ErrCodeSerialization, - "failed to parse endpoint URL", err) +func removeBucketFromPath(u *url.URL) { + u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1) + if u.Path == "" { + u.Path = "/" } - - return nil } diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go new file mode 100644 index 00000000000..c1c77da9adb --- /dev/null +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go @@ -0,0 +1,177 @@ +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 + "}." +) + +// 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 + cfgRegion := aws.StringValue(req.Config.Region) + + if s3shared.IsFIPS(cfgRegion) { + if aws.BoolValue(req.Config.S3UseARNRegion) && s3shared.IsCrossRegion(req, resolveRegion) { + // FIPS with cross region is not supported, the SDK must fail + // because there is no well defined method for SDK to construct a + // correct FIPS endpoint. + return s3shared.NewClientConfiguredForCrossRegionFIPSError(arn.AccessPointARN(a), + req.ClientInfo.PartitionID, cfgRegion, nil) + } + resolveRegion = cfgRegion + } + + endpoint, err := resolveRegionalEndpoint(req, resolveRegion, resolveService) + if err != nil { + return s3shared.NewFailedToResolveEndpointError(arn.AccessPointARN(a), + req.ClientInfo.PartitionID, cfgRegion, err) + } + + if err = updateRequestEndpoint(req, endpoint.URL); err != nil { + return err + } + + const serviceEndpointLabel = "s3-accesspoint" + + // dual stack provided by endpoint resolver + cfgHost := req.HTTPRequest.URL.Host + if strings.HasPrefix(cfgHost, "s3") { + req.HTTPRequest.URL.Host = serviceEndpointLabel + cfgHost[2:] + } + + 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, + } +} + +// 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 == "s3-outposts" { + endpointsID = "s3" + } + + endpoint, err := resolveRegionalEndpoint(req, resolveRegion, endpointsID) + if err != nil { + return s3shared.NewFailedToResolveEndpointError(o, + req.ClientInfo.PartitionID, resolveRegion, err) + } + + if err = updateRequestEndpoint(req, endpoint.URL); err != nil { + return err + } + + // add url host as s3-outposts + cfgHost := req.HTTPRequest.URL.Host + if strings.HasPrefix(cfgHost, endpointsID) { + req.HTTPRequest.URL.Host = resolveService + cfgHost[len(endpointsID):] + } + + 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 string, 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.S3UsEast1RegionalEndpoint = endpoints.RegionalS3UsEast1Endpoint + }) +} + +func updateRequestEndpoint(r *request.Request, endpoint string) (err error) { + endpoint = endpoints.AddScheme(endpoint, aws.BoolValue(r.Config.DisableSSL)) + + 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 +} diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_errors.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_errors.go deleted file mode 100644 index 9df03e78d39..00000000000 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_errors.go +++ /dev/null @@ -1,151 +0,0 @@ -package s3 - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/service/s3/internal/arn" -) - -const ( - invalidARNErrorErrCode = "InvalidARNError" - configurationErrorErrCode = "ConfigurationError" -) - -type invalidARNError struct { - message string - resource arn.Resource - origErr error -} - -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) -} - -func (e invalidARNError) Code() string { - return invalidARNErrorErrCode -} - -func (e invalidARNError) Message() string { - return e.message -} - -func (e invalidARNError) OrigErr() error { - return e.origErr -} - -func newInvalidARNError(resource arn.Resource, err error) invalidARNError { - return invalidARNError{ - message: "invalid ARN", - origErr: err, - resource: resource, - } -} - -func newInvalidARNWithCustomEndpointError(resource arn.Resource, err error) invalidARNError { - return invalidARNError{ - message: "resource ARN not supported with custom client endpoints", - origErr: err, - resource: resource, - } -} - -// ARN not supported for the target partition -func newInvalidARNWithUnsupportedPartitionError(resource arn.Resource, err error) invalidARNError { - return invalidARNError{ - message: "resource ARN not supported for the target ARN partition", - origErr: err, - resource: resource, - } -} - -type configurationError struct { - message string - resource arn.Resource - clientPartitionID string - clientRegion string - origErr error -} - -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) -} - -func (e configurationError) Code() string { - return configurationErrorErrCode -} - -func (e configurationError) Message() string { - return e.message -} - -func (e configurationError) OrigErr() error { - return e.origErr -} - -func newClientPartitionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) configurationError { - return configurationError{ - message: "client partition does not match provided ARN partition", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -func newClientRegionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) configurationError { - return configurationError{ - message: "client region does not match provided ARN region", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -func newFailedToResolveEndpointError(resource arn.Resource, clientPartitionID, clientRegion string, err error) configurationError { - return configurationError{ - message: "endpoint resolver failed to find an endpoint for the provided ARN region", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -func newClientConfiguredForFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) configurationError { - return configurationError{ - message: "client configured for fips but cross-region resource ARN provided", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -func newClientConfiguredForAccelerateError(resource arn.Resource, clientPartitionID, clientRegion string, err error) configurationError { - return configurationError{ - message: "client configured for S3 Accelerate but is supported with resource ARN", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -func newClientConfiguredForCrossRegionFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) configurationError { - return configurationError{ - message: "client configured for FIPS with cross-region enabled but is supported with cross-region resource ARN", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} diff --git a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go index 49aeff16f20..dd73d460cf3 100644 --- a/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go +++ b/awsproviderlint/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go @@ -8,7 +8,7 @@ const ( // "BucketAlreadyExists". // // 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. + // by all users of the system. Select a different name and try again. ErrCodeBucketAlreadyExists = "BucketAlreadyExists" // ErrCodeBucketAlreadyOwnedByYou for service response error code diff --git a/awsproviderlint/vendor/modules.txt b/awsproviderlint/vendor/modules.txt index dedef88f76a..2da3b10ab2f 100644 --- a/awsproviderlint/vendor/modules.txt +++ b/awsproviderlint/vendor/modules.txt @@ -12,7 +12,7 @@ cloud.google.com/go/storage github.com/agext/levenshtein # github.com/apparentlymart/go-textseg v1.0.0 github.com/apparentlymart/go-textseg/textseg -# github.com/aws/aws-sdk-go v1.34.33 +# github.com/aws/aws-sdk-go v1.35.2 ## explicit github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn @@ -35,7 +35,9 @@ 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/s3err +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 @@ -54,7 +56,6 @@ github.com/aws/aws-sdk-go/private/protocol/rest 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/internal/arn github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/bflad/gopaniccheck v0.1.0 diff --git a/go.mod b/go.mod index 027d3bc7cfb..a34c7bdb812 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/terraform-providers/terraform-provider-aws go 1.14 require ( - github.com/aws/aws-sdk-go v1.34.26 + github.com/aws/aws-sdk-go v1.35.2 github.com/beevik/etree v1.1.0 github.com/fatih/color v1.9.0 // indirect github.com/hashicorp/aws-sdk-go-base v0.6.0 diff --git a/go.sum b/go.sum index 0b4320506d4..e60aa9b5714 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,8 @@ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJE github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.34.26 h1:tw4nsSfGvCDnXt2xPe8NkxIrDui+asAWinMknPLEf80= -github.com/aws/aws-sdk-go v1.34.26/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.35.2 h1:qK+noh6b9KW+5CP1NmmWsQCUbnzucSGrjHEs69MEl6A= +github.com/aws/aws-sdk-go v1.35.2/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= @@ -198,6 +198,10 @@ github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -528,6 +532,7 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=