-
Notifications
You must be signed in to change notification settings - Fork 17
/
S3DeployAction.go
176 lines (150 loc) · 4.66 KB
/
S3DeployAction.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
package awscodepipelineactions
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
"github.com/aws/aws-cdk-go/awscdk/v2/awscodepipeline"
"github.com/aws/aws-cdk-go/awscdk/v2/awsevents"
"github.com/aws/constructs-go/constructs/v10"
)
// Deploys the sourceArtifact to Amazon S3.
//
// Example:
// var sourceAction s3SourceAction
// var sourceOutput artifact
// var deployBucket bucket
//
//
// codepipeline.NewPipeline(this, jsii.String("Pipeline"), &PipelineProps{
// Stages: []stageProps{
// &stageProps{
// StageName: jsii.String("Source"),
// Actions: []iAction{
// sourceAction,
// },
// },
// &stageProps{
// StageName: jsii.String("Deploy"),
// Actions: []*iAction{
// codepipeline_actions.NewS3DeployAction(&S3DeployActionProps{
// ActionName: jsii.String("DeployAction"),
// // can reference the variables
// ObjectKey: fmt.Sprintf("%v.txt", sourceAction.variables.VersionId),
// Input: sourceOutput,
// Bucket: deployBucket,
// }),
// },
// },
// },
// })
//
type S3DeployAction interface {
Action
// The simple properties of the Action, like its Owner, name, etc.
//
// Note that this accessor will be called before the `bind` callback.
ActionProperties() *awscodepipeline.ActionProperties
// This is a renamed version of the `IAction.actionProperties` property.
ProvidedActionProperties() *awscodepipeline.ActionProperties
// The callback invoked when this Action is added to a Pipeline.
Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
// This is a renamed version of the `IAction.bind` method.
Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig
// Creates an Event that will be triggered whenever the state of this Action changes.
OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule
VariableExpression(variableName *string) *string
}
// The jsii proxy struct for S3DeployAction
type jsiiProxy_S3DeployAction struct {
jsiiProxy_Action
}
func (j *jsiiProxy_S3DeployAction) ActionProperties() *awscodepipeline.ActionProperties {
var returns *awscodepipeline.ActionProperties
_jsii_.Get(
j,
"actionProperties",
&returns,
)
return returns
}
func (j *jsiiProxy_S3DeployAction) ProvidedActionProperties() *awscodepipeline.ActionProperties {
var returns *awscodepipeline.ActionProperties
_jsii_.Get(
j,
"providedActionProperties",
&returns,
)
return returns
}
func NewS3DeployAction(props *S3DeployActionProps) S3DeployAction {
_init_.Initialize()
if err := validateNewS3DeployActionParameters(props); err != nil {
panic(err)
}
j := jsiiProxy_S3DeployAction{}
_jsii_.Create(
"aws-cdk-lib.aws_codepipeline_actions.S3DeployAction",
[]interface{}{props},
&j,
)
return &j
}
func NewS3DeployAction_Override(s S3DeployAction, props *S3DeployActionProps) {
_init_.Initialize()
_jsii_.Create(
"aws-cdk-lib.aws_codepipeline_actions.S3DeployAction",
[]interface{}{props},
s,
)
}
func (s *jsiiProxy_S3DeployAction) Bind(scope constructs.Construct, stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig {
if err := s.validateBindParameters(scope, stage, options); err != nil {
panic(err)
}
var returns *awscodepipeline.ActionConfig
_jsii_.Invoke(
s,
"bind",
[]interface{}{scope, stage, options},
&returns,
)
return returns
}
func (s *jsiiProxy_S3DeployAction) Bound(_scope constructs.Construct, _stage awscodepipeline.IStage, options *awscodepipeline.ActionBindOptions) *awscodepipeline.ActionConfig {
if err := s.validateBoundParameters(_scope, _stage, options); err != nil {
panic(err)
}
var returns *awscodepipeline.ActionConfig
_jsii_.Invoke(
s,
"bound",
[]interface{}{_scope, _stage, options},
&returns,
)
return returns
}
func (s *jsiiProxy_S3DeployAction) OnStateChange(name *string, target awsevents.IRuleTarget, options *awsevents.RuleProps) awsevents.Rule {
if err := s.validateOnStateChangeParameters(name, options); err != nil {
panic(err)
}
var returns awsevents.Rule
_jsii_.Invoke(
s,
"onStateChange",
[]interface{}{name, target, options},
&returns,
)
return returns
}
func (s *jsiiProxy_S3DeployAction) VariableExpression(variableName *string) *string {
if err := s.validateVariableExpressionParameters(variableName); err != nil {
panic(err)
}
var returns *string
_jsii_.Invoke(
s,
"variableExpression",
[]interface{}{variableName},
&returns,
)
return returns
}