-
Notifications
You must be signed in to change notification settings - Fork 17
/
StateMachineInput.go
132 lines (115 loc) · 3.58 KB
/
StateMachineInput.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
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"
)
// Represents the input for the StateMachine.
//
// Example:
// import "github.com/aws/aws-cdk-go/awscdk"
//
// pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
// startState := stepfunctions.NewPass(this, jsii.String("StartState"))
// simpleStateMachine := stepfunctions.NewStateMachine(this, jsii.String("SimpleStateMachine"), &StateMachineProps{
// Definition: startState,
// })
// stepFunctionAction := codepipeline_actions.NewStepFunctionInvokeAction(&StepFunctionsInvokeActionProps{
// ActionName: jsii.String("Invoke"),
// StateMachine: simpleStateMachine,
// StateMachineInput: codepipeline_actions.StateMachineInput_Literal(map[string]*bool{
// "IsHelloWorldExample": jsii.Boolean(true),
// }),
// })
// pipeline.AddStage(&StageOptions{
// StageName: jsii.String("StepFunctions"),
// Actions: []iAction{
// stepFunctionAction,
// },
// })
//
type StateMachineInput interface {
// When InputType is set to Literal (default), the Input field is used directly as the input for the state machine execution.
//
// Otherwise, the state machine is invoked with an empty JSON object {}.
//
// When InputType is set to FilePath, this field is required.
// An input artifact is also required when InputType is set to FilePath.
// Default: - none.
//
Input() interface{}
// The optional input Artifact of the Action.
//
// If InputType is set to FilePath, this artifact is required
// and is used to source the input for the state machine execution.
// See: https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-StepFunctions.html#action-reference-StepFunctions-example
//
// Default: - the Action will not have any inputs.
//
InputArtifact() awscodepipeline.Artifact
// Optional StateMachine InputType InputType can be Literal or FilePath.
// Default: - Literal.
//
InputType() *string
}
// The jsii proxy struct for StateMachineInput
type jsiiProxy_StateMachineInput struct {
_ byte // padding
}
func (j *jsiiProxy_StateMachineInput) Input() interface{} {
var returns interface{}
_jsii_.Get(
j,
"input",
&returns,
)
return returns
}
func (j *jsiiProxy_StateMachineInput) InputArtifact() awscodepipeline.Artifact {
var returns awscodepipeline.Artifact
_jsii_.Get(
j,
"inputArtifact",
&returns,
)
return returns
}
func (j *jsiiProxy_StateMachineInput) InputType() *string {
var returns *string
_jsii_.Get(
j,
"inputType",
&returns,
)
return returns
}
// When the input type is FilePath, input artifact and filepath must be specified.
func StateMachineInput_FilePath(inputFile awscodepipeline.ArtifactPath) StateMachineInput {
_init_.Initialize()
if err := validateStateMachineInput_FilePathParameters(inputFile); err != nil {
panic(err)
}
var returns StateMachineInput
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_codepipeline_actions.StateMachineInput",
"filePath",
[]interface{}{inputFile},
&returns,
)
return returns
}
// When the input type is Literal, input value is passed directly to the state machine input.
func StateMachineInput_Literal(object *map[string]interface{}) StateMachineInput {
_init_.Initialize()
if err := validateStateMachineInput_LiteralParameters(object); err != nil {
panic(err)
}
var returns StateMachineInput
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_codepipeline_actions.StateMachineInput",
"literal",
[]interface{}{object},
&returns,
)
return returns
}