-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
errors.go
101 lines (86 loc) · 4.38 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package inspector
import (
"github.com/aws/aws-sdk-go/private/protocol"
)
const (
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// You do not have required permissions to access the requested resource.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeAgentsAlreadyRunningAssessmentException for service response error code
// "AgentsAlreadyRunningAssessmentException".
//
// You started an assessment run, but one of the instances is already participating
// in another assessment run.
ErrCodeAgentsAlreadyRunningAssessmentException = "AgentsAlreadyRunningAssessmentException"
// ErrCodeAssessmentRunInProgressException for service response error code
// "AssessmentRunInProgressException".
//
// You cannot perform a specified action if an assessment run is currently in
// progress.
ErrCodeAssessmentRunInProgressException = "AssessmentRunInProgressException"
// ErrCodeInternalException for service response error code
// "InternalException".
//
// Internal server error.
ErrCodeInternalException = "InternalException"
// ErrCodeInvalidCrossAccountRoleException for service response error code
// "InvalidCrossAccountRoleException".
//
// Amazon Inspector cannot assume the cross-account role that it needs to list
// your EC2 instances during the assessment run.
ErrCodeInvalidCrossAccountRoleException = "InvalidCrossAccountRoleException"
// ErrCodeInvalidInputException for service response error code
// "InvalidInputException".
//
// The request was rejected because an invalid or out-of-range value was supplied
// for an input parameter.
ErrCodeInvalidInputException = "InvalidInputException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// The request was rejected because it attempted to create resources beyond
// the current AWS account limits. The error code describes the limit exceeded.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeNoSuchEntityException for service response error code
// "NoSuchEntityException".
//
// The request was rejected because it referenced an entity that does not exist.
// The error code describes the entity.
ErrCodeNoSuchEntityException = "NoSuchEntityException"
// ErrCodePreviewGenerationInProgressException for service response error code
// "PreviewGenerationInProgressException".
//
// The request is rejected. The specified assessment template is currently generating
// an exclusions preview.
ErrCodePreviewGenerationInProgressException = "PreviewGenerationInProgressException"
// ErrCodeServiceTemporarilyUnavailableException for service response error code
// "ServiceTemporarilyUnavailableException".
//
// The serice is temporary unavailable.
ErrCodeServiceTemporarilyUnavailableException = "ServiceTemporarilyUnavailableException"
// ErrCodeUnsupportedFeatureException for service response error code
// "UnsupportedFeatureException".
//
// Used by the GetAssessmentReport API. The request was rejected because you
// tried to generate a report for an assessment run that existed before reporting
// was supported in Amazon Inspector. You can only generate reports for assessment
// runs that took place or will take place after generating reports in Amazon
// Inspector became available.
ErrCodeUnsupportedFeatureException = "UnsupportedFeatureException"
)
var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
"AccessDeniedException": newErrorAccessDeniedException,
"AgentsAlreadyRunningAssessmentException": newErrorAgentsAlreadyRunningAssessmentException,
"AssessmentRunInProgressException": newErrorAssessmentRunInProgressException,
"InternalException": newErrorInternalException,
"InvalidCrossAccountRoleException": newErrorInvalidCrossAccountRoleException,
"InvalidInputException": newErrorInvalidInputException,
"LimitExceededException": newErrorLimitExceededException,
"NoSuchEntityException": newErrorNoSuchEntityException,
"PreviewGenerationInProgressException": newErrorPreviewGenerationInProgressException,
"ServiceTemporarilyUnavailableException": newErrorServiceTemporarilyUnavailableException,
"UnsupportedFeatureException": newErrorUnsupportedFeatureException,
}