-
Notifications
You must be signed in to change notification settings - Fork 17
/
awss3_ReplaceKey.go
93 lines (78 loc) · 1.98 KB
/
awss3_ReplaceKey.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package awss3
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
)
// Example:
// // Example automatically generated from non-compiling source. May contain errors.
// 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"),
// },
// },
// },
// })
//
type ReplaceKey interface {
PrefixWithKey() *string
WithKey() *string
}
// The jsii proxy struct for ReplaceKey
type jsiiProxy_ReplaceKey struct {
_ byte // padding
}
func (j *jsiiProxy_ReplaceKey) PrefixWithKey() *string {
var returns *string
_jsii_.Get(
j,
"prefixWithKey",
&returns,
)
return returns
}
func (j *jsiiProxy_ReplaceKey) WithKey() *string {
var returns *string
_jsii_.Get(
j,
"withKey",
&returns,
)
return returns
}
// The object key prefix to use in the redirect request.
func ReplaceKey_PrefixWith(keyReplacement *string) ReplaceKey {
_init_.Initialize()
if err := validateReplaceKey_PrefixWithParameters(keyReplacement); err != nil {
panic(err)
}
var returns ReplaceKey
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_s3.ReplaceKey",
"prefixWith",
[]interface{}{keyReplacement},
&returns,
)
return returns
}
// The specific object key to use in the redirect request.
func ReplaceKey_With(keyReplacement *string) ReplaceKey {
_init_.Initialize()
if err := validateReplaceKey_WithParameters(keyReplacement); err != nil {
panic(err)
}
var returns ReplaceKey
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_s3.ReplaceKey",
"with",
[]interface{}{keyReplacement},
&returns,
)
return returns
}