ecs

package
Version: v0.0.0-...-112a489 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const (
	// ECSDefaultEndpoint is the default API endpoint of ECS services
	ECSDefaultEndpoint = "https://ecs-cn-hangzhou.aliyuncs.com"
	ECSAPIVersion      = "2014-05-26"
)
View Source
const (
	DiskTypeAll       = DiskType("all") //Default
	DiskTypeAllSystem = DiskType("system")
	DiskTypeAllData   = DiskType("data")
)
View Source
const (
	DiskCategoryAll             = DiskCategory("all") //Default
	DiskCategoryCloud           = DiskCategory("cloud")
	DiskCategoryEphemeral       = DiskCategory("ephemeral")
	DiskCategoryEphemeralSSD    = DiskCategory("ephemeral_ssd")
	DiskCategoryCloudEfficiency = DiskCategory("cloud_efficiency")
	DiskCategoryCloudSSD        = DiskCategory("cloud_ssd")
)
View Source
const (
	DiskStatusInUse     = DiskStatus("In_use")
	DiskStatusAvailable = DiskStatus("Available")
	DiskStatusAttaching = DiskStatus("Attaching")
	DiskStatusDetaching = DiskStatus("Detaching")
	DiskStatusCreating  = DiskStatus("Creating")
	DiskStatusReIniting = DiskStatus("ReIniting")
	DiskStatusAll       = DiskStatus("All") //Default
)
View Source
const (
	PrePaid  = DiskChargeType("PrePaid")
	PostPaid = DiskChargeType("PostPaid")
)
View Source
const (
	ImageOwnerSystem      = ImageOwnerAlias("system")
	ImageOwnerSelf        = ImageOwnerAlias("self")
	ImageOwnerOthers      = ImageOwnerAlias("others")
	ImageOwnerMarketplace = ImageOwnerAlias("marketplace")
	ImageOwnerDefault     = ImageOwnerAlias("") //Return the values for system, self, and others
)

Constants of image owner

View Source
const (
	ImageStatusAvailable    = ImageStatus("Available")
	ImageStatusUnAvailable  = ImageStatus("UnAvailable")
	ImageStatusCreating     = ImageStatus("Creating")
	ImageStatusCreateFailed = ImageStatus("CreateFailed")
)
View Source
const (
	Creating = InstanceStatus("Creating")
	Running  = InstanceStatus("Running")
	Starting = InstanceStatus("Starting")

	Stopped  = InstanceStatus("Stopped")
	Stopping = InstanceStatus("Stopping")
)

Constants of InstanceStatus

View Source
const (
	LockReasonFinancial = LockReason("financial")
	LockReasonSecurity  = LockReason("security")
)
View Source
const (
	EipStatusAssociating   = EipStatus("Associating")
	EipStatusUnassociating = EipStatus("Unassociating")
	EipStatusInUse         = EipStatus("InUse")
	EipStatusAvailable     = EipStatus("Available")
)
View Source
const (
	RouteTableSystem = RouteTableType("System")
	RouteTableCustom = RouteTableType("Custom")
)
View Source
const (
	RouteEntryStatusPending   = RouteEntryStatus("Pending")
	RouteEntryStatusAvailable = RouteEntryStatus("Available")
	RouteEntryStatusModifying = RouteEntryStatus("Modifying")
)
View Source
const (
	NextHopIntance = NextHopType("Instance") //Default
	NextHopTunnel  = NextHopType("Tunnel")
)
View Source
const (
	NicTypeInternet = NicType("internet")
	NicTypeIntranet = NicType("intranet")
)
View Source
const (
	IpProtocolAll  = IpProtocol("all")
	IpProtocolTCP  = IpProtocol("tcp")
	IpProtocolUDP  = IpProtocol("udp")
	IpProtocolICMP = IpProtocol("icmp")
	IpProtocolGRE  = IpProtocol("gre")
)
View Source
const (
	PermissionPolicyAccept = PermissionPolicy("accept")
	PermissionPolicyDrop   = PermissionPolicy("drop")
)
View Source
const (
	TagResourceImage    = TagResourceType("image")
	TagResourceInstance = TagResourceType("instance")
	TagResourceSnapshot = TagResourceType("snapshot")
	TagResourceDisk     = TagResourceType("disk")
)
View Source
const (
	VpcStatusPending   = VpcStatus("Pending")
	VpcStatusAvailable = VpcStatus("Available")
)
View Source
const (
	VSwitchStatusPending   = VSwitchStatus("Pending")
	VSwitchStatusAvailable = VSwitchStatus("Available")
)
View Source
const (
	ResourceTypeInstance            = ResourceType("Instance")
	ResourceTypeDisk                = ResourceType("Disk")
	ResourceTypeVSwitch             = ResourceType("VSwitch")
	ResourceTypeIOOptimizedInstance = ResourceType("IoOptimized")
)
View Source
const DefaultTimeout = 60

Default timeout value for WaitForXXX method

View Source
const DefaultWaitForInterval = 5

Interval for checking status in WaitForXXX method

View Source
const ImageDefaultTimeout = 120

Default timeout value for WaitForImageReady method

View Source
const InstanceDefaultTimeout = 120

Default timeout value for WaitForInstance method

View Source
const SnapshotDefaultTimeout = 120

Default timeout value for WaitForSnapShotReady method

Variables

View Source
var (
	IoOptimizedNone      = IoOptimized("none")
	IoOptimizedOptimized = IoOptimized("optimized")
)

Functions

This section is empty.

Types

type AccountType

type AccountType struct {
	AliyunId string
}

type AddTagsArgs

type AddTagsArgs struct {
	ResourceId   string
	ResourceType TagResourceType //image, instance, snapshot or disk
	RegionId     common.Region
	Tag          map[string]string
}

type AddTagsResponse

type AddTagsResponse struct {
	common.Response
}

type AllocateEipAddressArgs

type AllocateEipAddressArgs struct {
	RegionId           common.Region
	Bandwidth          int
	InternetChargeType common.InternetChargeType
	ClientToken        string
}

type AllocateEipAddressResponse

type AllocateEipAddressResponse struct {
	common.Response
	EipAddress   string
	AllocationId string
}

type AllocatePublicIpAddressArgs

type AllocatePublicIpAddressArgs struct {
	InstanceId string
}

type AllocatePublicIpAddressResponse

type AllocatePublicIpAddressResponse struct {
	common.Response

	IpAddress string
}

type AssociateEipAddressArgs

type AssociateEipAddressArgs struct {
	AllocationId string
	InstanceId   string
}

type AssociateEipAddressResponse

type AssociateEipAddressResponse struct {
	common.Response
}

type AttachDiskArgs

type AttachDiskArgs struct {
	InstanceId         string
	DiskId             string
	Device             string
	DeleteWithInstance bool
}

type AttachDiskResponse

type AttachDiskResponse struct {
	common.Response
}

type AuthorizeSecurityGroupArgs

type AuthorizeSecurityGroupArgs struct {
	SecurityGroupId         string
	RegionId                common.Region
	IpProtocol              IpProtocol
	PortRange               string
	SourceGroupId           string
	SourceGroupOwnerAccount string
	SourceCidrIp            string           // IPv4 only, default 0.0.0.0/0
	Policy                  PermissionPolicy // enum of accept (default) | drop
	Priority                int              // 1 - 100, default 1
	NicType                 NicType          // enum of internet | intranet (default)
}

type AuthorizeSecurityGroupResponse

type AuthorizeSecurityGroupResponse struct {
	common.Response
}

type AvailableDiskCategoriesType

type AvailableDiskCategoriesType struct {
	DiskCategories []DiskCategory //enum for cloud, ephemeral, ephemeral_ssd
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&availablediskcategoriestype

type AvailableResourceCreationType

type AvailableResourceCreationType struct {
	ResourceTypes []ResourceType //enum for Instance, Disk, VSwitch
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&availableresourcecreationtype

type CancelCopyImageRequest

type CancelCopyImageRequest struct {
	ImageId string
	// contains filtered or unexported fields
}

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(accessKeyId, accessKeySecret string) *Client

NewClient creates a new instance of ECS client

func NewClientWithEndpoint

func NewClientWithEndpoint(endpoint string, accessKeyId, accessKeySecret string) *Client

func (*Client) AddTags

func (client *Client) AddTags(args *AddTagsArgs) error

AddTags Add tags to resource

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/tags&addtags

func (*Client) AllocateEipAddress

func (client *Client) AllocateEipAddress(args *AllocateEipAddressArgs) (EipAddress string, AllocationId string, err error)

AllocateEipAddress allocates Eip Address

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&allocateeipaddress

func (*Client) AllocatePublicIpAddress

func (client *Client) AllocatePublicIpAddress(instanceId string) (ipAddress string, err error)

AllocatePublicIpAddress allocates Public Ip Address

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&allocatepublicipaddress

func (*Client) AssociateEipAddress

func (client *Client) AssociateEipAddress(allocationId string, instanceId string) error

AssociateEipAddress associates EIP address to VM instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&associateeipaddress

func (*Client) AttachDisk

func (client *Client) AttachDisk(args *AttachDiskArgs) error

AttachDisk attaches disk to instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&attachdisk

func (*Client) AuthorizeSecurityGroup

func (client *Client) AuthorizeSecurityGroup(args *AuthorizeSecurityGroupArgs) error

AuthorizeSecurityGroup authorize permissions to security group

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/securitygroup&authorizesecuritygroup

func (*Client) CancelCopyImage

func (client *Client) CancelCopyImage(regionId common.Region, imageId string) error

You can read doc at https://help.aliyun.com/document_detail/25539.html

func (*Client) CopyImage

func (client *Client) CopyImage(args *CopyImageArgs) (string, error)

You can read doc at https://help.aliyun.com/document_detail/25538.html

func (*Client) CreateDisk

func (client *Client) CreateDisk(args *CreateDiskArgs) (diskId string, err error)

CreateDisk creates a new disk

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&createdisk

func (*Client) CreateImage

func (client *Client) CreateImage(args *CreateImageArgs) (imageId string, err error)

CreateImage creates a new image

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/image&createimage

func (*Client) CreateInstance

func (client *Client) CreateInstance(args *CreateInstanceArgs) (instanceId string, err error)

CreateInstance creates instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&createinstance

func (*Client) CreateRouteEntry

func (client *Client) CreateRouteEntry(args *CreateRouteEntryArgs) error

CreateRouteEntry creates route entry

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/routertable&createrouteentry

func (*Client) CreateSecurityGroup

func (client *Client) CreateSecurityGroup(args *CreateSecurityGroupArgs) (securityGroupId string, err error)

CreateSecurityGroup creates security group

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/securitygroup&createsecuritygroup

func (*Client) CreateSnapshot

func (client *Client) CreateSnapshot(args *CreateSnapshotArgs) (snapshotId string, err error)

CreateSnapshot creates a new snapshot

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/snapshot&createsnapshot

func (*Client) CreateVSwitch

func (client *Client) CreateVSwitch(args *CreateVSwitchArgs) (vswitchId string, err error)

CreateVSwitch creates Virtual Switch

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vswitch&createvswitch

func (*Client) CreateVpc

func (client *Client) CreateVpc(args *CreateVpcArgs) (resp *CreateVpcResponse, err error)

CreateVpc creates Virtual Private Cloud

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vpc&createvpc

func (*Client) DeleteDisk

func (client *Client) DeleteDisk(diskId string) error

DeleteDisk deletes disk

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&deletedisk

func (*Client) DeleteImage

func (client *Client) DeleteImage(regionId common.Region, imageId string) error

DeleteImage deletes Image

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/image&deleteimage

func (*Client) DeleteInstance

func (client *Client) DeleteInstance(instanceId string) error

DeleteInstance deletes instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&deleteinstance

Example
fmt.Printf("Delete Instance Example")

client := NewTestClient()

err := client.DeleteInstance(TestInstanceId)

if err != nil {
	fmt.Printf("Failed to delete Instance %s vnc url: %v \n", TestInstanceId, err)
}
Output:

func (*Client) DeleteRouteEntry

func (client *Client) DeleteRouteEntry(args *DeleteRouteEntryArgs) error

DeleteRouteEntry deletes route entry

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/routertable&deleterouteentry

func (*Client) DeleteSecurityGroup

func (client *Client) DeleteSecurityGroup(regionId common.Region, securityGroupId string) error

DeleteSecurityGroup deletes security group

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/securitygroup&deletesecuritygroup

func (*Client) DeleteSnapshot

func (client *Client) DeleteSnapshot(snapshotId string) error

DeleteSnapshot deletes snapshot

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/snapshot&deletesnapshot

func (*Client) DeleteVSwitch

func (client *Client) DeleteVSwitch(VSwitchId string) error

DeleteVSwitch deletes Virtual Switch

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vswitch&deletevswitch

func (*Client) DeleteVpc

func (client *Client) DeleteVpc(vpcId string) error

DeleteVpc deletes Virtual Private Cloud

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vpc&deletevpc

func (*Client) DescribeDiskMonitorData

func (client *Client) DescribeDiskMonitorData(args *DescribeDiskMonitorDataArgs) (monitorData []DiskMonitorDataType, totalCount int, err error)

DescribeDiskMonitorData describes disk monitoring data

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/monitor&describediskmonitordata

func (*Client) DescribeDisks

func (client *Client) DescribeDisks(args *DescribeDisksArgs) (disks []DiskItemType, pagination *common.PaginationResult, err error)

DescribeDisks describes Disks

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&describedisks

func (*Client) DescribeEipAddresses

func (client *Client) DescribeEipAddresses(args *DescribeEipAddressesArgs) (eipAddresses []EipAddressSetType, pagination *common.PaginationResult, err error)

DescribeInstanceStatus describes instance status

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&describeeipaddresses

func (*Client) DescribeEipMonitorData

func (client *Client) DescribeEipMonitorData(args *DescribeEipMonitorDataArgs) (monitorData []EipMonitorDataType, err error)

DescribeEipMonitorData describes EIP monitoring data

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/monitor&describeeipmonitordata

func (*Client) DescribeImageSharePermission

func (client *Client) DescribeImageSharePermission(args *ModifyImageSharePermissionArgs) (*ImageSharePermissionResponse, error)

func (*Client) DescribeImages

func (client *Client) DescribeImages(args *DescribeImagesArgs) (images []ImageType, pagination *common.PaginationResult, err error)

DescribeImages describes images

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/image&describeimages

func (*Client) DescribeInstanceAttribute

func (client *Client) DescribeInstanceAttribute(instanceId string) (instance *InstanceAttributesType, err error)

DescribeInstanceAttribute describes instance attribute

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&describeinstanceattribute

Example
fmt.Printf("DescribeInstanceAttribute Example\n")

client := NewTestClient()

instanceAttributeType, err := client.DescribeInstanceAttribute(TestInstanceId)

if err != nil {
	fmt.Printf("Failed to describe Instance %s attribute: %v\n", TestInstanceId, err)
} else {
	fmt.Printf("Instance Information\n")
	fmt.Printf("InstanceId = %s \n", instanceAttributeType.InstanceId)
	fmt.Printf("InstanceName = %s \n", instanceAttributeType.InstanceName)
	fmt.Printf("HostName = %s \n", instanceAttributeType.HostName)
	fmt.Printf("ZoneId = %s \n", instanceAttributeType.ZoneId)
	fmt.Printf("RegionId = %s \n", instanceAttributeType.RegionId)
}
Output:

func (*Client) DescribeInstanceMonitorData

func (client *Client) DescribeInstanceMonitorData(args *DescribeInstanceMonitorDataArgs) (monitorData []InstanceMonitorDataType, err error)

DescribeInstanceMonitorData describes instance monitoring data

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/monitor&describeinstancemonitordata

func (*Client) DescribeInstanceStatus

func (client *Client) DescribeInstanceStatus(args *DescribeInstanceStatusArgs) (instanceStatuses []InstanceStatusItemType, pagination *common.PaginationResult, err error)

DescribeInstanceStatus describes instance status

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&describeinstancestatus

Example
fmt.Printf("DescribeInstanceStatus Example\n")

args := DescribeInstanceStatusArgs{
	RegionId: "cn-beijing",
	ZoneId:   "cn-beijing-b",
	Pagination: common.Pagination{
		PageNumber: 1,
		PageSize:   1,
	},
}

client := NewTestClient()
instanceStatus, _, err := client.DescribeInstanceStatus(&args)

if err != nil {
	fmt.Printf("Failed to describe Instance: %s status:%v \n", TestInstanceId, err)
} else {
	for i := 0; i < len(instanceStatus); i++ {
		fmt.Printf("Instance %s Status: %s \n", instanceStatus[i].InstanceId, instanceStatus[i].Status)
	}
}
Output:

func (*Client) DescribeInstanceTypes

func (client *Client) DescribeInstanceTypes() (instanceTypes []InstanceTypeItemType, err error)

DescribeInstanceTypes describes all instance types

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/other&describeinstancetypes

func (*Client) DescribeInstanceVncUrl

func (client *Client) DescribeInstanceVncUrl(args *DescribeInstanceVncUrlArgs) (string, error)

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&describeinstancevncurl

Example
fmt.Printf("DescribeInstanceVncUrl Example\n")

args := DescribeInstanceVncUrlArgs{
	RegionId:   "cn-beijing",
	InstanceId: TestInstanceId,
}

client := NewTestClient()

instanceVncUrl, err := client.DescribeInstanceVncUrl(&args)

if err != nil {
	fmt.Printf("Failed to describe Instance %s vnc url: %v \n", TestInstanceId, err)
} else {
	fmt.Printf("VNC URL = %s \n", instanceVncUrl)
}
Output:

func (*Client) DescribeInstances

func (client *Client) DescribeInstances(args *DescribeInstancesArgs) (instances []InstanceAttributesType, pagination *common.PaginationResult, err error)

DescribeInstances describes instances

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&describeinstances

func (*Client) DescribeRegions

func (client *Client) DescribeRegions() (regions []RegionType, err error)

DescribeRegions describes regions

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/region&describeregions

func (*Client) DescribeResourceByTags

func (client *Client) DescribeResourceByTags(args *DescribeResourceByTagsArgs) (resources []ResourceItemType, pagination *common.PaginationResult, err error)

DescribeResourceByTags describe resource by tags

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/tags&describeresourcebytags

func (*Client) DescribeRouteTables

func (client *Client) DescribeRouteTables(args *DescribeRouteTablesArgs) (routeTables []RouteTableSetType, pagination *common.PaginationResult, err error)

DescribeRouteTables describes Virtual Routers

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/routertable&describeroutetables

func (*Client) DescribeSecurityGroups

func (client *Client) DescribeSecurityGroups(args *DescribeSecurityGroupsArgs) (securityGroupItems []SecurityGroupItemType, pagination *common.PaginationResult, err error)

DescribeSecurityGroups describes security groups

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/securitygroup&describesecuritygroups

func (*Client) DescribeSnapshots

func (client *Client) DescribeSnapshots(args *DescribeSnapshotsArgs) (snapshots []SnapshotType, pagination *common.PaginationResult, err error)

DescribeSnapshots describe snapshots

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/snapshot&describesnapshots

func (*Client) DescribeTags

func (client *Client) DescribeTags(args *DescribeTagsArgs) (tags []TagItemType, pagination *common.PaginationResult, err error)

DescribeResourceByTags describe resource by tags

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/tags&describeresourcebytags

func (*Client) DescribeVRouters

func (client *Client) DescribeVRouters(args *DescribeVRoutersArgs) (vrouters []VRouterSetType, pagination *common.PaginationResult, err error)

DescribeVRouters describes Virtual Routers

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vrouter&describevrouters

func (*Client) DescribeVSwitches

func (client *Client) DescribeVSwitches(args *DescribeVSwitchesArgs) (vswitches []VSwitchSetType, pagination *common.PaginationResult, err error)

DescribeVSwitches describes Virtual Switches

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vswitch&describevswitches

func (*Client) DescribeVpcs

func (client *Client) DescribeVpcs(args *DescribeVpcsArgs) (vpcs []VpcSetType, pagination *common.PaginationResult, err error)

DescribeInstanceStatus describes instance status

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vpc&describevpcs

func (*Client) DescribeZones

func (client *Client) DescribeZones(regionId common.Region) (zones []ZoneType, err error)

DescribeZones describes zones

func (*Client) DetachDisk

func (client *Client) DetachDisk(instanceId string, diskId string) error

DetachDisk detaches disk from instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&detachdisk

func (*Client) JoinSecurityGroup

func (client *Client) JoinSecurityGroup(instanceId string, securityGroupId string) error

JoinSecurityGroup

You can read doc at https://help.aliyun.com/document_detail/ecs/open-api/instance/joinsecuritygroup.html

func (*Client) LeaveSecurityGroup

func (client *Client) LeaveSecurityGroup(instanceId string, securityGroupId string) error

LeaveSecurityGroup

You can read doc at https://help.aliyun.com/document_detail/ecs/open-api/instance/leavesecuritygroup.html

func (*Client) ModifyDiskAttribute

func (client *Client) ModifyDiskAttribute(args *ModifyDiskAttributeArgs) error

ModifyDiskAttribute modifies disk attribute

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&modifydiskattribute

func (*Client) ModifyEipAddressAttribute

func (client *Client) ModifyEipAddressAttribute(allocationId string, bandwidth int) error

ModifyEipAddressAttribute Modifies EIP attribute

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&modifyeipaddressattribute

func (*Client) ModifyInstanceAttribute

func (client *Client) ModifyInstanceAttribute(args *ModifyInstanceAttributeArgs) error

ModifyInstanceAttribute modify instance attrbute

You can read doc at https://help.aliyun.com/document_detail/ecs/open-api/instance/modifyinstanceattribute.html

func (*Client) ModifyInstanceNetworkSpec

func (client *Client) ModifyInstanceNetworkSpec(args *ModifyInstanceNetworkSpec) error

ModifyInstanceNetworkSpec modifies instance network spec

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&modifyinstancenetworkspec

func (*Client) ModifySecurityGroupAttribute

func (client *Client) ModifySecurityGroupAttribute(args *ModifySecurityGroupAttributeArgs) error

ModifySecurityGroupAttribute modifies attribute of security group

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/securitygroup&modifysecuritygroupattribute

func (*Client) ModifyVRouterAttribute

func (client *Client) ModifyVRouterAttribute(args *ModifyVRouterAttributeArgs) error

ModifyVRouterAttribute modifies attribute of Virtual Router

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vrouter&modifyvrouterattribute

func (*Client) ModifyVSwitchAttribute

func (client *Client) ModifyVSwitchAttribute(args *ModifyVSwitchAttributeArgs) error

ModifyVSwitchAttribute modifies attribute of Virtual Private Cloud

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vswitch&modifyvswitchattribute

func (*Client) ModifyVpcAttribute

func (client *Client) ModifyVpcAttribute(args *ModifyVpcAttributeArgs) error

ModifyVpcAttribute modifies attribute of Virtual Private Cloud

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/vpc&modifyvpcattribute

func (*Client) ReInitDisk

func (client *Client) ReInitDisk(diskId string) error

ReInitDisk reinitizes disk

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&reinitdisk

func (*Client) RebootInstance

func (client *Client) RebootInstance(instanceId string, forceStop bool) error

RebootInstance reboot instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&rebootinstance

func (*Client) ReleaseEipAddress

func (client *Client) ReleaseEipAddress(allocationId string) error

ReleaseEipAddress releases Eip address

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&releaseeipaddress

func (*Client) RemoveTags

func (client *Client) RemoveTags(args *RemoveTagsArgs) error

RemoveTags remove tags to resource

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/tags&removetags

func (*Client) ReplaceSystemDisk

func (client *Client) ReplaceSystemDisk(args *ReplaceSystemDiskArgs) (diskId string, err error)

ReplaceSystemDisk replace system disk

You can read doc at https://help.aliyun.com/document_detail/ecs/open-api/disk/replacesystemdisk.html

func (*Client) ResetDisk

func (client *Client) ResetDisk(diskId string, snapshotId string) error

ResetDisk resets disk to original status

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/disk&resetdisk

func (*Client) StartInstance

func (client *Client) StartInstance(instanceId string) error

StartInstance starts instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&startinstance

func (*Client) StopInstance

func (client *Client) StopInstance(instanceId string, forceStop bool) error

StopInstance stops instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/instance&stopinstance

Example
fmt.Printf("Stop Instance Example\n")

client := NewTestClient()

err := client.StopInstance(TestInstanceId, true)

if err != nil {
	fmt.Printf("Failed to stop Instance %s vnc url: %v \n", TestInstanceId, err)
}
Output:

func (*Client) UnassociateEipAddress

func (client *Client) UnassociateEipAddress(allocationId string, instanceId string) error

UnassociateEipAddress unallocates Eip Address from instance

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/network&unassociateeipaddress

func (*Client) WaitForAllRouteEntriesAvailable

func (client *Client) WaitForAllRouteEntriesAvailable(vrouterId string, routeTableId string, timeout int) error

WaitForAllRouteEntriesAvailable waits for all route entries to Available status

func (*Client) WaitForDisk

func (client *Client) WaitForDisk(regionId common.Region, diskId string, status DiskStatus, timeout int) error

WaitForDisk waits for disk to given status

func (*Client) WaitForEip

func (client *Client) WaitForEip(regionId common.Region, allocationId string, status EipStatus, timeout int) error

WaitForVSwitchAvailable waits for VSwitch to given status

func (*Client) WaitForImageReady

func (client *Client) WaitForImageReady(regionId common.Region, imageId string, timeout int) error

Wait Image ready

func (*Client) WaitForInstance

func (client *Client) WaitForInstance(instanceId string, status InstanceStatus, timeout int) error

WaitForInstance waits for instance to given status

func (*Client) WaitForSnapShotReady

func (client *Client) WaitForSnapShotReady(regionId common.Region, snapshotId string, timeout int) error

WaitForSnapShotReady waits for snapshot ready

func (*Client) WaitForVSwitchAvailable

func (client *Client) WaitForVSwitchAvailable(vpcId string, vswitchId string, timeout int) error

WaitForVSwitchAvailable waits for VSwitch to given status

func (*Client) WaitForVpcAvailable

func (client *Client) WaitForVpcAvailable(regionId common.Region, vpcId string, timeout int) error

WaitForInstance waits for instance to given status

type CopyImageArgs

type CopyImageArgs struct {
	RegionId               common.Region
	ImageId                string
	DestinationRegionId    common.Region
	DestinationImageName   string
	DestinationDescription string
	ClientToken            string
}

type CopyImageResponse

type CopyImageResponse struct {
	common.Response
	ImageId string
}

type CreateDiskArgs

type CreateDiskArgs struct {
	RegionId     common.Region
	ZoneId       string
	DiskName     string
	Description  string
	DiskCategory DiskCategory
	Size         int
	SnapshotId   string
	ClientToken  string
}

type CreateDisksResponse

type CreateDisksResponse struct {
	common.Response
	DiskId string
}

type CreateImageArgs

type CreateImageArgs struct {
	RegionId     common.Region
	SnapshotId   string
	ImageName    string
	ImageVersion string
	Description  string
	ClientToken  string
}

CreateImageArgs repsents arguements to create image

type CreateImageResponse

type CreateImageResponse struct {
	common.Response

	ImageId string
}

type CreateInstanceArgs

type CreateInstanceArgs struct {
	RegionId                common.Region
	ZoneId                  string
	ImageId                 string
	InstanceType            string
	SecurityGroupId         string
	InstanceName            string
	Description             string
	InternetChargeType      common.InternetChargeType
	InternetMaxBandwidthIn  int
	InternetMaxBandwidthOut int
	HostName                string
	Password                string
	IoOptimized             IoOptimized
	SystemDisk              SystemDiskType
	DataDisk                []DataDiskType
	VSwitchId               string
	PrivateIpAddress        string
	ClientToken             string
	InstanceChargeType      common.InstanceChargeType
	Period                  int
}

type CreateInstanceResponse

type CreateInstanceResponse struct {
	common.Response
	InstanceId string
}

type CreateRouteEntryArgs

type CreateRouteEntryArgs struct {
	RouteTableId         string
	DestinationCidrBlock string
	NextHopType          NextHopType
	NextHopId            string
	ClientToken          string
}

type CreateRouteEntryResponse

type CreateRouteEntryResponse struct {
	common.Response
}

type CreateSecurityGroupArgs

type CreateSecurityGroupArgs struct {
	RegionId          common.Region
	SecurityGroupName string
	Description       string
	VpcId             string
	ClientToken       string
}

type CreateSecurityGroupResponse

type CreateSecurityGroupResponse struct {
	common.Response

	SecurityGroupId string
}

type CreateSnapshotArgs

type CreateSnapshotArgs struct {
	DiskId       string
	SnapshotName string
	Description  string
	ClientToken  string
}

type CreateSnapshotResponse

type CreateSnapshotResponse struct {
	common.Response
	SnapshotId string
}

type CreateVSwitchArgs

type CreateVSwitchArgs struct {
	ZoneId      string
	CidrBlock   string
	VpcId       string
	VSwitchName string
	Description string
	ClientToken string
}

type CreateVSwitchResponse

type CreateVSwitchResponse struct {
	common.Response
	VSwitchId string
}

type CreateVpcArgs

type CreateVpcArgs struct {
	RegionId    common.Region
	CidrBlock   string //192.168.0.0/16 or 172.16.0.0/16 (default)
	VpcName     string
	Description string
	ClientToken string
}

type CreateVpcResponse

type CreateVpcResponse struct {
	common.Response
	VpcId        string
	VRouterId    string
	RouteTableId string
}

type DataDiskType

type DataDiskType struct {
	Size               int
	Category           DiskCategory //Enum cloud, ephemeral, ephemeral_ssd
	SnapshotId         string
	DiskName           string
	Description        string
	Device             string
	DeleteWithInstance bool
}

type DeleteDiskArgs

type DeleteDiskArgs struct {
	DiskId string
}

type DeleteDiskResponse

type DeleteDiskResponse struct {
	common.Response
}

type DeleteImageArgs

type DeleteImageArgs struct {
	RegionId common.Region
	ImageId  string
}

type DeleteImageResponse

type DeleteImageResponse struct {
	common.Response
}

type DeleteInstanceArgs

type DeleteInstanceArgs struct {
	InstanceId string
}

type DeleteInstanceResponse

type DeleteInstanceResponse struct {
	common.Response
}

type DeleteRouteEntryArgs

type DeleteRouteEntryArgs struct {
	RouteTableId         string
	DestinationCidrBlock string
	NextHopId            string
}

type DeleteRouteEntryResponse

type DeleteRouteEntryResponse struct {
	common.Response
}

type DeleteSecurityGroupArgs

type DeleteSecurityGroupArgs struct {
	RegionId        common.Region
	SecurityGroupId string
}

type DeleteSecurityGroupResponse

type DeleteSecurityGroupResponse struct {
	common.Response
}

type DeleteSnapshotArgs

type DeleteSnapshotArgs struct {
	SnapshotId string
}

type DeleteSnapshotResponse

type DeleteSnapshotResponse struct {
	common.Response
}

type DeleteVSwitchArgs

type DeleteVSwitchArgs struct {
	VSwitchId string
}

type DeleteVSwitchResponse

type DeleteVSwitchResponse struct {
	common.Response
}

type DeleteVpcArgs

type DeleteVpcArgs struct {
	VpcId string
}

type DeleteVpcResponse

type DeleteVpcResponse struct {
	common.Response
}

type DescribeDiskMonitorDataArgs

type DescribeDiskMonitorDataArgs struct {
	DiskId    string
	StartTime util.ISO6801Time
	EndTime   util.ISO6801Time
	Period    int //Default 60s
}

type DescribeDiskMonitorDataResponse

type DescribeDiskMonitorDataResponse struct {
	common.Response
	TotalCount  int
	MonitorData struct {
		DiskMonitorData []DiskMonitorDataType
	}
}

type DescribeDisksArgs

type DescribeDisksArgs struct {
	RegionId           common.Region
	ZoneId             string
	DiskIds            []string
	InstanceId         string
	DiskType           DiskType     //enum for all(default) | system | data
	Category           DiskCategory //enum for all(default) | cloud | ephemeral
	Status             DiskStatus   //enum for In_use | Available | Attaching | Detaching | Creating | ReIniting | All(default)
	SnapshotId         string
	Name               string
	Portable           *bool //optional
	DeleteWithInstance *bool //optional
	DeleteAutoSnapshot *bool //optional
	common.Pagination
}

A DescribeDisksArgs defines the arguments to describe disks

type DescribeDisksResponse

type DescribeDisksResponse struct {
	common.Response
	common.PaginationResult
	RegionId common.Region
	Disks    struct {
		Disk []DiskItemType
	}
}

type DescribeEipAddressesArgs

type DescribeEipAddressesArgs struct {
	RegionId     common.Region
	Status       EipStatus //enum Associating | Unassociating | InUse | Available
	EipAddress   string
	AllocationId string
	common.Pagination
}

type DescribeEipAddressesResponse

type DescribeEipAddressesResponse struct {
	common.Response
	common.PaginationResult
	EipAddresses struct {
		EipAddress []EipAddressSetType
	}
}

type DescribeEipMonitorDataArgs

type DescribeEipMonitorDataArgs struct {
	AllocationId string
	StartTime    util.ISO6801Time
	EndTime      util.ISO6801Time
	Period       int //Default 60s
}

type DescribeEipMonitorDataResponse

type DescribeEipMonitorDataResponse struct {
	common.Response
	EipMonitorDatas struct {
		EipMonitorData []EipMonitorDataType
	}
}

type DescribeImagesArgs

type DescribeImagesArgs struct {
	RegionId        common.Region
	ImageId         string
	SnapshotId      string
	ImageName       string
	Status          ImageStatus
	ImageOwnerAlias ImageOwnerAlias
	common.Pagination
}

DescribeImagesArgs repsents arguements to describe images

type DescribeImagesResponse

type DescribeImagesResponse struct {
	common.Response
	common.PaginationResult

	RegionId common.Region
	Images   struct {
		Image []ImageType
	}
}

type DescribeInstanceAttributeArgs

type DescribeInstanceAttributeArgs struct {
	InstanceId string
}

type DescribeInstanceAttributeResponse

type DescribeInstanceAttributeResponse struct {
	common.Response
	InstanceAttributesType
}

type DescribeInstanceMonitorDataArgs

type DescribeInstanceMonitorDataArgs struct {
	InstanceId string
	StartTime  util.ISO6801Time
	EndTime    util.ISO6801Time
	Period     int //Default 60s
}

type DescribeInstanceMonitorDataResponse

type DescribeInstanceMonitorDataResponse struct {
	common.Response
	MonitorData struct {
		InstanceMonitorData []InstanceMonitorDataType
	}
}

type DescribeInstanceStatusArgs

type DescribeInstanceStatusArgs struct {
	RegionId common.Region
	ZoneId   string
	common.Pagination
}

type DescribeInstanceStatusResponse

type DescribeInstanceStatusResponse struct {
	common.Response
	common.PaginationResult
	InstanceStatuses struct {
		InstanceStatus []InstanceStatusItemType
	}
}

type DescribeInstanceTypesArgs

type DescribeInstanceTypesArgs struct {
}

type DescribeInstanceTypesResponse

type DescribeInstanceTypesResponse struct {
	common.Response
	InstanceTypes struct {
		InstanceType []InstanceTypeItemType
	}
}

type DescribeInstanceVncUrlArgs

type DescribeInstanceVncUrlArgs struct {
	RegionId   common.Region
	InstanceId string
}

type DescribeInstanceVncUrlResponse

type DescribeInstanceVncUrlResponse struct {
	common.Response
	VncUrl string
}

type DescribeInstancesArgs

type DescribeInstancesArgs struct {
	RegionId            common.Region
	VpcId               string
	VSwitchId           string
	ZoneId              string
	InstanceIds         string
	InstanceNetworkType string
	InstanceName        string
	Status              InstanceStatus
	PrivateIpAddresses  string
	InnerIpAddresses    string
	PublicIpAddresses   string
	SecurityGroupId     string
	common.Pagination
}

type DescribeInstancesResponse

type DescribeInstancesResponse struct {
	common.Response
	common.PaginationResult
	Instances struct {
		Instance []InstanceAttributesType
	}
}

type DescribeRegionsArgs

type DescribeRegionsArgs struct {
}

type DescribeRegionsResponse

type DescribeRegionsResponse struct {
	common.Response
	Regions struct {
		Region []RegionType
	}
}

type DescribeResourceByTagsArgs

type DescribeResourceByTagsArgs struct {
	ResourceType TagResourceType //image, instance, snapshot or disk
	RegionId     common.Region
	Tag          map[string]string
	common.Pagination
}

type DescribeResourceByTagsResponse

type DescribeResourceByTagsResponse struct {
	common.Response
	common.PaginationResult
	Resources struct {
		Resource []ResourceItemType
	}
}

type DescribeRouteTablesArgs

type DescribeRouteTablesArgs struct {
	VRouterId    string
	RouteTableId string
	common.Pagination
}

type DescribeRouteTablesResponse

type DescribeRouteTablesResponse struct {
	common.Response
	common.PaginationResult
	RouteTables struct {
		RouteTable []RouteTableSetType
	}
}

type DescribeSecurityGroupAttributeArgs

type DescribeSecurityGroupAttributeArgs struct {
	SecurityGroupId string
	RegionId        common.Region
	NicType         NicType //enum for internet (default) |intranet
}

type DescribeSecurityGroupAttributeResponse

type DescribeSecurityGroupAttributeResponse struct {
	common.Response

	SecurityGroupId   string
	SecurityGroupName string
	RegionId          common.Region
	Description       string
	Permissions       struct {
		Permission []PermissionType
	}
	VpcId string
}

type DescribeSecurityGroupsArgs

type DescribeSecurityGroupsArgs struct {
	RegionId common.Region
	VpcId    string
	common.Pagination
}

type DescribeSecurityGroupsResponse

type DescribeSecurityGroupsResponse struct {
	common.Response
	common.PaginationResult

	RegionId       common.Region
	SecurityGroups struct {
		SecurityGroup []SecurityGroupItemType
	}
}

type DescribeSnapshotsArgs

type DescribeSnapshotsArgs struct {
	RegionId    common.Region
	InstanceId  string
	DiskId      string
	SnapshotIds []string //["s-xxxxxxxxx", "s-yyyyyyyyy", ..."s-zzzzzzzzz"]
	common.Pagination
}

type DescribeSnapshotsResponse

type DescribeSnapshotsResponse struct {
	common.Response
	common.PaginationResult
	Snapshots struct {
		Snapshot []SnapshotType
	}
}

type DescribeTagsArgs

type DescribeTagsArgs struct {
	RegionId     common.Region
	ResourceType TagResourceType //image, instance, snapshot or disk
	ResourceId   string
	Tag          map[string]string
	common.Pagination
}

type DescribeTagsResponse

type DescribeTagsResponse struct {
	common.Response
	common.PaginationResult
	Tags struct {
		Tag []TagItemType
	}
}

type DescribeVRoutersArgs

type DescribeVRoutersArgs struct {
	VRouterId string
	RegionId  common.Region
	common.Pagination
}

type DescribeVRoutersResponse

type DescribeVRoutersResponse struct {
	common.Response
	common.PaginationResult
	VRouters struct {
		VRouter []VRouterSetType
	}
}

type DescribeVSwitchesArgs

type DescribeVSwitchesArgs struct {
	VpcId     string
	VSwitchId string
	ZoneId    string
	common.Pagination
}

type DescribeVSwitchesResponse

type DescribeVSwitchesResponse struct {
	common.Response
	common.PaginationResult
	VSwitches struct {
		VSwitch []VSwitchSetType
	}
}

type DescribeVpcsArgs

type DescribeVpcsArgs struct {
	VpcId    string
	RegionId common.Region
	common.Pagination
}

type DescribeVpcsResponse

type DescribeVpcsResponse struct {
	common.Response
	common.PaginationResult
	Vpcs struct {
		Vpc []VpcSetType
	}
}

type DescribeZonesArgs

type DescribeZonesArgs struct {
	RegionId common.Region
}

type DescribeZonesResponse

type DescribeZonesResponse struct {
	common.Response
	Zones struct {
		Zone []ZoneType
	}
}

type DetachDiskArgs

type DetachDiskArgs struct {
	InstanceId string
	DiskId     string
}

type DetachDiskResponse

type DetachDiskResponse struct {
	common.Response
}

type DiskCategory

type DiskCategory string

Categories of disks

type DiskChargeType

type DiskChargeType string

Charge type of disks

type DiskDeviceMapping

type DiskDeviceMapping struct {
	SnapshotId string
	//Why Size Field is string-type.
	Size   string
	Device string
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&diskdevicemapping

type DiskItemType

type DiskItemType struct {
	DiskId             string
	RegionId           common.Region
	ZoneId             string
	DiskName           string
	Description        string
	Type               DiskType
	Category           DiskCategory
	Size               int
	ImageId            string
	SourceSnapshotId   string
	ProductCode        string
	Portable           bool
	Status             DiskStatus
	OperationLocks     OperationLocksType
	InstanceId         string
	Device             string
	DeleteWithInstance bool
	DeleteAutoSnapshot bool
	EnableAutoSnapshot bool
	CreationTime       util.ISO6801Time
	AttachedTime       util.ISO6801Time
	DetachedTime       util.ISO6801Time
	DiskChargeType     DiskChargeType
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&diskitemtype

type DiskMonitorDataType

type DiskMonitorDataType struct {
	DiskId    string
	IOPSRead  int
	IOPSWrite int
	IOPSTotal int
	BPSRead   int
	BPSWrite  int
	BPSTotal  int
	TimeStamp util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&diskmonitordatatype

type DiskStatus

type DiskStatus string

Status of disks

type DiskType

type DiskType string

Types of disks

type EipAddressAssociateType

type EipAddressAssociateType struct {
	AllocationId       string
	IpAddress          string
	Bandwidth          int
	InternetChargeType common.InternetChargeType
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&eipaddressassociatetype

type EipAddressSetType

type EipAddressSetType struct {
	RegionId           common.Region
	IpAddress          string
	AllocationId       string
	Status             EipStatus
	InstanceId         string
	Bandwidth          string // Why string
	InternetChargeType common.InternetChargeType
	OperationLocks     OperationLocksType
	AllocationTime     util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&eipaddresssettype

type EipMonitorDataType

type EipMonitorDataType struct {
	EipRX        int
	EipTX        int
	EipFlow      int
	EipBandwidth int
	EipPackets   int
	TimeStamp    util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&eipmonitordatatype

type EipStatus

type EipStatus string

Status of disks

type ImageOwnerAlias

type ImageOwnerAlias string

ImageOwnerAlias represents image owner

type ImageSharePermissionResponse

type ImageSharePermissionResponse struct {
	common.Response
	ImageId  string
	RegionId string
	Accounts struct {
		Account []AccountType
	}
	TotalCount int
	PageNumber int
	PageSize   int
}

type ImageStatus

type ImageStatus string

type ImageType

type ImageType struct {
	ImageId            string
	ImageVersion       string
	Architecture       string
	ImageName          string
	Description        string
	Size               int
	ImageOwnerAlias    string
	OSName             string
	DiskDeviceMappings struct {
		DiskDeviceMapping []DiskDeviceMapping
	}
	ProductCode  string
	IsSubscribed bool
	Progress     string
	Status       ImageStatus
	CreationTime util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&imagetype

type InstanceAttributesType

type InstanceAttributesType struct {
	InstanceId         string
	InstanceName       string
	Description        string
	ImageId            string
	RegionId           common.Region
	ZoneId             string
	CPU                int
	Memory             int
	ClusterId          string
	InstanceType       string
	InstanceTypeFamily string
	HostName           string
	SerialNumber       string
	Status             InstanceStatus
	OperationLocks     OperationLocksType
	SecurityGroupIds   struct {
		SecurityGroupId []string
	}
	PublicIpAddress         IpAddressSetType
	InnerIpAddress          IpAddressSetType
	InstanceNetworkType     string //enum Classic | Vpc
	InternetMaxBandwidthIn  int
	InternetMaxBandwidthOut int
	InternetChargeType      common.InternetChargeType
	CreationTime            util.ISO6801Time //time.Time
	VpcAttributes           VpcAttributesType
	EipAddress              EipAddressAssociateType
	IoOptimized             StringOrBool
	InstanceChargeType      common.InternetChargeType
	ExpiredTime             util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&instanceattributestype

type InstanceMonitorDataType

type InstanceMonitorDataType struct {
	InstanceId        string
	CPU               int
	IntranetRX        int
	IntranetTX        int
	IntranetBandwidth int
	InternetRX        int
	InternetTX        int
	InternetBandwidth int
	IOPSRead          int
	IOPSWrite         int
	BPSRead           int
	BPSWrite          int
	TimeStamp         util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&instancemonitordatatype

type InstanceStatus

type InstanceStatus string

InstanceStatus represents instance status

type InstanceStatusItemType

type InstanceStatusItemType struct {
	InstanceId string
	Status     InstanceStatus
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&instancestatusitemtype

type InstanceTypeItemType

type InstanceTypeItemType struct {
	InstanceTypeId     string
	CpuCoreCount       int
	MemorySize         float64
	InstanceTypeFamily string
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&instancetypeitemtype

type IoOptimized

type IoOptimized string

type IpAddressSetType

type IpAddressSetType struct {
	IpAddress []string
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&ipaddresssettype

type IpProtocol

type IpProtocol string

type LockReason

type LockReason string

type LockReasonType

type LockReasonType struct {
	LockReason LockReason
}

type ModifyDiskAttributeArgs

type ModifyDiskAttributeArgs struct {
	DiskId             string
	DiskName           string
	Description        string
	DeleteWithInstance *bool
	DeleteAutoSnapshot *bool
	EnableAutoSnapshot *bool
}

type ModifyDiskAttributeResponse

type ModifyDiskAttributeResponse struct {
	common.Response
}

type ModifyEipAddressAttributeArgs

type ModifyEipAddressAttributeArgs struct {
	AllocationId string
	Bandwidth    int
}

type ModifyEipAddressAttributeResponse

type ModifyEipAddressAttributeResponse struct {
	common.Response
}

type ModifyImageSharePermissionArgs

type ModifyImageSharePermissionArgs struct {
	RegionId      common.Region
	ImageId       string
	AddAccount    []string
	RemoveAccount []string
}

ModifyImageSharePermission repsents arguements to share image

type ModifyInstanceAttributeArgs

type ModifyInstanceAttributeArgs struct {
	InstanceId   string
	InstanceName string
	Description  string
	Password     string
	HostName     string
}

type ModifyInstanceAttributeResponse

type ModifyInstanceAttributeResponse struct {
	common.Response
}

type ModifyInstanceNetworkSpec

type ModifyInstanceNetworkSpec struct {
	InstanceId              string
	InternetMaxBandwidthOut *int
	InternetMaxBandwidthIn  *int
}

type ModifyInstanceNetworkSpecResponse

type ModifyInstanceNetworkSpecResponse struct {
	common.Response
}

type ModifySecurityGroupAttributeArgs

type ModifySecurityGroupAttributeArgs struct {
	RegionId          common.Region
	SecurityGroupId   string
	SecurityGroupName string
	Description       string
}

type ModifySecurityGroupAttributeResponse

type ModifySecurityGroupAttributeResponse struct {
	common.Response
}

type ModifyVRouterAttributeArgs

type ModifyVRouterAttributeArgs struct {
	VRouterId   string
	VRouterName string
	Description string
}

type ModifyVRouterAttributeResponse

type ModifyVRouterAttributeResponse struct {
	common.Response
}

type ModifyVSwitchAttributeArgs

type ModifyVSwitchAttributeArgs struct {
	VSwitchId   string
	VSwitchName string
	Description string
}

type ModifyVSwitchAttributeResponse

type ModifyVSwitchAttributeResponse struct {
	common.Response
}

type ModifyVpcAttributeArgs

type ModifyVpcAttributeArgs struct {
	VpcId       string
	VpcName     string
	Description string
}

type ModifyVpcAttributeResponse

type ModifyVpcAttributeResponse struct {
	common.Response
}

type NextHopType

type NextHopType string

type NicType

type NicType string

type OperationLocksType

type OperationLocksType struct {
	LockReason []LockReasonType //enum for financial, security
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&operationlockstype

type PermissionPolicy

type PermissionPolicy string

type PermissionType

type PermissionType struct {
	IpProtocol              IpProtocol
	PortRange               string
	SourceCidrIp            string
	SourceGroupId           string
	SourceGroupOwnerAccount string
	Policy                  PermissionPolicy
	NicType                 NicType
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&permissiontype

type ReInitDiskArgs

type ReInitDiskArgs struct {
	DiskId string
}

type ReInitDiskResponse

type ReInitDiskResponse struct {
	common.Response
}

type RebootInstanceArgs

type RebootInstanceArgs struct {
	InstanceId string
	ForceStop  bool
}

type RebootInstanceResponse

type RebootInstanceResponse struct {
	common.Response
}

type RegionType

type RegionType struct {
	RegionId  common.Region
	LocalName string
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&regiontype

type ReleaseEipAddressArgs

type ReleaseEipAddressArgs struct {
	AllocationId string
}

type ReleaseEipAddressResponse

type ReleaseEipAddressResponse struct {
	common.Response
}

type RemoveTagsArgs

type RemoveTagsArgs struct {
	ResourceId   string
	ResourceType TagResourceType //image, instance, snapshot or disk
	RegionId     common.Region
	Tag          map[string]string
}

type RemoveTagsResponse

type RemoveTagsResponse struct {
	common.Response
}

type ReplaceSystemDiskArgs

type ReplaceSystemDiskArgs struct {
	InstanceId  string
	ImageId     string
	SystemDisk  SystemDiskType
	ClientToken string
}

type ReplaceSystemDiskResponse

type ReplaceSystemDiskResponse struct {
	common.Response
	DiskId string
}

type ResetDiskArgs

type ResetDiskArgs struct {
	DiskId     string
	SnapshotId string
}

type ResetDiskResponse

type ResetDiskResponse struct {
	common.Response
}

type ResourceItemType

type ResourceItemType struct {
	ResourceId   string
	ResourceType TagResourceType
	RegionId     common.Region
}

type ResourceType

type ResourceType string

type RouteEntrySetType

type RouteEntrySetType struct {
	RouteTableId         string
	DestinationCidrBlock string
	Type                 RouteTableType
	InstanceId           string
	Status               RouteEntryStatus // enum Pending | Available | Modifying
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&routeentrysettype

type RouteEntryStatus

type RouteEntryStatus string

type RouteTableSetType

type RouteTableSetType struct {
	VRouterId    string
	RouteTableId string
	RouteEntrys  struct {
		RouteEntry []RouteEntrySetType
	}
	RouteTableType RouteTableType
	CreationTime   util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&routetablesettype

type RouteTableType

type RouteTableType string

type SecurityGroupArgs

type SecurityGroupArgs struct {
	InstanceId      string
	SecurityGroupId string
}

type SecurityGroupIdSetType

type SecurityGroupIdSetType struct {
	SecurityGroupId string
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&securitygroupidsettype

type SecurityGroupItemType

type SecurityGroupItemType struct {
	SecurityGroupId   string
	SecurityGroupName string
	Description       string
	VpcId             string
	CreationTime      util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&securitygroupitemtype

type SecurityGroupResponse

type SecurityGroupResponse struct {
	common.Response
}

type SnapshotType

type SnapshotType struct {
	SnapshotId     string
	SnapshotName   string
	Description    string
	Progress       string
	SourceDiskId   string
	SourceDiskSize int
	SourceDiskType string //enum for System | Data
	ProductCode    string
	CreationTime   util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&snapshottype

type StartInstanceArgs

type StartInstanceArgs struct {
	InstanceId string
}

type StartInstanceResponse

type StartInstanceResponse struct {
	common.Response
}

type StopInstanceArgs

type StopInstanceArgs struct {
	InstanceId string
	ForceStop  bool
}

type StopInstanceResponse

type StopInstanceResponse struct {
	common.Response
}

type StringOrBool

type StringOrBool struct {
	Value bool
}

func (StringOrBool) Bool

func (io StringOrBool) Bool() bool

func (StringOrBool) String

func (io StringOrBool) String() string

func (*StringOrBool) UnmarshalJSON

func (io *StringOrBool) UnmarshalJSON(value []byte) error

UnmarshalJSON implements the json.Unmarshaller interface.

type SystemDiskType

type SystemDiskType struct {
	Size        int
	Category    DiskCategory //Enum cloud, ephemeral, ephemeral_ssd
	DiskName    string
	Description string
}

type TagItemType

type TagItemType struct {
	TagKey   string
	TagValue string
}

type TagResourceType

type TagResourceType string

type UnallocateEipAddressArgs

type UnallocateEipAddressArgs struct {
	AllocationId string
	InstanceId   string
}

type UnallocateEipAddressResponse

type UnallocateEipAddressResponse struct {
	common.Response
}

type VRouterSetType

type VRouterSetType struct {
	VRouterId     string
	RegionId      common.Region
	VpcId         string
	RouteTableIds struct {
		RouteTableId []string
	}
	VRouterName  string
	Description  string
	CreationTime util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&vroutersettype

type VSwitchSetType

type VSwitchSetType struct {
	VSwitchId               string
	VpcId                   string
	Status                  VSwitchStatus // enum Pending | Available
	CidrBlock               string
	ZoneId                  string
	AvailableIpAddressCount int
	Description             string
	VSwitchName             string
	CreationTime            util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&vswitchsettype

type VSwitchStatus

type VSwitchStatus string

type VpcAttributesType

type VpcAttributesType struct {
	VpcId            string
	VSwitchId        string
	PrivateIpAddress IpAddressSetType
	NatIpAddress     string
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&vpcattributestype

type VpcSetType

type VpcSetType struct {
	VpcId      string
	RegionId   common.Region
	Status     VpcStatus // enum Pending | Available
	VpcName    string
	VSwitchIds struct {
		VSwitchId []string
	}
	CidrBlock    string
	VRouterId    string
	Description  string
	CreationTime util.ISO6801Time
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&vpcsettype

type VpcStatus

type VpcStatus string

type ZoneType

type ZoneType struct {
	ZoneId                    string
	LocalName                 string
	AvailableResourceCreation AvailableResourceCreationType
	AvailableDiskCategories   AvailableDiskCategoriesType
}

You can read doc at http://docs.aliyun.com/#/pub/ecs/open-api/datatype&zonetype

Jump to

Keyboard shortcuts

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