-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
212 lines (181 loc) · 7.99 KB
/
errors.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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sfn
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeActivityDoesNotExist for service response error code
// "ActivityDoesNotExist".
//
// The specified activity does not exist.
ErrCodeActivityDoesNotExist = "ActivityDoesNotExist"
// ErrCodeActivityLimitExceeded for service response error code
// "ActivityLimitExceeded".
//
// The maximum number of activities has been reached. Existing activities must
// be deleted before a new activity can be created.
ErrCodeActivityLimitExceeded = "ActivityLimitExceeded"
// ErrCodeActivityWorkerLimitExceeded for service response error code
// "ActivityWorkerLimitExceeded".
//
// The maximum number of workers concurrently polling for activity tasks has
// been reached.
ErrCodeActivityWorkerLimitExceeded = "ActivityWorkerLimitExceeded"
// ErrCodeConflictException for service response error code
// "ConflictException".
//
// Updating or deleting a resource can cause an inconsistent state. This error
// occurs when there're concurrent requests for DeleteStateMachineVersion, PublishStateMachineVersion,
// or UpdateStateMachine with the publish parameter set to true.
//
// HTTP Status Code: 409
ErrCodeConflictException = "ConflictException"
// ErrCodeExecutionAlreadyExists for service response error code
// "ExecutionAlreadyExists".
//
// The execution has the same name as another execution (but a different input).
//
// Executions with the same name and input are considered idempotent.
ErrCodeExecutionAlreadyExists = "ExecutionAlreadyExists"
// ErrCodeExecutionDoesNotExist for service response error code
// "ExecutionDoesNotExist".
//
// The specified execution does not exist.
ErrCodeExecutionDoesNotExist = "ExecutionDoesNotExist"
// ErrCodeExecutionLimitExceeded for service response error code
// "ExecutionLimitExceeded".
//
// The maximum number of running executions has been reached. Running executions
// must end or be stopped before a new execution can be started.
ErrCodeExecutionLimitExceeded = "ExecutionLimitExceeded"
// ErrCodeInvalidArn for service response error code
// "InvalidArn".
//
// The provided Amazon Resource Name (ARN) is not valid.
ErrCodeInvalidArn = "InvalidArn"
// ErrCodeInvalidDefinition for service response error code
// "InvalidDefinition".
//
// The provided Amazon States Language definition is not valid.
ErrCodeInvalidDefinition = "InvalidDefinition"
// ErrCodeInvalidExecutionInput for service response error code
// "InvalidExecutionInput".
//
// The provided JSON input data is not valid.
ErrCodeInvalidExecutionInput = "InvalidExecutionInput"
// ErrCodeInvalidLoggingConfiguration for service response error code
// "InvalidLoggingConfiguration".
ErrCodeInvalidLoggingConfiguration = "InvalidLoggingConfiguration"
// ErrCodeInvalidName for service response error code
// "InvalidName".
//
// The provided name is not valid.
ErrCodeInvalidName = "InvalidName"
// ErrCodeInvalidOutput for service response error code
// "InvalidOutput".
//
// The provided JSON output data is not valid.
ErrCodeInvalidOutput = "InvalidOutput"
// ErrCodeInvalidToken for service response error code
// "InvalidToken".
//
// The provided token is not valid.
ErrCodeInvalidToken = "InvalidToken"
// ErrCodeInvalidTracingConfiguration for service response error code
// "InvalidTracingConfiguration".
//
// Your tracingConfiguration key does not match, or enabled has not been set
// to true or false.
ErrCodeInvalidTracingConfiguration = "InvalidTracingConfiguration"
// ErrCodeMissingRequiredParameter for service response error code
// "MissingRequiredParameter".
//
// Request is missing a required parameter. This error occurs if both definition
// and roleArn are not specified.
ErrCodeMissingRequiredParameter = "MissingRequiredParameter"
// ErrCodeResourceNotFound for service response error code
// "ResourceNotFound".
//
// Could not find the referenced resource.
ErrCodeResourceNotFound = "ResourceNotFound"
// ErrCodeServiceQuotaExceededException for service response error code
// "ServiceQuotaExceededException".
//
// The request would cause a service quota to be exceeded.
//
// HTTP Status Code: 402
ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException"
// ErrCodeStateMachineAlreadyExists for service response error code
// "StateMachineAlreadyExists".
//
// A state machine with the same name but a different definition or role ARN
// already exists.
ErrCodeStateMachineAlreadyExists = "StateMachineAlreadyExists"
// ErrCodeStateMachineDeleting for service response error code
// "StateMachineDeleting".
//
// The specified state machine is being deleted.
ErrCodeStateMachineDeleting = "StateMachineDeleting"
// ErrCodeStateMachineDoesNotExist for service response error code
// "StateMachineDoesNotExist".
//
// The specified state machine does not exist.
ErrCodeStateMachineDoesNotExist = "StateMachineDoesNotExist"
// ErrCodeStateMachineLimitExceeded for service response error code
// "StateMachineLimitExceeded".
//
// The maximum number of state machines has been reached. Existing state machines
// must be deleted before a new state machine can be created.
ErrCodeStateMachineLimitExceeded = "StateMachineLimitExceeded"
// ErrCodeStateMachineTypeNotSupported for service response error code
// "StateMachineTypeNotSupported".
ErrCodeStateMachineTypeNotSupported = "StateMachineTypeNotSupported"
// ErrCodeTaskDoesNotExist for service response error code
// "TaskDoesNotExist".
ErrCodeTaskDoesNotExist = "TaskDoesNotExist"
// ErrCodeTaskTimedOut for service response error code
// "TaskTimedOut".
ErrCodeTaskTimedOut = "TaskTimedOut"
// ErrCodeTooManyTags for service response error code
// "TooManyTags".
//
// You've exceeded the number of tags allowed for a resource. See the Limits
// Topic (https://docs.aws.amazon.com/step-functions/latest/dg/limits.html)
// in the Step Functions Developer Guide.
ErrCodeTooManyTags = "TooManyTags"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// The input does not satisfy the constraints specified by an Amazon Web Services
// service.
ErrCodeValidationException = "ValidationException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"ActivityDoesNotExist": newErrorActivityDoesNotExist,
"ActivityLimitExceeded": newErrorActivityLimitExceeded,
"ActivityWorkerLimitExceeded": newErrorActivityWorkerLimitExceeded,
"ConflictException": newErrorConflictException,
"ExecutionAlreadyExists": newErrorExecutionAlreadyExists,
"ExecutionDoesNotExist": newErrorExecutionDoesNotExist,
"ExecutionLimitExceeded": newErrorExecutionLimitExceeded,
"InvalidArn": newErrorInvalidArn,
"InvalidDefinition": newErrorInvalidDefinition,
"InvalidExecutionInput": newErrorInvalidExecutionInput,
"InvalidLoggingConfiguration": newErrorInvalidLoggingConfiguration,
"InvalidName": newErrorInvalidName,
"InvalidOutput": newErrorInvalidOutput,
"InvalidToken": newErrorInvalidToken,
"InvalidTracingConfiguration": newErrorInvalidTracingConfiguration,
"MissingRequiredParameter": newErrorMissingRequiredParameter,
"ResourceNotFound": newErrorResourceNotFound,
"ServiceQuotaExceededException": newErrorServiceQuotaExceededException,
"StateMachineAlreadyExists": newErrorStateMachineAlreadyExists,
"StateMachineDeleting": newErrorStateMachineDeleting,
"StateMachineDoesNotExist": newErrorStateMachineDoesNotExist,
"StateMachineLimitExceeded": newErrorStateMachineLimitExceeded,
"StateMachineTypeNotSupported": newErrorStateMachineTypeNotSupported,
"TaskDoesNotExist": newErrorTaskDoesNotExist,
"TaskTimedOut": newErrorTaskTimedOut,
"TooManyTags": newErrorTooManyTags,
"ValidationException": newErrorValidationException,
}