package alicloud import "github.com/denverdino/aliyungo/common" const ( // common Notfound = "Not found" // ecs InstanceNotfound = "Instance.Notfound" // disk DiskIncorrectStatus = "IncorrectDiskStatus" DiskCreatingSnapshot = "DiskCreatingSnapshot" InstanceLockedForSecurity = "InstanceLockedForSecurity" SystemDiskNotFound = "SystemDiskNotFound" // eip EipIncorrectStatus = "IncorrectEipStatus" InstanceIncorrectStatus = "IncorrectInstanceStatus" HaVipIncorrectStatus = "IncorrectHaVipStatus" // slb LoadBalancerNotFound = "InvalidLoadBalancerId.NotFound" // security_group InvalidInstanceIdAlreadyExists = "InvalidInstanceId.AlreadyExists" InvalidSecurityGroupIdNotFound = "InvalidSecurityGroupId.NotFound" SgDependencyViolation = "DependencyViolation" //Nat gateway NatGatewayInvalidRegionId = "Invalid.RegionId" DependencyViolationBandwidthPackages = "DependencyViolation.BandwidthPackages" NotFindSnatEntryBySnatId = "NotFindSnatEntryBySnatId" NotFindForwardEntryByForwardId = "NotFindForwardEntryByForwardId" // vswitch VswitcInvalidRegionId = "InvalidRegionId.NotFound" // ess InvalidScalingGroupIdNotFound = "InvalidScalingGroupId.NotFound" IncorrectScalingConfigurationLifecycleState = "IncorrectScalingConfigurationLifecycleState" ) func GetNotFoundErrorFromString(str string) error { return &common.Error{ ErrorResponse: common.ErrorResponse{ Code: InstanceNotfound, Message: str, }, StatusCode: -1, } }