awserrors

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AuthFailure                = "AuthFailure"
	InUseIPAddress             = "InvalidIPAddress.InUse"
	GroupNotFound              = "InvalidGroup.NotFound"
	PermissionNotFound         = "InvalidPermission.NotFound"
	VPCNotFound                = "InvalidVpcID.NotFound"
	SubnetNotFound             = "InvalidSubnetID.NotFound"
	InternetGatewayNotFound    = "InvalidInternetGatewayID.NotFound"
	NATGatewayNotFound         = "InvalidNatGatewayID.NotFound"
	GatewayNotFound            = "InvalidGatewayID.NotFound"
	EIPNotFound                = "InvalidElasticIpID.NotFound"
	RouteTableNotFound         = "InvalidRouteTableID.NotFound"
	LoadBalancerNotFound       = "LoadBalancerNotFound"
	ResourceNotFound           = "InvalidResourceID.NotFound"
	InvalidSubnet              = "InvalidSubnet"
	AssociationIDNotFound      = "InvalidAssociationID.NotFound"
	InvalidInstanceID          = "InvalidInstanceID.NotFound"
	LaunchTemplateNameNotFound = "InvalidLaunchTemplateName.NotFoundException"
	ResourceExists             = "ResourceExistsException"
	NoCredentialProviders      = "NoCredentialProviders"
)

Error singletons for AWS errors.

Variables

This section is empty.

Functions

func Code

func Code(err error) (string, bool)

Code returns the AWS error code as a string.

func IsConflict

func IsConflict(err error) bool

IsConflict returns true if the error was created by NewConflict.

func IsFailedDependency

func IsFailedDependency(err error) bool

IsFailedDependency checks if the error is pf http.StatusFailedDependency.

func IsIgnorableSecurityGroupError

func IsIgnorableSecurityGroupError(err error) error

IsIgnorableSecurityGroupError checks for errors in SG that can be ignored and then return nil.

func IsInvalidNotFoundError

func IsInvalidNotFoundError(err error) bool

IsInvalidNotFoundError tests for common aws not found errors.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the error was created by NewNotFound.

func IsResourceExists added in v0.4.10

func IsResourceExists(err error) bool

IsResourceExists checks the state of the resource.

func IsSDKError

func IsSDKError(err error) (ok bool)

IsSDKError returns true if the error is of type awserr.Error.

func Message

func Message(err error) string

Message returns the AWS error message as a string.

func NewConflict

func NewConflict(msg string) error

NewConflict returns an error which indicates that the request cannot be processed due to a conflict.

func NewFailedDependency

func NewFailedDependency(msg string) error

NewFailedDependency returns an error which indicates that a dependency failure status.

func NewNotFound

func NewNotFound(msg string) error

NewNotFound returns an error which indicates that the resource of the kind and the name was not found.

func ReasonForError

func ReasonForError(err error) int

ReasonForError returns the HTTP status for a particular error.

Types

type EC2Error

type EC2Error struct {
	Code int
	// contains filtered or unexported fields
}

EC2Error is an error exposed to users of this library.

func (*EC2Error) Error

func (e *EC2Error) Error() string

Error implements the Error interface.

Jump to

Keyboard shortcuts

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