iamerr

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace         = "https://iam.amazonaws.com/doc/2010-05-08/"
	AWSFaultNamespace = "http://webservices.amazon.com/AWSFault/2005-15-09"
	STSNamespace      = "https://sts.amazonaws.com/doc/2011-06-15/"
)

Variables

This section is empty.

Functions

func WithNamespace

func WithNamespace(err error, namespace string) error

WithNamespace returns err with its XML namespace overridden to namespace, for errors that must render under a different service's namespace than the one they were originally constructed with (STS actions sharing this gateway's IAM endpoint being the only current case). It never overrides an already-explicit namespace (e.g. InvalidAction's AWSFaultNamespace, used for a request whose Version doesn't even resolve to a known action.

Types

type APIError

type APIError interface {
	error
	StatusCode() int
	XMLBody(requestID string) []byte
}

type Error

type Error struct {
	Type           ErrorType
	Code           string
	Message        string
	HTTPStatusCode int
	XMLNamespace   string
}

func AccessDeniedAssumeRoleWithWebIdentity

func AccessDeniedAssumeRoleWithWebIdentity() Error

func AccessDeniedIAMAction

func AccessDeniedIAMAction(callerArn, action string) Error

func AccessDeniedOIDCProvider

func AccessDeniedOIDCProvider(callerAccountID, resourceArn string) Error

AccessDeniedOIDCProvider is returned when a well-formed OIDC provider ARN references an account id other than callerAccountID.

func AccessKeyIDTooLong

func AccessKeyIDTooLong(maxLength int) Error

func AccessKeyIDTooShort

func AccessKeyIDTooShort(minLength int) Error

func AccessKeysLimitExceeded

func AccessKeysLimitExceeded(maxKeys int) Error

func ClientIdsPerOpenIdConnectProviderLimitExceeded

func ClientIdsPerOpenIdConnectProviderLimitExceeded(max int) Error

func ConcurrentModification

func ConcurrentModification() Error

func DurationExceedsMaxSessionDuration

func DurationExceedsMaxSessionDuration() Error

func DurationSecondsTooHigh

func DurationSecondsTooHigh(value string) Error

func DurationSecondsTooLow

func DurationSecondsTooLow(value string) Error

func EntityAlreadyExistsOIDCProvider

func EntityAlreadyExistsOIDCProvider(url string) Error

func EntityAlreadyExistsRole

func EntityAlreadyExistsRole(roleName string) Error

func EntityAlreadyExistsUser

func EntityAlreadyExistsUser(userName string) Error

func ExpiredWebIdentityToken

func ExpiredWebIdentityToken(now, exp int64) Error

func GetAPIError

func GetAPIError(code ErrorCode) Error

func IncompleteSignatureHeadersNotSigned

func IncompleteSignatureHeadersNotSigned(headers []string) Error

func IncompleteSignatureInvalidXAmzDate

func IncompleteSignatureInvalidXAmzDate(date string) Error

func IncompleteSignatureMalformedComponent

func IncompleteSignatureMalformedComponent(component string) Error

func IncompleteSignatureMalformedCredential

func IncompleteSignatureMalformedCredential(credential string) Error

func IncompleteSignatureMissingAuthorizationComponent

func IncompleteSignatureMissingAuthorizationComponent(component, authorization string) Error

func IncompleteSignatureMissingDate

func IncompleteSignatureMissingDate(authorization string) Error

func IncompleteSignatureMissingQueryParameter

func IncompleteSignatureMissingQueryParameter(parameter string) Error

func IncorrectServiceScope

func IncorrectServiceScope(expectedService string) Error

func InlinePolicyQuotaExceeded

func InlinePolicyQuotaExceeded(entityKind, entityName string, maxBytes int) Error

func InvalidAccessKeyStatus

func InvalidAccessKeyStatus(value string) Error

func InvalidAction

func InvalidAction(action, version string) Error

func InvalidCharset

func InvalidCharset(field string) Error

func InvalidDescriptionCharset

func InvalidDescriptionCharset(field string) Error

func InvalidIdentityTokenClaims

func InvalidIdentityTokenClaims() Error

func InvalidIdentityTokenIDPCommunicationError

func InvalidIdentityTokenIDPCommunicationError() Error

func InvalidIdentityTokenMalformed

func InvalidIdentityTokenMalformed() Error

func InvalidIdentityTokenMissingClaim

func InvalidIdentityTokenMissingClaim(claim string) Error

func InvalidIdentityTokenMultipleAudiences

func InvalidIdentityTokenMultipleAudiences() Error

func InvalidInput

func InvalidInput(message string) Error

func InvalidPath

func InvalidPath(field string) Error

func InvalidRoleSessionName

func InvalidRoleSessionName(value string) Error

func InvalidTagKey

func InvalidTagKey(index int) Error

func InvalidTagValue

func InvalidTagValue(index int) Error

func InvalidUserName

func InvalidUserName(field string) Error

func MalformedInput

func MalformedInput() Error

func MalformedPolicyDocument

func MalformedPolicyDocument(message string) Error

func MaxSessionDurationTooHigh

func MaxSessionDurationTooHigh() Error

func MaxSessionDurationTooLow

func MaxSessionDurationTooLow() Error

func MissingParameter

func MissingParameter(parameter string) Error

func MissingTagKey

func MissingTagKey(index int) Error

MissingTagKey reports a Tags member supplying a Value with no Key.

func MissingTagValue

func MissingTagValue(index int) Error

MissingTagValue reports a Tags member supplying a Key with no Value. A tag value may be empty, but the parameter itself must be present.

func MissingValue

func MissingValue(field string) Error

func MustSpecifyUserName

func MustSpecifyUserName() Error

func NoSuchEntityAccessKey

func NoSuchEntityAccessKey(accessKeyID string) Error

func NoSuchEntityOIDCProviderDelete

func NoSuchEntityOIDCProviderDelete(arn string) Error

NoSuchEntityOIDCProviderDelete is the wording DeleteOpenIDConnectProvider and the provider tagging actions use, distinct from the one NoSuchEntityOIDCProviderGet reports.

func NoSuchEntityOIDCProviderGet

func NoSuchEntityOIDCProviderGet(arn string) Error

func NoSuchEntityRole

func NoSuchEntityRole(roleName string) Error

func NoSuchEntityRolePolicy

func NoSuchEntityRolePolicy(roleName, policyName string) Error

func NoSuchEntityUser

func NoSuchEntityUser(userName string) Error

func NoSuchEntityUserPolicy

func NoSuchEntityUserPolicy(userName, policyName string) Error

func OIDCProvidersPerAccountLimitExceeded

func OIDCProvidersPerAccountLimitExceeded(max int) Error

func OpenIdIdpCommunicationError

func OpenIdIdpCommunicationError(url string) Error

func PathTooLong

func PathTooLong(field string, maxLength int) Error

func SignatureDoesNotMatchExpired

func SignatureDoesNotMatchExpired(requestTime, serverTime time.Time, allowedSkew time.Duration) Error

func SignatureDoesNotMatchNotYetCurrent

func SignatureDoesNotMatchNotYetCurrent(requestTime, serverTime time.Time, allowedSkew time.Duration) Error

func TagKeyTooLong

func TagKeyTooLong(index int) Error

func TagKeyTooShort

func TagKeyTooShort(index int) Error

TagKeyTooShort reports an empty tag key

func TagValueTooLong

func TagValueTooLong(index int) Error

func ThumbprintListEmpty

func ThumbprintListEmpty() Error

func ThumbprintListTooLong

func ThumbprintListTooLong(max int) Error

func TrustPolicySizeLimitExceeded

func TrustPolicySizeLimitExceeded(maxBytes int) Error

func UnsupportedParameter

func UnsupportedParameter(parameter string) Error

func UserNameTooLong

func UserNameTooLong(field string, maxLength int) Error

func ValidationError

func ValidationError(message string) Error

func ValueTooLong

func ValueTooLong(field string, maxLength int) Error

func ValueTooShort

func ValueTooShort(field string, minLength int) Error

func (Error) Error

func (e Error) Error() string

func (Error) StatusCode

func (e Error) StatusCode() int

func (Error) XMLBody

func (e Error) XMLBody(requestID string) []byte

type ErrorCode

type ErrorCode int
const (
	ErrInternalFailure ErrorCode = iota

	ErrSignatureDoesNotMatch
	ErrMissingAuthenticationToken
	ErrIncompleteSignature
	ErrUnsupportedSignatureVersion
	ErrMissingAuthorizationComponents
	ErrIncorrectService
	ErrInvalidCredentialDate
	ErrInvalidTerminal
	ErrUnsupportedQueryAlgorithm
	ErrInvalidRegion
	ErrMissingHostSignedHeader
	ErrInvalidClientTokenID
	ErrInvalidContentLength
	ErrThrottling
	ErrTooManyTags
	ErrTooManyTagKeys
	ErrInvalidTagKeys
	ErrTagLimitExceeded
	ErrInvalidPathPrefix
	ErrDuplicateTagKeys
	ErrDuplicateExactTagKeys
	ErrInvalidAccessKeyIDChars
	ErrDeleteConflict
	ErrDeleteConflictPolicies
	ErrMaxItemsTooLow
	ErrMaxItemsTooHigh
)

type ErrorType

type ErrorType string
const (
	TypeSender   ErrorType = "Sender"
	TypeReceiver ErrorType = "Receiver"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL