2017-01-19 15:08:56 +01:00
|
|
|
package alicloud
|
|
|
|
|
2017-04-18 14:18:57 +02:00
|
|
|
import "github.com/denverdino/aliyungo/common"
|
|
|
|
|
2017-01-19 15:08:56 +01:00
|
|
|
const (
|
|
|
|
// common
|
|
|
|
Notfound = "Not found"
|
|
|
|
// ecs
|
|
|
|
InstanceNotfound = "Instance.Notfound"
|
|
|
|
// disk
|
|
|
|
DiskIncorrectStatus = "IncorrectDiskStatus"
|
|
|
|
DiskCreatingSnapshot = "DiskCreatingSnapshot"
|
|
|
|
InstanceLockedForSecurity = "InstanceLockedForSecurity"
|
2017-03-24 12:04:56 +01:00
|
|
|
SystemDiskNotFound = "SystemDiskNotFound"
|
2017-01-19 15:08:56 +01:00
|
|
|
// 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"
|
2017-04-18 14:18:57 +02:00
|
|
|
NotFindSnatEntryBySnatId = "NotFindSnatEntryBySnatId"
|
|
|
|
NotFindForwardEntryByForwardId = "NotFindForwardEntryByForwardId"
|
2017-01-19 15:08:56 +01:00
|
|
|
|
|
|
|
// vswitch
|
|
|
|
VswitcInvalidRegionId = "InvalidRegionId.NotFound"
|
2017-04-18 14:18:57 +02:00
|
|
|
|
|
|
|
// ess
|
|
|
|
InvalidScalingGroupIdNotFound = "InvalidScalingGroupId.NotFound"
|
|
|
|
IncorrectScalingConfigurationLifecycleState = "IncorrectScalingConfigurationLifecycleState"
|
2017-06-05 19:24:25 +02:00
|
|
|
|
|
|
|
//unknown Error
|
|
|
|
UnknownError = "UnknownError"
|
2017-01-19 15:08:56 +01:00
|
|
|
)
|
2017-04-18 14:18:57 +02:00
|
|
|
|
|
|
|
func GetNotFoundErrorFromString(str string) error {
|
|
|
|
return &common.Error{
|
|
|
|
ErrorResponse: common.ErrorResponse{
|
|
|
|
Code: InstanceNotfound,
|
|
|
|
Message: str,
|
|
|
|
},
|
|
|
|
StatusCode: -1,
|
|
|
|
}
|
|
|
|
}
|