-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
122 lines (104 loc) · 4.49 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package servicediscovery
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeCustomHealthNotFound for service response error code
// "CustomHealthNotFound".
//
// The health check for the instance that's specified by ServiceId and InstanceId
// isn't a custom health check.
ErrCodeCustomHealthNotFound = "CustomHealthNotFound"
// ErrCodeDuplicateRequest for service response error code
// "DuplicateRequest".
//
// The operation is already in progress.
ErrCodeDuplicateRequest = "DuplicateRequest"
// ErrCodeInstanceNotFound for service response error code
// "InstanceNotFound".
//
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
ErrCodeInstanceNotFound = "InstanceNotFound"
// ErrCodeInvalidInput for service response error code
// "InvalidInput".
//
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
ErrCodeInvalidInput = "InvalidInput"
// ErrCodeNamespaceAlreadyExists for service response error code
// "NamespaceAlreadyExists".
//
// The namespace that you're trying to create already exists.
ErrCodeNamespaceAlreadyExists = "NamespaceAlreadyExists"
// ErrCodeNamespaceNotFound for service response error code
// "NamespaceNotFound".
//
// No namespace exists with the specified ID.
ErrCodeNamespaceNotFound = "NamespaceNotFound"
// ErrCodeOperationNotFound for service response error code
// "OperationNotFound".
//
// No operation exists with the specified ID.
ErrCodeOperationNotFound = "OperationNotFound"
// ErrCodeRequestLimitExceeded for service response error code
// "RequestLimitExceeded".
//
// The operation can't be completed because you've reached the quota for the
// number of requests. For more information, see Cloud Map API request throttling
// quota (https://docs.aws.amazon.com/cloud-map/latest/dg/throttling.html) in
// the Cloud Map Developer Guide.
ErrCodeRequestLimitExceeded = "RequestLimitExceeded"
// ErrCodeResourceInUse for service response error code
// "ResourceInUse".
//
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
ErrCodeResourceInUse = "ResourceInUse"
// ErrCodeResourceLimitExceeded for service response error code
// "ResourceLimitExceeded".
//
// The resource can't be created because you've reached the quota on the number
// of resources.
ErrCodeResourceLimitExceeded = "ResourceLimitExceeded"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The operation can't be completed because the resource was not found.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServiceAlreadyExists for service response error code
// "ServiceAlreadyExists".
//
// The service can't be created because a service with the same name already
// exists.
ErrCodeServiceAlreadyExists = "ServiceAlreadyExists"
// ErrCodeServiceNotFound for service response error code
// "ServiceNotFound".
//
// No service exists with the specified ID.
ErrCodeServiceNotFound = "ServiceNotFound"
// ErrCodeTooManyTagsException for service response error code
// "TooManyTagsException".
//
// The list of tags on the resource is over the quota. The maximum number of
// tags that can be applied to a resource is 50.
ErrCodeTooManyTagsException = "TooManyTagsException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"CustomHealthNotFound": newErrorCustomHealthNotFound,
"DuplicateRequest": newErrorDuplicateRequest,
"InstanceNotFound": newErrorInstanceNotFound,
"InvalidInput": newErrorInvalidInput,
"NamespaceAlreadyExists": newErrorNamespaceAlreadyExists,
"NamespaceNotFound": newErrorNamespaceNotFound,
"OperationNotFound": newErrorOperationNotFound,
"RequestLimitExceeded": newErrorRequestLimitExceeded,
"ResourceInUse": newErrorResourceInUse,
"ResourceLimitExceeded": newErrorResourceLimitExceeded,
"ResourceNotFoundException": newErrorResourceNotFoundException,
"ServiceAlreadyExists": newErrorServiceAlreadyExists,
"ServiceNotFound": newErrorServiceNotFound,
"TooManyTagsException": newErrorTooManyTagsException,
}