Documentation ¶
Index ¶
- func EcsClientBuilder() *http_client.HcHttpClientBuilder
- func GenReqDefForAddServerGroupMember() *def.HttpRequestDef
- func GenReqDefForAssociateServerVirtualIp() *def.HttpRequestDef
- func GenReqDefForAttachServerVolume() *def.HttpRequestDef
- func GenReqDefForBatchAddServerNics() *def.HttpRequestDef
- func GenReqDefForBatchAttachSharableVolumes() *def.HttpRequestDef
- func GenReqDefForBatchCreateServerTags() *def.HttpRequestDef
- func GenReqDefForBatchDeleteServerNics() *def.HttpRequestDef
- func GenReqDefForBatchDeleteServerTags() *def.HttpRequestDef
- func GenReqDefForBatchRebootServers() *def.HttpRequestDef
- func GenReqDefForBatchResetServersPassword() *def.HttpRequestDef
- func GenReqDefForBatchStartServers() *def.HttpRequestDef
- func GenReqDefForBatchStopServers() *def.HttpRequestDef
- func GenReqDefForBatchUpdateServersName() *def.HttpRequestDef
- func GenReqDefForChangeServerOsWithCloudInit() *def.HttpRequestDef
- func GenReqDefForChangeServerOsWithoutCloudInit() *def.HttpRequestDef
- func GenReqDefForCreatePostPaidServers() *def.HttpRequestDef
- func GenReqDefForCreateServerGroup() *def.HttpRequestDef
- func GenReqDefForCreateServers() *def.HttpRequestDef
- func GenReqDefForDeleteServerGroup() *def.HttpRequestDef
- func GenReqDefForDeleteServerGroupMember() *def.HttpRequestDef
- func GenReqDefForDeleteServerMetadata() *def.HttpRequestDef
- func GenReqDefForDeleteServerPassword() *def.HttpRequestDef
- func GenReqDefForDeleteServers() *def.HttpRequestDef
- func GenReqDefForDetachServerVolume() *def.HttpRequestDef
- func GenReqDefForDisassociateServerVirtualIp() *def.HttpRequestDef
- func GenReqDefForListFlavors() *def.HttpRequestDef
- func GenReqDefForListResizeFlavors() *def.HttpRequestDef
- func GenReqDefForListServerBlockDevices() *def.HttpRequestDef
- func GenReqDefForListServerGroups() *def.HttpRequestDef
- func GenReqDefForListServerInterfaces() *def.HttpRequestDef
- func GenReqDefForListServerTags() *def.HttpRequestDef
- func GenReqDefForListServersDetails() *def.HttpRequestDef
- func GenReqDefForMigrateServer() *def.HttpRequestDef
- func GenReqDefForNovaAssociateSecurityGroup() *def.HttpRequestDef
- func GenReqDefForNovaCreateKeypair() *def.HttpRequestDef
- func GenReqDefForNovaCreateServers() *def.HttpRequestDef
- func GenReqDefForNovaDeleteKeypair() *def.HttpRequestDef
- func GenReqDefForNovaDeleteServer() *def.HttpRequestDef
- func GenReqDefForNovaDisassociateSecurityGroup() *def.HttpRequestDef
- func GenReqDefForNovaListAvailabilityZones() *def.HttpRequestDef
- func GenReqDefForNovaListKeypairs() *def.HttpRequestDef
- func GenReqDefForNovaListServerSecurityGroups() *def.HttpRequestDef
- func GenReqDefForNovaListServersDetails() *def.HttpRequestDef
- func GenReqDefForNovaShowKeypair() *def.HttpRequestDef
- func GenReqDefForNovaShowServer() *def.HttpRequestDef
- func GenReqDefForRegisterServerAutoRecovery() *def.HttpRequestDef
- func GenReqDefForReinstallServerWithCloudInit() *def.HttpRequestDef
- func GenReqDefForReinstallServerWithoutCloudInit() *def.HttpRequestDef
- func GenReqDefForResetServerPassword() *def.HttpRequestDef
- func GenReqDefForResizePostPaidServer() *def.HttpRequestDef
- func GenReqDefForResizeServer() *def.HttpRequestDef
- func GenReqDefForShowJob() *def.HttpRequestDef
- func GenReqDefForShowResetPasswordFlag() *def.HttpRequestDef
- func GenReqDefForShowServer() *def.HttpRequestDef
- func GenReqDefForShowServerAutoRecovery() *def.HttpRequestDef
- func GenReqDefForShowServerBlockDevice() *def.HttpRequestDef
- func GenReqDefForShowServerGroup() *def.HttpRequestDef
- func GenReqDefForShowServerLimits() *def.HttpRequestDef
- func GenReqDefForShowServerPassword() *def.HttpRequestDef
- func GenReqDefForShowServerRemoteConsole() *def.HttpRequestDef
- func GenReqDefForShowServerTags() *def.HttpRequestDef
- func GenReqDefForUpdateServer() *def.HttpRequestDef
- func GenReqDefForUpdateServerAutoTerminateTime() *def.HttpRequestDef
- func GenReqDefForUpdateServerMetadata() *def.HttpRequestDef
- type EcsClient
- func (c *EcsClient) AddServerGroupMember(request *model.AddServerGroupMemberRequest) (*model.AddServerGroupMemberResponse, error)
- func (c *EcsClient) AssociateServerVirtualIp(request *model.AssociateServerVirtualIpRequest) (*model.AssociateServerVirtualIpResponse, error)
- func (c *EcsClient) AttachServerVolume(request *model.AttachServerVolumeRequest) (*model.AttachServerVolumeResponse, error)
- func (c *EcsClient) BatchAddServerNics(request *model.BatchAddServerNicsRequest) (*model.BatchAddServerNicsResponse, error)
- func (c *EcsClient) BatchAttachSharableVolumes(request *model.BatchAttachSharableVolumesRequest) (*model.BatchAttachSharableVolumesResponse, error)
- func (c *EcsClient) BatchCreateServerTags(request *model.BatchCreateServerTagsRequest) (*model.BatchCreateServerTagsResponse, error)
- func (c *EcsClient) BatchDeleteServerNics(request *model.BatchDeleteServerNicsRequest) (*model.BatchDeleteServerNicsResponse, error)
- func (c *EcsClient) BatchDeleteServerTags(request *model.BatchDeleteServerTagsRequest) (*model.BatchDeleteServerTagsResponse, error)
- func (c *EcsClient) BatchRebootServers(request *model.BatchRebootServersRequest) (*model.BatchRebootServersResponse, error)
- func (c *EcsClient) BatchResetServersPassword(request *model.BatchResetServersPasswordRequest) (*model.BatchResetServersPasswordResponse, error)
- func (c *EcsClient) BatchStartServers(request *model.BatchStartServersRequest) (*model.BatchStartServersResponse, error)
- func (c *EcsClient) BatchStopServers(request *model.BatchStopServersRequest) (*model.BatchStopServersResponse, error)
- func (c *EcsClient) BatchUpdateServersName(request *model.BatchUpdateServersNameRequest) (*model.BatchUpdateServersNameResponse, error)
- func (c *EcsClient) ChangeServerOsWithCloudInit(request *model.ChangeServerOsWithCloudInitRequest) (*model.ChangeServerOsWithCloudInitResponse, error)
- func (c *EcsClient) ChangeServerOsWithoutCloudInit(request *model.ChangeServerOsWithoutCloudInitRequest) (*model.ChangeServerOsWithoutCloudInitResponse, error)
- func (c *EcsClient) CreatePostPaidServers(request *model.CreatePostPaidServersRequest) (*model.CreatePostPaidServersResponse, error)
- func (c *EcsClient) CreateServerGroup(request *model.CreateServerGroupRequest) (*model.CreateServerGroupResponse, error)
- func (c *EcsClient) CreateServers(request *model.CreateServersRequest) (*model.CreateServersResponse, error)
- func (c *EcsClient) DeleteServerGroup(request *model.DeleteServerGroupRequest) (*model.DeleteServerGroupResponse, error)
- func (c *EcsClient) DeleteServerGroupMember(request *model.DeleteServerGroupMemberRequest) (*model.DeleteServerGroupMemberResponse, error)
- func (c *EcsClient) DeleteServerMetadata(request *model.DeleteServerMetadataRequest) (*model.DeleteServerMetadataResponse, error)
- func (c *EcsClient) DeleteServerPassword(request *model.DeleteServerPasswordRequest) (*model.DeleteServerPasswordResponse, error)
- func (c *EcsClient) DeleteServers(request *model.DeleteServersRequest) (*model.DeleteServersResponse, error)
- func (c *EcsClient) DetachServerVolume(request *model.DetachServerVolumeRequest) (*model.DetachServerVolumeResponse, error)
- func (c *EcsClient) DisassociateServerVirtualIp(request *model.DisassociateServerVirtualIpRequest) (*model.DisassociateServerVirtualIpResponse, error)
- func (c *EcsClient) ListFlavors(request *model.ListFlavorsRequest) (*model.ListFlavorsResponse, error)
- func (c *EcsClient) ListResizeFlavors(request *model.ListResizeFlavorsRequest) (*model.ListResizeFlavorsResponse, error)
- func (c *EcsClient) ListServerBlockDevices(request *model.ListServerBlockDevicesRequest) (*model.ListServerBlockDevicesResponse, error)
- func (c *EcsClient) ListServerGroups(request *model.ListServerGroupsRequest) (*model.ListServerGroupsResponse, error)
- func (c *EcsClient) ListServerInterfaces(request *model.ListServerInterfacesRequest) (*model.ListServerInterfacesResponse, error)
- func (c *EcsClient) ListServerTags(request *model.ListServerTagsRequest) (*model.ListServerTagsResponse, error)
- func (c *EcsClient) ListServersDetails(request *model.ListServersDetailsRequest) (*model.ListServersDetailsResponse, error)
- func (c *EcsClient) MigrateServer(request *model.MigrateServerRequest) (*model.MigrateServerResponse, error)
- func (c *EcsClient) NovaAssociateSecurityGroup(request *model.NovaAssociateSecurityGroupRequest) (*model.NovaAssociateSecurityGroupResponse, error)
- func (c *EcsClient) NovaCreateKeypair(request *model.NovaCreateKeypairRequest) (*model.NovaCreateKeypairResponse, error)
- func (c *EcsClient) NovaCreateServers(request *model.NovaCreateServersRequest) (*model.NovaCreateServersResponse, error)
- func (c *EcsClient) NovaDeleteKeypair(request *model.NovaDeleteKeypairRequest) (*model.NovaDeleteKeypairResponse, error)
- func (c *EcsClient) NovaDeleteServer(request *model.NovaDeleteServerRequest) (*model.NovaDeleteServerResponse, error)
- func (c *EcsClient) NovaDisassociateSecurityGroup(request *model.NovaDisassociateSecurityGroupRequest) (*model.NovaDisassociateSecurityGroupResponse, error)
- func (c *EcsClient) NovaListAvailabilityZones(request *model.NovaListAvailabilityZonesRequest) (*model.NovaListAvailabilityZonesResponse, error)
- func (c *EcsClient) NovaListKeypairs(request *model.NovaListKeypairsRequest) (*model.NovaListKeypairsResponse, error)
- func (c *EcsClient) NovaListServerSecurityGroups(request *model.NovaListServerSecurityGroupsRequest) (*model.NovaListServerSecurityGroupsResponse, error)
- func (c *EcsClient) NovaListServersDetails(request *model.NovaListServersDetailsRequest) (*model.NovaListServersDetailsResponse, error)
- func (c *EcsClient) NovaShowKeypair(request *model.NovaShowKeypairRequest) (*model.NovaShowKeypairResponse, error)
- func (c *EcsClient) NovaShowServer(request *model.NovaShowServerRequest) (*model.NovaShowServerResponse, error)
- func (c *EcsClient) RegisterServerAutoRecovery(request *model.RegisterServerAutoRecoveryRequest) (*model.RegisterServerAutoRecoveryResponse, error)
- func (c *EcsClient) ReinstallServerWithCloudInit(request *model.ReinstallServerWithCloudInitRequest) (*model.ReinstallServerWithCloudInitResponse, error)
- func (c *EcsClient) ReinstallServerWithoutCloudInit(request *model.ReinstallServerWithoutCloudInitRequest) (*model.ReinstallServerWithoutCloudInitResponse, error)
- func (c *EcsClient) ResetServerPassword(request *model.ResetServerPasswordRequest) (*model.ResetServerPasswordResponse, error)
- func (c *EcsClient) ResizePostPaidServer(request *model.ResizePostPaidServerRequest) (*model.ResizePostPaidServerResponse, error)
- func (c *EcsClient) ResizeServer(request *model.ResizeServerRequest) (*model.ResizeServerResponse, error)
- func (c *EcsClient) ShowJob(request *model.ShowJobRequest) (*model.ShowJobResponse, error)
- func (c *EcsClient) ShowResetPasswordFlag(request *model.ShowResetPasswordFlagRequest) (*model.ShowResetPasswordFlagResponse, error)
- func (c *EcsClient) ShowServer(request *model.ShowServerRequest) (*model.ShowServerResponse, error)
- func (c *EcsClient) ShowServerAutoRecovery(request *model.ShowServerAutoRecoveryRequest) (*model.ShowServerAutoRecoveryResponse, error)
- func (c *EcsClient) ShowServerBlockDevice(request *model.ShowServerBlockDeviceRequest) (*model.ShowServerBlockDeviceResponse, error)
- func (c *EcsClient) ShowServerGroup(request *model.ShowServerGroupRequest) (*model.ShowServerGroupResponse, error)
- func (c *EcsClient) ShowServerLimits(request *model.ShowServerLimitsRequest) (*model.ShowServerLimitsResponse, error)
- func (c *EcsClient) ShowServerPassword(request *model.ShowServerPasswordRequest) (*model.ShowServerPasswordResponse, error)
- func (c *EcsClient) ShowServerRemoteConsole(request *model.ShowServerRemoteConsoleRequest) (*model.ShowServerRemoteConsoleResponse, error)
- func (c *EcsClient) ShowServerTags(request *model.ShowServerTagsRequest) (*model.ShowServerTagsResponse, error)
- func (c *EcsClient) UpdateServer(request *model.UpdateServerRequest) (*model.UpdateServerResponse, error)
- func (c *EcsClient) UpdateServerAutoTerminateTime(request *model.UpdateServerAutoTerminateTimeRequest) (*model.UpdateServerAutoTerminateTimeResponse, error)
- func (c *EcsClient) UpdateServerMetadata(request *model.UpdateServerMetadataRequest) (*model.UpdateServerMetadataResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EcsClientBuilder ¶
func EcsClientBuilder() *http_client.HcHttpClientBuilder
func GenReqDefForAddServerGroupMember ¶
func GenReqDefForAddServerGroupMember() *def.HttpRequestDef
func GenReqDefForAssociateServerVirtualIp ¶
func GenReqDefForAssociateServerVirtualIp() *def.HttpRequestDef
func GenReqDefForAttachServerVolume ¶
func GenReqDefForAttachServerVolume() *def.HttpRequestDef
func GenReqDefForBatchAddServerNics ¶
func GenReqDefForBatchAddServerNics() *def.HttpRequestDef
func GenReqDefForBatchAttachSharableVolumes ¶
func GenReqDefForBatchAttachSharableVolumes() *def.HttpRequestDef
func GenReqDefForBatchCreateServerTags ¶
func GenReqDefForBatchCreateServerTags() *def.HttpRequestDef
func GenReqDefForBatchDeleteServerNics ¶
func GenReqDefForBatchDeleteServerNics() *def.HttpRequestDef
func GenReqDefForBatchDeleteServerTags ¶
func GenReqDefForBatchDeleteServerTags() *def.HttpRequestDef
func GenReqDefForBatchRebootServers ¶
func GenReqDefForBatchRebootServers() *def.HttpRequestDef
func GenReqDefForBatchResetServersPassword ¶
func GenReqDefForBatchResetServersPassword() *def.HttpRequestDef
func GenReqDefForBatchStartServers ¶
func GenReqDefForBatchStartServers() *def.HttpRequestDef
func GenReqDefForBatchStopServers ¶
func GenReqDefForBatchStopServers() *def.HttpRequestDef
func GenReqDefForBatchUpdateServersName ¶
func GenReqDefForBatchUpdateServersName() *def.HttpRequestDef
func GenReqDefForChangeServerOsWithCloudInit ¶
func GenReqDefForChangeServerOsWithCloudInit() *def.HttpRequestDef
func GenReqDefForChangeServerOsWithoutCloudInit ¶
func GenReqDefForChangeServerOsWithoutCloudInit() *def.HttpRequestDef
func GenReqDefForCreatePostPaidServers ¶
func GenReqDefForCreatePostPaidServers() *def.HttpRequestDef
func GenReqDefForCreateServerGroup ¶
func GenReqDefForCreateServerGroup() *def.HttpRequestDef
func GenReqDefForCreateServers ¶
func GenReqDefForCreateServers() *def.HttpRequestDef
func GenReqDefForDeleteServerGroup ¶
func GenReqDefForDeleteServerGroup() *def.HttpRequestDef
func GenReqDefForDeleteServerGroupMember ¶
func GenReqDefForDeleteServerGroupMember() *def.HttpRequestDef
func GenReqDefForDeleteServerMetadata ¶
func GenReqDefForDeleteServerMetadata() *def.HttpRequestDef
func GenReqDefForDeleteServerPassword ¶
func GenReqDefForDeleteServerPassword() *def.HttpRequestDef
func GenReqDefForDeleteServers ¶
func GenReqDefForDeleteServers() *def.HttpRequestDef
func GenReqDefForDetachServerVolume ¶
func GenReqDefForDetachServerVolume() *def.HttpRequestDef
func GenReqDefForDisassociateServerVirtualIp ¶
func GenReqDefForDisassociateServerVirtualIp() *def.HttpRequestDef
func GenReqDefForListFlavors ¶
func GenReqDefForListFlavors() *def.HttpRequestDef
func GenReqDefForListResizeFlavors ¶
func GenReqDefForListResizeFlavors() *def.HttpRequestDef
func GenReqDefForListServerBlockDevices ¶
func GenReqDefForListServerBlockDevices() *def.HttpRequestDef
func GenReqDefForListServerGroups ¶
func GenReqDefForListServerGroups() *def.HttpRequestDef
func GenReqDefForListServerInterfaces ¶
func GenReqDefForListServerInterfaces() *def.HttpRequestDef
func GenReqDefForListServerTags ¶
func GenReqDefForListServerTags() *def.HttpRequestDef
func GenReqDefForListServersDetails ¶
func GenReqDefForListServersDetails() *def.HttpRequestDef
func GenReqDefForMigrateServer ¶
func GenReqDefForMigrateServer() *def.HttpRequestDef
func GenReqDefForNovaAssociateSecurityGroup ¶
func GenReqDefForNovaAssociateSecurityGroup() *def.HttpRequestDef
func GenReqDefForNovaCreateKeypair ¶
func GenReqDefForNovaCreateKeypair() *def.HttpRequestDef
func GenReqDefForNovaCreateServers ¶
func GenReqDefForNovaCreateServers() *def.HttpRequestDef
func GenReqDefForNovaDeleteKeypair ¶
func GenReqDefForNovaDeleteKeypair() *def.HttpRequestDef
func GenReqDefForNovaDeleteServer ¶
func GenReqDefForNovaDeleteServer() *def.HttpRequestDef
func GenReqDefForNovaDisassociateSecurityGroup ¶
func GenReqDefForNovaDisassociateSecurityGroup() *def.HttpRequestDef
func GenReqDefForNovaListAvailabilityZones ¶
func GenReqDefForNovaListAvailabilityZones() *def.HttpRequestDef
func GenReqDefForNovaListKeypairs ¶
func GenReqDefForNovaListKeypairs() *def.HttpRequestDef
func GenReqDefForNovaListServerSecurityGroups ¶
func GenReqDefForNovaListServerSecurityGroups() *def.HttpRequestDef
func GenReqDefForNovaListServersDetails ¶
func GenReqDefForNovaListServersDetails() *def.HttpRequestDef
func GenReqDefForNovaShowKeypair ¶
func GenReqDefForNovaShowKeypair() *def.HttpRequestDef
func GenReqDefForNovaShowServer ¶
func GenReqDefForNovaShowServer() *def.HttpRequestDef
func GenReqDefForRegisterServerAutoRecovery ¶
func GenReqDefForRegisterServerAutoRecovery() *def.HttpRequestDef
func GenReqDefForReinstallServerWithCloudInit ¶
func GenReqDefForReinstallServerWithCloudInit() *def.HttpRequestDef
func GenReqDefForReinstallServerWithoutCloudInit ¶
func GenReqDefForReinstallServerWithoutCloudInit() *def.HttpRequestDef
func GenReqDefForResetServerPassword ¶
func GenReqDefForResetServerPassword() *def.HttpRequestDef
func GenReqDefForResizePostPaidServer ¶
func GenReqDefForResizePostPaidServer() *def.HttpRequestDef
func GenReqDefForResizeServer ¶
func GenReqDefForResizeServer() *def.HttpRequestDef
func GenReqDefForShowJob ¶
func GenReqDefForShowJob() *def.HttpRequestDef
func GenReqDefForShowResetPasswordFlag ¶
func GenReqDefForShowResetPasswordFlag() *def.HttpRequestDef
func GenReqDefForShowServer ¶
func GenReqDefForShowServer() *def.HttpRequestDef
func GenReqDefForShowServerAutoRecovery ¶
func GenReqDefForShowServerAutoRecovery() *def.HttpRequestDef
func GenReqDefForShowServerBlockDevice ¶
func GenReqDefForShowServerBlockDevice() *def.HttpRequestDef
func GenReqDefForShowServerGroup ¶
func GenReqDefForShowServerGroup() *def.HttpRequestDef
func GenReqDefForShowServerLimits ¶
func GenReqDefForShowServerLimits() *def.HttpRequestDef
func GenReqDefForShowServerPassword ¶
func GenReqDefForShowServerPassword() *def.HttpRequestDef
func GenReqDefForShowServerRemoteConsole ¶
func GenReqDefForShowServerRemoteConsole() *def.HttpRequestDef
func GenReqDefForShowServerTags ¶
func GenReqDefForShowServerTags() *def.HttpRequestDef
func GenReqDefForUpdateServer ¶
func GenReqDefForUpdateServer() *def.HttpRequestDef
func GenReqDefForUpdateServerAutoTerminateTime ¶
func GenReqDefForUpdateServerAutoTerminateTime() *def.HttpRequestDef
func GenReqDefForUpdateServerMetadata ¶
func GenReqDefForUpdateServerMetadata() *def.HttpRequestDef
Types ¶
type EcsClient ¶
type EcsClient struct {
HcClient *http_client.HcHttpClient
}
func NewEcsClient ¶
func NewEcsClient(hcClient *http_client.HcHttpClient) *EcsClient
func (*EcsClient) AddServerGroupMember ¶
func (c *EcsClient) AddServerGroupMember(request *model.AddServerGroupMemberRequest) (*model.AddServerGroupMemberResponse, error)
将云服务器加入云服务器组。添加成功后,如果该云服务器组是反亲和性策略的,则该云服务器与云服务器组中的其他成员尽量分散地创建在不同主机上。如果该云服务器时故障域类型的,则该云服务器会拥有故障域属性。
func (*EcsClient) AssociateServerVirtualIp ¶
func (c *EcsClient) AssociateServerVirtualIp(request *model.AssociateServerVirtualIpRequest) (*model.AssociateServerVirtualIpResponse, error)
虚拟IP地址用于为网卡提供第二个IP地址,同时支持与多个弹性云服务器的网卡绑定,从而实现多个弹性云服务器之间的高可用性。 该接口用于给云服务器网卡配置虚拟IP地址: - 当指定的IP地址是一个不存在的虚拟IP地址时,系统会创建该虚拟IP,并绑定至对应网卡。 - 当指定的IP地址是一个已经创建好的私有IP时,系统会将指定的网卡和虚拟IP绑定。如果该IP的device_owner为空,则仅支持VPC内二三层通信;如果该IP的device_owner为neutron:VIP_PORT,则支持VPC内二三层通信、VPC之间对等连接访问,以及弹性公网IP、VPN、云专线等Internet接入。
func (*EcsClient) AttachServerVolume ¶
func (c *EcsClient) AttachServerVolume(request *model.AttachServerVolumeRequest) (*model.AttachServerVolumeResponse, error)
把磁盘挂载到弹性云服务器上。
func (*EcsClient) BatchAddServerNics ¶
func (c *EcsClient) BatchAddServerNics(request *model.BatchAddServerNicsRequest) (*model.BatchAddServerNicsResponse, error)
给云服务器添加一张或多张网卡。
func (*EcsClient) BatchAttachSharableVolumes ¶
func (c *EcsClient) BatchAttachSharableVolumes(request *model.BatchAttachSharableVolumesRequest) (*model.BatchAttachSharableVolumesResponse, error)
将指定的共享磁盘一次性挂载到多个弹性云服务器,实现批量挂载。
func (*EcsClient) BatchCreateServerTags ¶
func (c *EcsClient) BatchCreateServerTags(request *model.BatchCreateServerTagsRequest) (*model.BatchCreateServerTagsResponse, error)
- 为指定云服务器批量添加标签。 - 标签管理服务TMS使用该接口批量管理云服务器的标签。
func (*EcsClient) BatchDeleteServerNics ¶
func (c *EcsClient) BatchDeleteServerNics(request *model.BatchDeleteServerNicsRequest) (*model.BatchDeleteServerNicsResponse, error)
卸载并删除云服务器中的一张或多张网卡。
func (*EcsClient) BatchDeleteServerTags ¶
func (c *EcsClient) BatchDeleteServerTags(request *model.BatchDeleteServerTagsRequest) (*model.BatchDeleteServerTagsResponse, error)
- 为指定云服务器批量删除标签。 - 标签管理服务TMS使用该接口批量管理云服务器的标签。
func (*EcsClient) BatchRebootServers ¶
func (c *EcsClient) BatchRebootServers(request *model.BatchRebootServersRequest) (*model.BatchRebootServersResponse, error)
根据给定的云服务器ID列表,批量重启云服务器,一次最多可以重启1000台。
func (*EcsClient) BatchResetServersPassword ¶
func (c *EcsClient) BatchResetServersPassword(request *model.BatchResetServersPasswordRequest) (*model.BatchResetServersPasswordResponse, error)
批量重置弹性云服务器管理帐号(root用户或Administrator用户)的密码。
func (*EcsClient) BatchStartServers ¶
func (c *EcsClient) BatchStartServers(request *model.BatchStartServersRequest) (*model.BatchStartServersResponse, error)
根据给定的云服务器ID列表,批量启动云服务器,一次最多可以启动1000台。
func (*EcsClient) BatchStopServers ¶
func (c *EcsClient) BatchStopServers(request *model.BatchStopServersRequest) (*model.BatchStopServersResponse, error)
根据给定的云服务器ID列表,批量关闭云服务器,一次最多可以关闭1000台。
func (*EcsClient) BatchUpdateServersName ¶
func (c *EcsClient) BatchUpdateServersName(request *model.BatchUpdateServersNameRequest) (*model.BatchUpdateServersNameResponse, error)
批量修改弹性云服务器信息。 当前仅支持批量修改云服务器名称,一次最多可以修改1000台。
func (*EcsClient) ChangeServerOsWithCloudInit ¶
func (c *EcsClient) ChangeServerOsWithCloudInit(request *model.ChangeServerOsWithCloudInitRequest) (*model.ChangeServerOsWithCloudInitResponse, error)
切换弹性云服务器操作系统。支持弹性云服务器数据盘不变的情况下,使用新镜像重装系统盘。 调用该接口后,系统将卸载系统盘,然后使用新镜像重新创建系统盘,并挂载至弹性云服务器,实现切换操作系统功能。
func (*EcsClient) ChangeServerOsWithoutCloudInit ¶
func (c *EcsClient) ChangeServerOsWithoutCloudInit(request *model.ChangeServerOsWithoutCloudInitRequest) (*model.ChangeServerOsWithoutCloudInitResponse, error)
切换弹性云服务器操作系统。 该接口支持未安装Cloud-init或Cloudbase-init的镜像使用。
func (*EcsClient) CreatePostPaidServers ¶
func (c *EcsClient) CreatePostPaidServers(request *model.CreatePostPaidServersRequest) (*model.CreatePostPaidServersResponse, error)
创建一台或多台[按需付费](https://support.huaweicloud.com/productdesc-ecs/ecs_01_0065.html)方式的云服务器。 弹性云服务器的登录鉴权方式包括两种:密钥对、密码。为安全起见,推荐使用密钥对方式。 - 密钥对 密钥对指使用密钥对作为弹性云服务器的鉴权方式。 接口调用方法:使用key_name字段,指定弹性云服务器登录时使用的密钥文件。 - 密码 密码指使用设置初始密码方式作为弹性云服务器的鉴权方式,此时,您可以通过用户名密码方式登录弹性云服务器,Linux操作系统时为root用户的初始密码,Windows操作系统时为Administrator用户的初始密码。 接口调用方法:使用adminPass字段,指定管理员帐号的初始登录密码。对于镜像已安装Cloud-init的Linux云服务器,如果需要使用密文密码,可以使用user_data字段进行密码注入。 > 对于安装Cloud-init镜像的Linux云服务器云主机,若指定user_data字段,则adminPass字段无效。
func (*EcsClient) CreateServerGroup ¶
func (c *EcsClient) CreateServerGroup(request *model.CreateServerGroupRequest) (*model.CreateServerGroupResponse, error)
创建弹性云服务器组。 与原生的创建云服务器组接口不同之处在于该接口支持企业项目细粒度权限的校验。
func (*EcsClient) CreateServers ¶
func (c *EcsClient) CreateServers(request *model.CreateServersRequest) (*model.CreateServersResponse, error)
创建一台或多台云服务器。 指该接口兼容《弹性云服务器接口参考》创建云服务器v1的功能,同时合入新功能,支持创建[包年/包月](https://support.huaweicloud.com/productdesc-ecs/ecs_01_0065.html)的弹性云服务器。 弹性云服务器的登录鉴权方式包括两种:密钥对、密码。为安全起见,推荐使用密钥对方式。 - 密钥对 指使用密钥对作为弹性云服务器的鉴权方式。 接口调用方法:使用key_name字段,指定弹性云服务器登录时使用的密钥文件。 - 密码 指使用设置初始密码方式作为弹性云服务器的鉴权方式,此时,您可以通过用户名密码方式登录弹性云服务器,Linux操作系统时为root用户的初始密码,Windows操作系统时为Administrator用户的初始密码。 接口调用方法:使用adminPass字段,指定管理员帐号的初始登录密码。对于镜像已安装Cloud-init的Linux云服务器,如果需要使用密文密码,可以使用user_data字段进行密码注入。 > 对于安装Cloud-init镜像的Linux云服务器云主机,若指定user_data字段,则adminPass字段无效。 购买操作示例: - [使用API购买ECS过程中常见问题及处理方法](https://support.huaweicloud.com/api-ecs/ecs_04_0007.html) - [获取Token并检验Token的有效期 ](https://support.huaweicloud.com/api-ecs/ecs_04_0008.html)
func (*EcsClient) DeleteServerGroup ¶
func (c *EcsClient) DeleteServerGroup(request *model.DeleteServerGroupRequest) (*model.DeleteServerGroupResponse, error)
删除云服务器组。 与原生的删除云服务器组接口不同之处在于该接口支持企业项目细粒度权限的校验。
func (*EcsClient) DeleteServerGroupMember ¶
func (c *EcsClient) DeleteServerGroupMember(request *model.DeleteServerGroupMemberRequest) (*model.DeleteServerGroupMemberResponse, error)
将弹性云服务器移出云服务器组。移出后,该云服务器与云服务器组中的成员不再遵从反亲和策略。
func (*EcsClient) DeleteServerMetadata ¶
func (c *EcsClient) DeleteServerMetadata(request *model.DeleteServerMetadataRequest) (*model.DeleteServerMetadataResponse, error)
删除云服务器指定元数据。
func (*EcsClient) DeleteServerPassword ¶
func (c *EcsClient) DeleteServerPassword(request *model.DeleteServerPasswordRequest) (*model.DeleteServerPasswordResponse, error)
清除Windows云服务器初始安装时系统生成的密码记录。清除密码后,不影响云服务器密码登录功能,但不能再使用获取密码功能来查询该云服务器密码。
func (*EcsClient) DeleteServers ¶
func (c *EcsClient) DeleteServers(request *model.DeleteServersRequest) (*model.DeleteServersResponse, error)
根据指定的云服务器ID列表,删除云服务器。 系统支持删除单台云服务器和批量删除多台云服务器操作,批量删除云服务器时,一次最多可以删除1000台。
func (*EcsClient) DetachServerVolume ¶
func (c *EcsClient) DetachServerVolume(request *model.DetachServerVolumeRequest) (*model.DetachServerVolumeResponse, error)
从弹性云服务器中卸载磁盘。
func (*EcsClient) DisassociateServerVirtualIp ¶
func (c *EcsClient) DisassociateServerVirtualIp(request *model.DisassociateServerVirtualIpRequest) (*model.DisassociateServerVirtualIpResponse, error)
虚拟IP地址用于为网卡提供第二个IP地址,同时支持与多个弹性云服务器的网卡绑定,从而实现多个弹性云服务器之间的高可用性。 该接口用于解绑定弹性云服务器网卡的虚拟IP地址。解绑后,网卡不会被删除。
func (*EcsClient) ListFlavors ¶
func (c *EcsClient) ListFlavors(request *model.ListFlavorsRequest) (*model.ListFlavorsResponse, error)
查询云服务器规格详情信息和规格扩展信息列表。
func (*EcsClient) ListResizeFlavors ¶
func (c *EcsClient) ListResizeFlavors(request *model.ListResizeFlavorsRequest) (*model.ListResizeFlavorsResponse, error)
变更规格时,部分规格的云服务器之间不能互相变更。您可以通过本接口,通过指定弹性云服务器规格,查询该规格可以变更的规格列表。
func (*EcsClient) ListServerBlockDevices ¶
func (c *EcsClient) ListServerBlockDevices(request *model.ListServerBlockDevicesRequest) (*model.ListServerBlockDevicesResponse, error)
查询弹性云服务器挂载的磁盘信息。
func (*EcsClient) ListServerGroups ¶
func (c *EcsClient) ListServerGroups(request *model.ListServerGroupsRequest) (*model.ListServerGroupsResponse, error)
查询弹性云服务器组。 与原生的创建云服务器组接口不同之处在于该接口支持企业项目细粒度权限的校验。
func (*EcsClient) ListServerInterfaces ¶
func (c *EcsClient) ListServerInterfaces(request *model.ListServerInterfacesRequest) (*model.ListServerInterfacesResponse, error)
查询云服务器网卡信息。
func (*EcsClient) ListServerTags ¶
func (c *EcsClient) ListServerTags(request *model.ListServerTagsRequest) (*model.ListServerTagsResponse, error)
项目(Project)用于将OpenStack的资源(计算资源、存储资源和网络资源)进行分组和隔离。项目可以是一个部门或者一个项目组。一个帐户中可以创建多个项目。 该接口用于查询用户在指定项目所使用的全部标签。
func (*EcsClient) ListServersDetails ¶
func (c *EcsClient) ListServersDetails(request *model.ListServersDetailsRequest) (*model.ListServersDetailsResponse, error)
根据用户请求条件从数据库筛选、查询所有的弹性云服务器,并关联相关表获取到弹性云服务器的详细信息。 该接口支持查询弹性云服务器计费方式,以及是否被冻结。
func (*EcsClient) MigrateServer ¶
func (c *EcsClient) MigrateServer(request *model.MigrateServerRequest) (*model.MigrateServerResponse, error)
- 将部署在专属主机上的弹性云服务器迁移至其他专属主机。 - 将部署在专属主机上的弹性云服务器迁移至公共资源池,即不再部署在专属主机上。 - 将公共资源池的弹性云服务器迁移至专属主机上,成为专属主机上部署的弹性云服务器。
func (*EcsClient) NovaAssociateSecurityGroup ¶
func (c *EcsClient) NovaAssociateSecurityGroup(request *model.NovaAssociateSecurityGroupRequest) (*model.NovaAssociateSecurityGroupResponse, error)
为弹性云服务器添加一个安全组。 添加多个安全组时,建议最多为弹性云服务器添加5个安全组。
func (*EcsClient) NovaCreateKeypair ¶
func (c *EcsClient) NovaCreateKeypair(request *model.NovaCreateKeypairRequest) (*model.NovaCreateKeypairResponse, error)
创建SSH密钥,或把公钥导入系统,生成密钥对。 创建SSH密钥成功后,请把响应数据中的私钥内容保存到本地文件,用户使用该私钥登录云服务器云主机。为保证云服务器云主机器安全,私钥数据只能读取一次,请妥善保管。
func (*EcsClient) NovaCreateServers ¶
func (c *EcsClient) NovaCreateServers(request *model.NovaCreateServersRequest) (*model.NovaCreateServersResponse, error)
创建一台弹性云服务器。 弹性云服务器创建完成后,如需开启自动恢复功能,可以调用配置云服务器自动恢复的接口,具体使用请参见管理云服务器自动恢复动作。 该接口在云服务器创建失败后不支持自动回滚。若需要自动回滚能力,可以调用POST /v1/{project_id}/cloudservers接口,具体使用请参见创建云服务器(按需)。
func (*EcsClient) NovaDeleteKeypair ¶
func (c *EcsClient) NovaDeleteKeypair(request *model.NovaDeleteKeypairRequest) (*model.NovaDeleteKeypairResponse, error)
根据SSH密钥的名称,删除指定SSH密钥。
func (*EcsClient) NovaDeleteServer ¶
func (c *EcsClient) NovaDeleteServer(request *model.NovaDeleteServerRequest) (*model.NovaDeleteServerResponse, error)
删除一台云服务器。
func (*EcsClient) NovaDisassociateSecurityGroup ¶
func (c *EcsClient) NovaDisassociateSecurityGroup(request *model.NovaDisassociateSecurityGroupRequest) (*model.NovaDisassociateSecurityGroupResponse, error)
移除弹性云服务器中的安全组。
func (*EcsClient) NovaListAvailabilityZones ¶
func (c *EcsClient) NovaListAvailabilityZones(request *model.NovaListAvailabilityZonesRequest) (*model.NovaListAvailabilityZonesResponse, error)
查询可用域列表。
func (*EcsClient) NovaListKeypairs ¶
func (c *EcsClient) NovaListKeypairs(request *model.NovaListKeypairsRequest) (*model.NovaListKeypairsResponse, error)
查询SSH密钥信息列表。
func (*EcsClient) NovaListServerSecurityGroups ¶
func (c *EcsClient) NovaListServerSecurityGroups(request *model.NovaListServerSecurityGroupsRequest) (*model.NovaListServerSecurityGroupsResponse, error)
查询指定弹性云服务器的安全组。
func (*EcsClient) NovaListServersDetails ¶
func (c *EcsClient) NovaListServersDetails(request *model.NovaListServersDetailsRequest) (*model.NovaListServersDetailsResponse, error)
查询云服务器详情信息列表。
func (*EcsClient) NovaShowKeypair ¶
func (c *EcsClient) NovaShowKeypair(request *model.NovaShowKeypairRequest) (*model.NovaShowKeypairResponse, error)
根据SSH密钥名称查询指定SSH密钥。
func (*EcsClient) NovaShowServer ¶
func (c *EcsClient) NovaShowServer(request *model.NovaShowServerRequest) (*model.NovaShowServerResponse, error)
根据云服务器ID,查询云服务器的详细信息。
func (*EcsClient) RegisterServerAutoRecovery ¶
func (c *EcsClient) RegisterServerAutoRecovery(request *model.RegisterServerAutoRecoveryRequest) (*model.RegisterServerAutoRecoveryResponse, error)
配置、删除云服务器自动恢复动作。
func (*EcsClient) ReinstallServerWithCloudInit ¶
func (c *EcsClient) ReinstallServerWithCloudInit(request *model.ReinstallServerWithCloudInitRequest) (*model.ReinstallServerWithCloudInitResponse, error)
重装弹性云服务器的操作系统。支持弹性云服务器数据盘不变的情况下,使用原镜像重装系统盘。 调用该接口后,系统将卸载系统盘,然后使用原镜像重新创建系统盘,并挂载至弹性云服务器,实现重装操作系统功能。
func (*EcsClient) ReinstallServerWithoutCloudInit ¶
func (c *EcsClient) ReinstallServerWithoutCloudInit(request *model.ReinstallServerWithoutCloudInitRequest) (*model.ReinstallServerWithoutCloudInitResponse, error)
重装弹性云服务器的操作系统。 该接口支持未安装Cloud-init或Cloudbase-init的镜像。
func (*EcsClient) ResetServerPassword ¶
func (c *EcsClient) ResetServerPassword(request *model.ResetServerPasswordRequest) (*model.ResetServerPasswordResponse, error)
重置弹性云服务器管理帐号(root用户或Administrator用户)的密码。
func (*EcsClient) ResizePostPaidServer ¶
func (c *EcsClient) ResizePostPaidServer(request *model.ResizePostPaidServerRequest) (*model.ResizePostPaidServerResponse, error)
当您创建的弹性云服务器规格无法满足业务需要时,可以变更云服务器规格,升级vCPU、内存。具体接口的使用,请参见本节内容。 变更规格时,部分规格的云服务器之间不能互相变更。 您可以通过接口“/v1/{project_id}/cloudservers/resize_flavors?{instance_uuid,source_flavor_id,source_flavor_name}”查询支持列表。
func (*EcsClient) ResizeServer ¶
func (c *EcsClient) ResizeServer(request *model.ResizeServerRequest) (*model.ResizeServerResponse, error)
变更云服务器规格。 v1.1版本:指该接口兼容v1接口的功能,同时合入新功能,支持变更包年/包月弹性云服务器的规格。 注意事项: - 该接口可以使用合作伙伴自身的AK/SK或者token调用,也可以用合作伙伴子客户的AK/SK或者token来调用。 - 如果使用AK/SK认证方式,示例代码中region请参考[地区和终端节点](https://developer.huaweicloud.com/endpoint)中“弹性云服务 ECS”下“区域”的内容,,serviceName(英文服务名称缩写)请指定为ECS。 - Endpoint请参考[地区和终端节点](https://developer.huaweicloud.com/endpoint)中“弹性云服务 ECS”下“终端节点(Endpoint)”的内容。
func (*EcsClient) ShowJob ¶
func (c *EcsClient) ShowJob(request *model.ShowJobRequest) (*model.ShowJobResponse, error)
查询Job的执行状态。 对于创建云服务器、删除云服务器、云服务器批量操作和网卡操作等异步API,命令下发后,会返回job_id,通过job_id可以查询任务的执行状态。
func (*EcsClient) ShowResetPasswordFlag ¶
func (c *EcsClient) ShowResetPasswordFlag(request *model.ShowResetPasswordFlagRequest) (*model.ShowResetPasswordFlagResponse, error)
查询弹性云服务器是否支持一键重置密码。
func (*EcsClient) ShowServer ¶
func (c *EcsClient) ShowServer(request *model.ShowServerRequest) (*model.ShowServerResponse, error)
查询弹性云服务器的详细信息。 该接口支持查询弹性云服务器的计费方式,以及是否被冻结。
func (*EcsClient) ShowServerAutoRecovery ¶
func (c *EcsClient) ShowServerAutoRecovery(request *model.ShowServerAutoRecoveryRequest) (*model.ShowServerAutoRecoveryResponse, error)
查询云服务器是否配置了自动恢复动作。
func (*EcsClient) ShowServerBlockDevice ¶
func (c *EcsClient) ShowServerBlockDevice(request *model.ShowServerBlockDeviceRequest) (*model.ShowServerBlockDeviceResponse, error)
查询弹性云服务器挂载的单个磁盘信息。
func (*EcsClient) ShowServerGroup ¶
func (c *EcsClient) ShowServerGroup(request *model.ShowServerGroupRequest) (*model.ShowServerGroupResponse, error)
查询弹性云服务器组详情。 与原生的创建云服务器组接口不同之处在于该接口支持企业项目细粒度权限的校验。
func (*EcsClient) ShowServerLimits ¶
func (c *EcsClient) ShowServerLimits(request *model.ShowServerLimitsRequest) (*model.ShowServerLimitsResponse, error)
查询租户配额信息。
func (*EcsClient) ShowServerPassword ¶
func (c *EcsClient) ShowServerPassword(request *model.ShowServerPasswordRequest) (*model.ShowServerPasswordResponse, error)
当通过支持Cloudbase-init功能的镜像创建Windows云服务器时,获取云服务器初始安装时系统生成的管理员帐户(Administrator帐户或Cloudbase-init设置的帐户)随机密码。
func (*EcsClient) ShowServerRemoteConsole ¶
func (c *EcsClient) ShowServerRemoteConsole(request *model.ShowServerRemoteConsoleRequest) (*model.ShowServerRemoteConsoleResponse, error)
获取弹性云服务器VNC远程登录地址。
func (*EcsClient) ShowServerTags ¶
func (c *EcsClient) ShowServerTags(request *model.ShowServerTagsRequest) (*model.ShowServerTagsResponse, error)
- 查询指定云服务器的标签信息。 - 标签管理服务TMS使用该接口查询指定云服务器的全部标签数据。
func (*EcsClient) UpdateServer ¶
func (c *EcsClient) UpdateServer(request *model.UpdateServerRequest) (*model.UpdateServerResponse, error)
修改云服务器信息,目前支持修改云服务器名称及描述和hostname。
func (*EcsClient) UpdateServerAutoTerminateTime ¶
func (c *EcsClient) UpdateServerAutoTerminateTime(request *model.UpdateServerAutoTerminateTimeRequest) (*model.UpdateServerAutoTerminateTimeResponse, error)
修改按需服务器,设置定时销毁时间。如果设置的销毁时间为空,表示取消销毁时间。 该接口支持企业项目细粒度权限的校验,具体细粒度请参见 ecs:cloudServers:put。
func (*EcsClient) UpdateServerMetadata ¶
func (c *EcsClient) UpdateServerMetadata(request *model.UpdateServerMetadataRequest) (*model.UpdateServerMetadataResponse, error)
更新云服务器元数据。 - 如果元数据中没有待更新字段,则自动添加该字段。 - 如果元数据中已存在待更新字段,则直接更新字段值。 - 如果元数据中的字段不再请求参数中,则保持不变