-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
118 lines (101 loc) · 4.76 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package iotsitewise
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// Access is denied.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeConflictingOperationException for service response error code
// "ConflictingOperationException".
//
// Your request has conflicting operations. This can occur if you're trying
// to perform more than one operation on the same resource at the same time.
ErrCodeConflictingOperationException = "ConflictingOperationException"
// ErrCodeInternalFailureException for service response error code
// "InternalFailureException".
//
// IoT SiteWise can't process your request right now. Try again later.
ErrCodeInternalFailureException = "InternalFailureException"
// ErrCodeInvalidRequestException for service response error code
// "InvalidRequestException".
//
// The request isn't valid. This can occur if your request contains malformed
// JSON or unsupported characters. Check your request and try again.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// You've reached the limit for a resource. For example, this can occur if you're
// trying to associate more than the allowed number of child assets or attempting
// to create more than the allowed number of properties for an asset model.
//
// For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html)
// in the IoT SiteWise User Guide.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeQueryTimeoutException for service response error code
// "QueryTimeoutException".
//
// The query timed out.
ErrCodeQueryTimeoutException = "QueryTimeoutException"
// ErrCodeResourceAlreadyExistsException for service response error code
// "ResourceAlreadyExistsException".
//
// The resource already exists.
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The requested resource can't be found.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceUnavailableException for service response error code
// "ServiceUnavailableException".
//
// The requested service is unavailable.
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
// ErrCodeThrottlingException for service response error code
// "ThrottlingException".
//
// Your request exceeded a rate limit. For example, you might have exceeded
// the number of IoT SiteWise assets that can be created per second, the allowed
// number of messages per second, and so on.
//
// For more information, see Quotas (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html)
// in the IoT SiteWise User Guide.
ErrCodeThrottlingException = "ThrottlingException"
// ErrCodeTooManyTagsException for service response error code
// "TooManyTagsException".
//
// You've reached the limit for the number of tags allowed for a resource. For
// more information, see Tag naming limits and requirements (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions)
// in the Amazon Web Services General Reference.
ErrCodeTooManyTagsException = "TooManyTagsException"
// ErrCodeUnauthorizedException for service response error code
// "UnauthorizedException".
//
// You are not authorized.
ErrCodeUnauthorizedException = "UnauthorizedException"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// The validation failed for this query.
ErrCodeValidationException = "ValidationException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AccessDeniedException": newErrorAccessDeniedException,
"ConflictingOperationException": newErrorConflictingOperationException,
"InternalFailureException": newErrorInternalFailureException,
"InvalidRequestException": newErrorInvalidRequestException,
"LimitExceededException": newErrorLimitExceededException,
"QueryTimeoutException": newErrorQueryTimeoutException,
"ResourceAlreadyExistsException": newErrorResourceAlreadyExistsException,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ServiceUnavailableException": newErrorServiceUnavailableException,
"ThrottlingException": newErrorThrottlingException,
"TooManyTagsException": newErrorTooManyTagsException,
"UnauthorizedException": newErrorUnauthorizedException,
"ValidationException": newErrorValidationException,
}