53 lines
1.6 KiB
Go
53 lines
1.6 KiB
Go
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"
|
|
|
|
//unknown Error
|
|
UnknownError = "UnknownError"
|
|
)
|
|
|
|
func GetNotFoundErrorFromString(str string) error {
|
|
return &common.Error{
|
|
ErrorResponse: common.ErrorResponse{
|
|
Code: InstanceNotfound,
|
|
Message: str,
|
|
},
|
|
StatusCode: -1,
|
|
}
|
|
}
|