errors.go (7762B)
1 // Code generated by smithy-go-codegen DO NOT EDIT. 2 3 package types 4 5 import ( 6 "fmt" 7 smithy "github.com/aws/smithy-go" 8 ) 9 10 // The web identity token that was passed is expired or is not valid. Get a new 11 // identity token from the identity provider and then retry the request. 12 type ExpiredTokenException struct { 13 Message *string 14 15 ErrorCodeOverride *string 16 17 noSmithyDocumentSerde 18 } 19 20 func (e *ExpiredTokenException) Error() string { 21 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 22 } 23 func (e *ExpiredTokenException) ErrorMessage() string { 24 if e.Message == nil { 25 return "" 26 } 27 return *e.Message 28 } 29 func (e *ExpiredTokenException) ErrorCode() string { 30 if e == nil || e.ErrorCodeOverride == nil { 31 return "ExpiredTokenException" 32 } 33 return *e.ErrorCodeOverride 34 } 35 func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } 36 37 // The request could not be fulfilled because the identity provider (IDP) that was 38 // asked to verify the incoming identity token could not be reached. This is often 39 // a transient error caused by network conditions. Retry the request a limited 40 // number of times so that you don't exceed the request rate. If the error 41 // persists, the identity provider might be down or not responding. 42 type IDPCommunicationErrorException struct { 43 Message *string 44 45 ErrorCodeOverride *string 46 47 noSmithyDocumentSerde 48 } 49 50 func (e *IDPCommunicationErrorException) Error() string { 51 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 52 } 53 func (e *IDPCommunicationErrorException) ErrorMessage() string { 54 if e.Message == nil { 55 return "" 56 } 57 return *e.Message 58 } 59 func (e *IDPCommunicationErrorException) ErrorCode() string { 60 if e == nil || e.ErrorCodeOverride == nil { 61 return "IDPCommunicationError" 62 } 63 return *e.ErrorCodeOverride 64 } 65 func (e *IDPCommunicationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } 66 67 // The identity provider (IdP) reported that authentication failed. This might be 68 // because the claim is invalid. If this error is returned for the 69 // AssumeRoleWithWebIdentity operation, it can also mean that the claim has expired 70 // or has been explicitly revoked. 71 type IDPRejectedClaimException struct { 72 Message *string 73 74 ErrorCodeOverride *string 75 76 noSmithyDocumentSerde 77 } 78 79 func (e *IDPRejectedClaimException) Error() string { 80 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 81 } 82 func (e *IDPRejectedClaimException) ErrorMessage() string { 83 if e.Message == nil { 84 return "" 85 } 86 return *e.Message 87 } 88 func (e *IDPRejectedClaimException) ErrorCode() string { 89 if e == nil || e.ErrorCodeOverride == nil { 90 return "IDPRejectedClaim" 91 } 92 return *e.ErrorCodeOverride 93 } 94 func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } 95 96 // The error returned if the message passed to DecodeAuthorizationMessage was 97 // invalid. This can happen if the token contains invalid characters, such as 98 // linebreaks. 99 type InvalidAuthorizationMessageException struct { 100 Message *string 101 102 ErrorCodeOverride *string 103 104 noSmithyDocumentSerde 105 } 106 107 func (e *InvalidAuthorizationMessageException) Error() string { 108 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 109 } 110 func (e *InvalidAuthorizationMessageException) ErrorMessage() string { 111 if e.Message == nil { 112 return "" 113 } 114 return *e.Message 115 } 116 func (e *InvalidAuthorizationMessageException) ErrorCode() string { 117 if e == nil || e.ErrorCodeOverride == nil { 118 return "InvalidAuthorizationMessageException" 119 } 120 return *e.ErrorCodeOverride 121 } 122 func (e *InvalidAuthorizationMessageException) ErrorFault() smithy.ErrorFault { 123 return smithy.FaultClient 124 } 125 126 // The web identity token that was passed could not be validated by Amazon Web 127 // Services. Get a new identity token from the identity provider and then retry the 128 // request. 129 type InvalidIdentityTokenException struct { 130 Message *string 131 132 ErrorCodeOverride *string 133 134 noSmithyDocumentSerde 135 } 136 137 func (e *InvalidIdentityTokenException) Error() string { 138 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 139 } 140 func (e *InvalidIdentityTokenException) ErrorMessage() string { 141 if e.Message == nil { 142 return "" 143 } 144 return *e.Message 145 } 146 func (e *InvalidIdentityTokenException) ErrorCode() string { 147 if e == nil || e.ErrorCodeOverride == nil { 148 return "InvalidIdentityToken" 149 } 150 return *e.ErrorCodeOverride 151 } 152 func (e *InvalidIdentityTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } 153 154 // The request was rejected because the policy document was malformed. The error 155 // message describes the specific error. 156 type MalformedPolicyDocumentException struct { 157 Message *string 158 159 ErrorCodeOverride *string 160 161 noSmithyDocumentSerde 162 } 163 164 func (e *MalformedPolicyDocumentException) Error() string { 165 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 166 } 167 func (e *MalformedPolicyDocumentException) ErrorMessage() string { 168 if e.Message == nil { 169 return "" 170 } 171 return *e.Message 172 } 173 func (e *MalformedPolicyDocumentException) ErrorCode() string { 174 if e == nil || e.ErrorCodeOverride == nil { 175 return "MalformedPolicyDocument" 176 } 177 return *e.ErrorCodeOverride 178 } 179 func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } 180 181 // The request was rejected because the total packed size of the session policies 182 // and session tags combined was too large. An Amazon Web Services conversion 183 // compresses the session policy document, session policy ARNs, and session tags 184 // into a packed binary format that has a separate limit. The error message 185 // indicates by percentage how close the policies and tags are to the upper size 186 // limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) 187 // in the IAM User Guide. You could receive this error even though you meet other 188 // defined session policy and session tag limits. For more information, see IAM 189 // and STS Entity Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length) 190 // in the IAM User Guide. 191 type PackedPolicyTooLargeException struct { 192 Message *string 193 194 ErrorCodeOverride *string 195 196 noSmithyDocumentSerde 197 } 198 199 func (e *PackedPolicyTooLargeException) Error() string { 200 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 201 } 202 func (e *PackedPolicyTooLargeException) ErrorMessage() string { 203 if e.Message == nil { 204 return "" 205 } 206 return *e.Message 207 } 208 func (e *PackedPolicyTooLargeException) ErrorCode() string { 209 if e == nil || e.ErrorCodeOverride == nil { 210 return "PackedPolicyTooLarge" 211 } 212 return *e.ErrorCodeOverride 213 } 214 func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } 215 216 // STS is not activated in the requested region for the account that is being 217 // asked to generate credentials. The account administrator must use the IAM 218 // console to activate STS in that region. For more information, see Activating 219 // and Deactivating Amazon Web Services STS in an Amazon Web Services Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) 220 // in the IAM User Guide. 221 type RegionDisabledException struct { 222 Message *string 223 224 ErrorCodeOverride *string 225 226 noSmithyDocumentSerde 227 } 228 229 func (e *RegionDisabledException) Error() string { 230 return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) 231 } 232 func (e *RegionDisabledException) ErrorMessage() string { 233 if e.Message == nil { 234 return "" 235 } 236 return *e.Message 237 } 238 func (e *RegionDisabledException) ErrorCode() string { 239 if e == nil || e.ErrorCodeOverride == nil { 240 return "RegionDisabledException" 241 } 242 return *e.ErrorCodeOverride 243 } 244 func (e *RegionDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }