-
Notifications
You must be signed in to change notification settings - Fork 17
/
awss3_RoutingRuleCondition.go
35 lines (32 loc) · 1.28 KB
/
awss3_RoutingRuleCondition.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package awss3
// Example:
// bucket := s3.NewBucket(this, jsii.String("MyRedirectedBucket"), &bucketProps{
// websiteRoutingRules: []routingRule{
// &routingRule{
// hostName: jsii.String("www.example.com"),
// httpRedirectCode: jsii.String("302"),
// protocol: s3.redirectProtocol_HTTPS,
// replaceKey: s3.replaceKey.prefixWith(jsii.String("test/")),
// condition: &routingRuleCondition{
// httpErrorCodeReturnedEquals: jsii.String("200"),
// keyPrefixEquals: jsii.String("prefix"),
// },
// },
// },
// })
//
// Experimental.
type RoutingRuleCondition struct {
// The HTTP error code when the redirect is applied.
//
// In the event of an error, if the error code equals this value, then the specified redirect is applied.
//
// If both condition properties are specified, both must be true for the redirect to be applied.
// Experimental.
HttpErrorCodeReturnedEquals *string `field:"optional" json:"httpErrorCodeReturnedEquals" yaml:"httpErrorCodeReturnedEquals"`
// The object key name prefix when the redirect is applied.
//
// If both condition properties are specified, both must be true for the redirect to be applied.
// Experimental.
KeyPrefixEquals *string `field:"optional" json:"keyPrefixEquals" yaml:"keyPrefixEquals"`
}