-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
140 lines (119 loc) · 6.22 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package imagebuilder
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeCallRateLimitExceededException for service response error code
// "CallRateLimitExceededException".
//
// You have exceeded the permitted request rate for the specific operation.
ErrCodeCallRateLimitExceededException = "CallRateLimitExceededException"
// ErrCodeClientException for service response error code
// "ClientException".
//
// These errors are usually caused by a client action, such as using an action
// or resource on behalf of a user that doesn't have permissions to use the
// action or resource, or specifying an invalid resource identifier.
ErrCodeClientException = "ClientException"
// ErrCodeForbiddenException for service response error code
// "ForbiddenException".
//
// You are not authorized to perform the requested operation.
ErrCodeForbiddenException = "ForbiddenException"
// ErrCodeIdempotentParameterMismatchException for service response error code
// "IdempotentParameterMismatchException".
//
// You have specified a client token for an operation using parameter values
// that differ from a previous request that used the same client token.
ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException"
// ErrCodeInvalidPaginationTokenException for service response error code
// "InvalidPaginationTokenException".
//
// You have provided an invalid pagination token in your request.
ErrCodeInvalidPaginationTokenException = "InvalidPaginationTokenException"
// ErrCodeInvalidParameterCombinationException for service response error code
// "InvalidParameterCombinationException".
//
// You have specified two or more mutually exclusive parameters. Review the
// error message for details.
ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"
// ErrCodeInvalidParameterException for service response error code
// "InvalidParameterException".
//
// The specified parameter is invalid. Review the available parameters for the
// API request.
ErrCodeInvalidParameterException = "InvalidParameterException"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValueException".
//
// The value that you provided for the specified parameter is invalid.
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// You have requested an action that that the service doesn't support.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeInvalidVersionNumberException for service response error code
// "InvalidVersionNumberException".
//
// Your version number is out of bounds or does not follow the required syntax.
ErrCodeInvalidVersionNumberException = "InvalidVersionNumberException"
// ErrCodeResourceAlreadyExistsException for service response error code
// "ResourceAlreadyExistsException".
//
// The resource that you are trying to create already exists.
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
// ErrCodeResourceDependencyException for service response error code
// "ResourceDependencyException".
//
// You have attempted to mutate or delete a resource with a dependency that
// prohibits this action. See the error message for more details.
ErrCodeResourceDependencyException = "ResourceDependencyException"
// ErrCodeResourceInUseException for service response error code
// "ResourceInUseException".
//
// The resource that you are trying to operate on is currently in use. Review
// the message details and retry later.
ErrCodeResourceInUseException = "ResourceInUseException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// At least one of the resources referenced by your request does not exist.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceException for service response error code
// "ServiceException".
//
// This exception is thrown when the service encounters an unrecoverable exception.
ErrCodeServiceException = "ServiceException"
// ErrCodeServiceQuotaExceededException for service response error code
// "ServiceQuotaExceededException".
//
// You have exceeded the number of permitted resources or operations for this
// service. For service quotas, see EC2 Image Builder endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/imagebuilder.html#limits_imagebuilder).
ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The service is unable to process your request at this time.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CallRateLimitExceededException": newErrorCallRateLimitExceededException,
"ClientException": newErrorClientException,
"ForbiddenException": newErrorForbiddenException,
"IdempotentParameterMismatchException": newErrorIdempotentParameterMismatchException,
"InvalidPaginationTokenException": newErrorInvalidPaginationTokenException,
"InvalidParameterCombinationException": newErrorInvalidParameterCombinationException,
"InvalidParameterException": newErrorInvalidParameterException,
"InvalidParameterValueException": newErrorInvalidParameterValueException,
"InvalidRequestException": newErrorInvalidRequestException,
"InvalidVersionNumberException": newErrorInvalidVersionNumberException,
"ResourceAlreadyExistsException": newErrorResourceAlreadyExistsException,
"ResourceDependencyException": newErrorResourceDependencyException,
"ResourceInUseException": newErrorResourceInUseException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ServiceException": newErrorServiceException,
"ServiceQuotaExceededException": newErrorServiceQuotaExceededException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
}