diff --git a/s3-config-validator/src/go.mod b/s3-config-validator/src/go.mod index b2a96bd5..55da5b7e 100644 --- a/s3-config-validator/src/go.mod +++ b/s3-config-validator/src/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go-v2 v1.32.2 github.com/aws/aws-sdk-go-v2/credentials v1.17.41 - github.com/aws/aws-sdk-go-v2/service/s3 v1.65.2 + github.com/aws/aws-sdk-go-v2/service/s3 v1.65.3 github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 github.com/maxbrunsfeld/counterfeiter/v6 v6.9.0 github.com/onsi/ginkgo/v2 v2.20.2 diff --git a/s3-config-validator/src/go.sum b/s3-config-validator/src/go.sum index e377db8c..06fc6249 100644 --- a/s3-config-validator/src/go.sum +++ b/s3-config-validator/src/go.sum @@ -20,8 +20,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2 h1:t7iUP9+4wdc5lt3E41huP+GvQZJD38WLsgVp4iOtAjg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2/go.mod h1:/niFCtmuQNxqx9v8WAPq5qh7EH25U4BF6tjoyq9bObM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.65.2 h1:yi8m+jepdp6foK14xXLGkYBenxnlcfJ45ka4Pg7fDSQ= -github.com/aws/aws-sdk-go-v2/service/s3 v1.65.2/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.65.3 h1:xxHGZ+wUgZNACQmxtdvP5tgzfsxGS3vPpTP5Hy3iToE= +github.com/aws/aws-sdk-go-v2/service/s3 v1.65.3/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= diff --git a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md index 1e33c359..138a78f9 100644 --- a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md +++ b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.65.3 (2024-10-11) + +* **Bug Fix**: S3 ReplicationRuleFilter and LifecycleRuleFilter shapes are being changed from union to structure types + # v1.65.2 (2024-10-08) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go index 5695bf6a..7b6980a2 100644 --- a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go +++ b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go @@ -18098,12 +18098,17 @@ func awsRestxml_deserializeDocumentLifecycleRuleAndOperator(v **types.LifecycleR return nil } -func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFilter, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentLifecycleRuleFilter(v **types.LifecycleRuleFilter, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var uv types.LifecycleRuleFilter - var memberFound bool + var sv *types.LifecycleRuleFilter + if *v == nil { + sv = &types.LifecycleRuleFilter{} + } else { + sv = *v + } + for { t, done, err := decoder.Token() if err != nil { @@ -18112,27 +18117,16 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil if done { break } - if memberFound { - if err = decoder.Decoder.Skip(); err != nil { - return err - } - } originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { case strings.EqualFold("And", t.Name.Local): - var mv types.LifecycleRuleAndOperator nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentLifecycleRuleAndOperator(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentLifecycleRuleAndOperator(&sv.And, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.LifecycleRuleFilterMemberAnd{Value: mv} - memberFound = true case strings.EqualFold("ObjectSizeGreaterThan", t.Name.Local): - var mv int64 val, err := decoder.Value() if err != nil { return err @@ -18146,13 +18140,10 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil if err != nil { return err } - mv = i64 + sv.ObjectSizeGreaterThan = ptr.Int64(i64) } - uv = &types.LifecycleRuleFilterMemberObjectSizeGreaterThan{Value: mv} - memberFound = true case strings.EqualFold("ObjectSizeLessThan", t.Name.Local): - var mv int64 val, err := decoder.Value() if err != nil { return err @@ -18166,13 +18157,10 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil if err != nil { return err } - mv = i64 + sv.ObjectSizeLessThan = ptr.Int64(i64) } - uv = &types.LifecycleRuleFilterMemberObjectSizeLessThan{Value: mv} - memberFound = true case strings.EqualFold("Prefix", t.Name.Local): - var mv string val, err := decoder.Value() if err != nil { return err @@ -18182,30 +18170,26 @@ func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFil } { xtv := string(val) - mv = xtv + sv.Prefix = ptr.String(xtv) } - uv = &types.LifecycleRuleFilterMemberPrefix{Value: mv} - memberFound = true case strings.EqualFold("Tag", t.Name.Local): - var mv types.Tag nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentTag(&sv.Tag, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.LifecycleRuleFilterMemberTag{Value: mv} - memberFound = true default: - uv = &types.UnknownUnionMember{Tag: t.Name.Local} - memberFound = true + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } } decoder = originalDecoder } - *v = uv + *v = sv return nil } @@ -21397,12 +21381,17 @@ func awsRestxml_deserializeDocumentReplicationRuleAndOperator(v **types.Replicat return nil } -func awsRestxml_deserializeDocumentReplicationRuleFilter(v *types.ReplicationRuleFilter, decoder smithyxml.NodeDecoder) error { +func awsRestxml_deserializeDocumentReplicationRuleFilter(v **types.ReplicationRuleFilter, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var uv types.ReplicationRuleFilter - var memberFound bool + var sv *types.ReplicationRuleFilter + if *v == nil { + sv = &types.ReplicationRuleFilter{} + } else { + sv = *v + } + for { t, done, err := decoder.Token() if err != nil { @@ -21411,27 +21400,16 @@ func awsRestxml_deserializeDocumentReplicationRuleFilter(v *types.ReplicationRul if done { break } - if memberFound { - if err = decoder.Decoder.Skip(); err != nil { - return err - } - } originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { case strings.EqualFold("And", t.Name.Local): - var mv types.ReplicationRuleAndOperator nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentReplicationRuleAndOperator(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentReplicationRuleAndOperator(&sv.And, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.ReplicationRuleFilterMemberAnd{Value: mv} - memberFound = true case strings.EqualFold("Prefix", t.Name.Local): - var mv string val, err := decoder.Value() if err != nil { return err @@ -21441,30 +21419,26 @@ func awsRestxml_deserializeDocumentReplicationRuleFilter(v *types.ReplicationRul } { xtv := string(val) - mv = xtv + sv.Prefix = ptr.String(xtv) } - uv = &types.ReplicationRuleFilterMemberPrefix{Value: mv} - memberFound = true case strings.EqualFold("Tag", t.Name.Local): - var mv types.Tag nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + if err := awsRestxml_deserializeDocumentTag(&sv.Tag, nodeDecoder); err != nil { return err } - mv = *destAddr - uv = &types.ReplicationRuleFilterMemberTag{Value: mv} - memberFound = true default: - uv = &types.UnknownUnionMember{Tag: t.Name.Local} - memberFound = true + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } } decoder = originalDecoder } - *v = uv + *v = sv return nil } diff --git a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go index 8e174e9b..fb11d636 100644 --- a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go +++ b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go @@ -3,4 +3,4 @@ package s3 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.65.2" +const goModuleVersion = "1.65.3" diff --git a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go index fd8e91c4..40a15e26 100644 --- a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go +++ b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go @@ -11233,71 +11233,66 @@ func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRule return nil } -func awsRestxml_serializeDocumentLifecycleRuleFilter(v types.LifecycleRuleFilter, value smithyxml.Value) error { +func awsRestxml_serializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFilter, value smithyxml.Value) error { defer value.Close() - switch uv := v.(type) { - case *types.LifecycleRuleFilterMemberAnd: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + if v.And != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "And", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentLifecycleRuleAndOperator(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentLifecycleRuleAndOperator(v.And, el); err != nil { return err } - - case *types.LifecycleRuleFilterMemberObjectSizeGreaterThan: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + } + if v.ObjectSizeGreaterThan != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "ObjectSizeGreaterThan", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.Long(uv.Value) - - case *types.LifecycleRuleFilterMemberObjectSizeLessThan: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.Long(*v.ObjectSizeGreaterThan) + } + if v.ObjectSizeLessThan != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "ObjectSizeLessThan", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.Long(uv.Value) - - case *types.LifecycleRuleFilterMemberPrefix: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.Long(*v.ObjectSizeLessThan) + } + if v.Prefix != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Prefix", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.String(uv.Value) - - case *types.LifecycleRuleFilterMemberTag: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.String(*v.Prefix) + } + if v.Tag != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Tag", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTag(v.Tag, el); err != nil { return err } - - default: - return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) - } return nil } @@ -12405,49 +12400,44 @@ func awsRestxml_serializeDocumentReplicationRuleAndOperator(v *types.Replication return nil } -func awsRestxml_serializeDocumentReplicationRuleFilter(v types.ReplicationRuleFilter, value smithyxml.Value) error { +func awsRestxml_serializeDocumentReplicationRuleFilter(v *types.ReplicationRuleFilter, value smithyxml.Value) error { defer value.Close() - switch uv := v.(type) { - case *types.ReplicationRuleFilterMemberAnd: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + if v.And != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "And", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentReplicationRuleAndOperator(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentReplicationRuleAndOperator(v.And, el); err != nil { return err } - - case *types.ReplicationRuleFilterMemberPrefix: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + } + if v.Prefix != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Prefix", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - av.String(uv.Value) - - case *types.ReplicationRuleFilterMemberTag: - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ + el := value.MemberElement(root) + el.String(*v.Prefix) + } + if v.Tag != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ Name: smithyxml.Name{ Local: "Tag", }, - Attr: customMemberNameAttr, + Attr: rootAttr, } - av := value.MemberElement(customMemberName) - if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil { + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTag(v.Tag, el); err != nil { return err } - - default: - return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) - } return nil } diff --git a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go index 66dfa881..4842093d 100644 --- a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go +++ b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go @@ -2205,7 +2205,7 @@ type LifecycleRule struct { // The Filter is used to identify objects that a Lifecycle Rule applies to. A // Filter must have exactly one of Prefix , Tag , or And specified. Filter is // required if the LifecycleRule does not contain a Prefix element. - Filter LifecycleRuleFilter + Filter *LifecycleRuleFilter // Unique identifier for the rule. The value cannot be longer than 255 characters. ID *string @@ -2266,70 +2266,33 @@ type LifecycleRuleAndOperator struct { // Filter can have exactly one of Prefix , Tag , ObjectSizeGreaterThan , // ObjectSizeLessThan , or And specified. If the Filter element is left empty, the // Lifecycle Rule applies to all objects in the bucket. -// -// The following types satisfy this interface: -// -// LifecycleRuleFilterMemberAnd -// LifecycleRuleFilterMemberObjectSizeGreaterThan -// LifecycleRuleFilterMemberObjectSizeLessThan -// LifecycleRuleFilterMemberPrefix -// LifecycleRuleFilterMemberTag -type LifecycleRuleFilter interface { - isLifecycleRuleFilter() -} - -// This is used in a Lifecycle Rule Filter to apply a logical AND to two or more -// predicates. The Lifecycle Rule will apply to any object matching all of the -// predicates configured inside the And operator. -type LifecycleRuleFilterMemberAnd struct { - Value LifecycleRuleAndOperator - - noSmithyDocumentSerde -} - -func (*LifecycleRuleFilterMemberAnd) isLifecycleRuleFilter() {} - -// Minimum object size to which the rule applies. -type LifecycleRuleFilterMemberObjectSizeGreaterThan struct { - Value int64 - - noSmithyDocumentSerde -} - -func (*LifecycleRuleFilterMemberObjectSizeGreaterThan) isLifecycleRuleFilter() {} - -// Maximum object size to which the rule applies. -type LifecycleRuleFilterMemberObjectSizeLessThan struct { - Value int64 +type LifecycleRuleFilter struct { - noSmithyDocumentSerde -} + // This is used in a Lifecycle Rule Filter to apply a logical AND to two or more + // predicates. The Lifecycle Rule will apply to any object matching all of the + // predicates configured inside the And operator. + And *LifecycleRuleAndOperator -func (*LifecycleRuleFilterMemberObjectSizeLessThan) isLifecycleRuleFilter() {} - -// Prefix identifying one or more objects to which the rule applies. -// -// Replacement must be made for object keys containing special characters (such as -// carriage returns) when using XML requests. For more information, see [XML related object key constraints]. -// -// [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints -type LifecycleRuleFilterMemberPrefix struct { - Value string + // Minimum object size to which the rule applies. + ObjectSizeGreaterThan *int64 - noSmithyDocumentSerde -} + // Maximum object size to which the rule applies. + ObjectSizeLessThan *int64 -func (*LifecycleRuleFilterMemberPrefix) isLifecycleRuleFilter() {} + // Prefix identifying one or more objects to which the rule applies. + // + // Replacement must be made for object keys containing special characters (such as + // carriage returns) when using XML requests. For more information, see [XML related object key constraints]. + // + // [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints + Prefix *string -// This tag must exist in the object's tag set in order for the rule to apply. -type LifecycleRuleFilterMemberTag struct { - Value Tag + // This tag must exist in the object's tag set in order for the rule to apply. + Tag *Tag noSmithyDocumentSerde } -func (*LifecycleRuleFilterMemberTag) isLifecycleRuleFilter() {} - // Specifies the location where the bucket will be created. // // For directory buckets, the location type is Availability Zone. For more @@ -3316,7 +3279,7 @@ type ReplicationRule struct { // A filter that identifies the subset of objects to which the replication rule // applies. A Filter must specify exactly one Prefix , Tag , or an And child // element. - Filter ReplicationRuleFilter + Filter *ReplicationRuleFilter // A unique identifier for the rule. The maximum value is 255 characters. ID *string @@ -3380,59 +3343,36 @@ type ReplicationRuleAndOperator struct { // A filter that identifies the subset of objects to which the replication rule // applies. A Filter must specify exactly one Prefix , Tag , or an And child // element. -// -// The following types satisfy this interface: -// -// ReplicationRuleFilterMemberAnd -// ReplicationRuleFilterMemberPrefix -// ReplicationRuleFilterMemberTag -type ReplicationRuleFilter interface { - isReplicationRuleFilter() -} - -// A container for specifying rule filters. The filters determine the subset of -// objects to which the rule applies. This element is required only if you specify -// more than one filter. For example: -// -// - If you specify both a Prefix and a Tag filter, wrap these filters in an And -// tag. -// -// - If you specify a filter based on multiple tags, wrap the Tag elements in an -// And tag. -type ReplicationRuleFilterMemberAnd struct { - Value ReplicationRuleAndOperator - - noSmithyDocumentSerde -} - -func (*ReplicationRuleFilterMemberAnd) isReplicationRuleFilter() {} +type ReplicationRuleFilter struct { -// An object key name prefix that identifies the subset of objects to which the -// rule applies. -// -// Replacement must be made for object keys containing special characters (such as -// carriage returns) when using XML requests. For more information, see [XML related object key constraints]. -// -// [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints -type ReplicationRuleFilterMemberPrefix struct { - Value string - - noSmithyDocumentSerde -} + // A container for specifying rule filters. The filters determine the subset of + // objects to which the rule applies. This element is required only if you specify + // more than one filter. For example: + // + // - If you specify both a Prefix and a Tag filter, wrap these filters in an And + // tag. + // + // - If you specify a filter based on multiple tags, wrap the Tag elements in an + // And tag. + And *ReplicationRuleAndOperator -func (*ReplicationRuleFilterMemberPrefix) isReplicationRuleFilter() {} + // An object key name prefix that identifies the subset of objects to which the + // rule applies. + // + // Replacement must be made for object keys containing special characters (such as + // carriage returns) when using XML requests. For more information, see [XML related object key constraints]. + // + // [XML related object key constraints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints + Prefix *string -// A container for specifying a tag key and value. -// -// The rule applies only to objects that have the tag in their tag set. -type ReplicationRuleFilterMemberTag struct { - Value Tag + // A container for specifying a tag key and value. + // + // The rule applies only to objects that have the tag in their tag set. + Tag *Tag noSmithyDocumentSerde } -func (*ReplicationRuleFilterMemberTag) isReplicationRuleFilter() {} - // A container specifying S3 Replication Time Control (S3 RTC) related // // information, including whether S3 RTC is enabled and the time when all objects @@ -4224,7 +4164,5 @@ type UnknownUnionMember struct { } func (*UnknownUnionMember) isAnalyticsFilter() {} -func (*UnknownUnionMember) isLifecycleRuleFilter() {} func (*UnknownUnionMember) isMetricsFilter() {} -func (*UnknownUnionMember) isReplicationRuleFilter() {} func (*UnknownUnionMember) isSelectObjectContentEventStream() {} diff --git a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go index e954b302..91d42185 100644 --- a/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go +++ b/s3-config-validator/src/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go @@ -2912,22 +2912,20 @@ func validateLifecycleRuleAndOperator(v *types.LifecycleRuleAndOperator) error { } } -func validateLifecycleRuleFilter(v types.LifecycleRuleFilter) error { +func validateLifecycleRuleFilter(v *types.LifecycleRuleFilter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LifecycleRuleFilter"} - switch uv := v.(type) { - case *types.LifecycleRuleFilterMemberAnd: - if err := validateLifecycleRuleAndOperator(&uv.Value); err != nil { - invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError)) + if v.Tag != nil { + if err := validateTag(v.Tag); err != nil { + invalidParams.AddNested("Tag", err.(smithy.InvalidParamsError)) } - - case *types.LifecycleRuleFilterMemberTag: - if err := validateTag(&uv.Value); err != nil { - invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError)) + } + if v.And != nil { + if err := validateLifecycleRuleAndOperator(v.And); err != nil { + invalidParams.AddNested("And", err.(smithy.InvalidParamsError)) } - } if invalidParams.Len() > 0 { return invalidParams @@ -3320,22 +3318,20 @@ func validateReplicationRuleAndOperator(v *types.ReplicationRuleAndOperator) err } } -func validateReplicationRuleFilter(v types.ReplicationRuleFilter) error { +func validateReplicationRuleFilter(v *types.ReplicationRuleFilter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ReplicationRuleFilter"} - switch uv := v.(type) { - case *types.ReplicationRuleFilterMemberAnd: - if err := validateReplicationRuleAndOperator(&uv.Value); err != nil { - invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError)) + if v.Tag != nil { + if err := validateTag(v.Tag); err != nil { + invalidParams.AddNested("Tag", err.(smithy.InvalidParamsError)) } - - case *types.ReplicationRuleFilterMemberTag: - if err := validateTag(&uv.Value); err != nil { - invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError)) + } + if v.And != nil { + if err := validateReplicationRuleAndOperator(v.And); err != nil { + invalidParams.AddNested("And", err.(smithy.InvalidParamsError)) } - } if invalidParams.Len() > 0 { return invalidParams diff --git a/s3-config-validator/src/vendor/modules.txt b/s3-config-validator/src/vendor/modules.txt index cf032a23..c51324e4 100644 --- a/s3-config-validator/src/vendor/modules.txt +++ b/s3-config-validator/src/vendor/modules.txt @@ -60,7 +60,7 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url github.com/aws/aws-sdk-go-v2/service/internal/s3shared github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config -# github.com/aws/aws-sdk-go-v2/service/s3 v1.65.2 +# github.com/aws/aws-sdk-go-v2/service/s3 v1.65.3 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/s3 github.com/aws/aws-sdk-go-v2/service/s3/internal/arn