-
Notifications
You must be signed in to change notification settings - Fork 17
/
AllAtOnceTrafficRouting.go
123 lines (97 loc) · 2.91 KB
/
AllAtOnceTrafficRouting.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package awscodedeploy
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
"github.com/aws/constructs-go/constructs/v10"
)
// Define a traffic routing config of type 'AllAtOnce'.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import "github.com/aws/aws-cdk-go/awscdk"
//
// allAtOnceTrafficRouting := awscdk.Aws_codedeploy.AllAtOnceTrafficRouting_AllAtOnce()
//
type AllAtOnceTrafficRouting interface {
TrafficRouting
// Return a TrafficRoutingConfig of type `AllAtOnce`.
Bind(_scope constructs.Construct) *TrafficRoutingConfig
}
// The jsii proxy struct for AllAtOnceTrafficRouting
type jsiiProxy_AllAtOnceTrafficRouting struct {
jsiiProxy_TrafficRouting
}
func NewAllAtOnceTrafficRouting() AllAtOnceTrafficRouting {
_init_.Initialize()
j := jsiiProxy_AllAtOnceTrafficRouting{}
_jsii_.Create(
"aws-cdk-lib.aws_codedeploy.AllAtOnceTrafficRouting",
nil, // no parameters
&j,
)
return &j
}
func NewAllAtOnceTrafficRouting_Override(a AllAtOnceTrafficRouting) {
_init_.Initialize()
_jsii_.Create(
"aws-cdk-lib.aws_codedeploy.AllAtOnceTrafficRouting",
nil, // no parameters
a,
)
}
// Shifts 100% of traffic in a single shift.
func AllAtOnceTrafficRouting_AllAtOnce() TrafficRouting {
_init_.Initialize()
var returns TrafficRouting
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_codedeploy.AllAtOnceTrafficRouting",
"allAtOnce",
nil, // no parameters
&returns,
)
return returns
}
// Shifts a specified percentage of traffic, waits for a specified amount of time, then shifts the rest of traffic.
func AllAtOnceTrafficRouting_TimeBasedCanary(props *TimeBasedCanaryTrafficRoutingProps) TrafficRouting {
_init_.Initialize()
if err := validateAllAtOnceTrafficRouting_TimeBasedCanaryParameters(props); err != nil {
panic(err)
}
var returns TrafficRouting
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_codedeploy.AllAtOnceTrafficRouting",
"timeBasedCanary",
[]interface{}{props},
&returns,
)
return returns
}
// Keeps shifting a specified percentage of traffic until reaching 100%, waiting for a specified amount of time in between each traffic shift.
func AllAtOnceTrafficRouting_TimeBasedLinear(props *TimeBasedLinearTrafficRoutingProps) TrafficRouting {
_init_.Initialize()
if err := validateAllAtOnceTrafficRouting_TimeBasedLinearParameters(props); err != nil {
panic(err)
}
var returns TrafficRouting
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_codedeploy.AllAtOnceTrafficRouting",
"timeBasedLinear",
[]interface{}{props},
&returns,
)
return returns
}
func (a *jsiiProxy_AllAtOnceTrafficRouting) Bind(_scope constructs.Construct) *TrafficRoutingConfig {
if err := a.validateBindParameters(_scope); err != nil {
panic(err)
}
var returns *TrafficRoutingConfig
_jsii_.Invoke(
a,
"bind",
[]interface{}{_scope},
&returns,
)
return returns
}