Documentation ¶
Overview ¶
Package pbecs is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEcsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EcsServiceClient) error
- func RegisterEcsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EcsServiceServer) error
- func RegisterEcsServiceServer(s grpc.ServiceRegistrar, srv EcsServiceServer)
- type ActionReq
- func (*ActionReq) Descriptor() ([]byte, []int)deprecated
- func (x *ActionReq) GetAccountName() string
- func (x *ActionReq) GetActionType() ActionType
- func (x *ActionReq) GetNamespace() string
- func (x *ActionReq) GetProvider() pbtenant.CloudProvider
- func (x *ActionReq) GetRegionId() int32
- func (x *ActionReq) GetVmName() string
- func (*ActionReq) ProtoMessage()
- func (x *ActionReq) ProtoReflect() protoreflect.Message
- func (x *ActionReq) Reset()
- func (x *ActionReq) String() string
- type ActionResp
- func (*ActionResp) Descriptor() ([]byte, []int)deprecated
- func (x *ActionResp) GetAccountName() string
- func (x *ActionResp) GetEcses() []*EcsInstance
- func (x *ActionResp) GetFinished() bool
- func (x *ActionResp) GetProvider() pbtenant.CloudProvider
- func (x *ActionResp) GetStatus() string
- func (*ActionResp) ProtoMessage()
- func (x *ActionResp) ProtoReflect() protoreflect.Message
- func (x *ActionResp) Reset()
- func (x *ActionResp) String() string
- type ActionType
- type CreateEcsMultipleReq
- func (*CreateEcsMultipleReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEcsMultipleReq) GetCreateEcsReqs() []*CreateEcsReq
- func (*CreateEcsMultipleReq) ProtoMessage()
- func (x *CreateEcsMultipleReq) ProtoReflect() protoreflect.Message
- func (x *CreateEcsMultipleReq) Reset()
- func (x *CreateEcsMultipleReq) String() string
- type CreateEcsMultipleResp
- func (*CreateEcsMultipleResp) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEcsMultipleResp) GetFinished() bool
- func (x *CreateEcsMultipleResp) GetRequestId() []string
- func (*CreateEcsMultipleResp) ProtoMessage()
- func (x *CreateEcsMultipleResp) ProtoReflect() protoreflect.Message
- func (x *CreateEcsMultipleResp) Reset()
- func (x *CreateEcsMultipleResp) String() string
- type CreateEcsReq
- func (*CreateEcsReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEcsReq) GetAccountName() string
- func (x *CreateEcsReq) GetAmount() int32
- func (x *CreateEcsReq) GetBus() string
- func (x *CreateEcsReq) GetCategory() string
- func (x *CreateEcsReq) GetCpu() int32
- func (x *CreateEcsReq) GetDescription() string
- func (x *CreateEcsReq) GetDiskName() string
- func (x *CreateEcsReq) GetDiskSize() string
- func (x *CreateEcsReq) GetDiskType() string
- func (x *CreateEcsReq) GetDryRun() string
- func (x *CreateEcsReq) GetImageId() string
- func (x *CreateEcsReq) GetInstanceChargeType() string
- func (x *CreateEcsReq) GetInstanceName() string
- func (x *CreateEcsReq) GetInstanceType() string
- func (x *CreateEcsReq) GetInternetChargeType() InternetChargeType
- func (x *CreateEcsReq) GetInternetMaxBandwidthOut() int32
- func (x *CreateEcsReq) GetMachineName() string
- func (x *CreateEcsReq) GetMachineType() string
- func (x *CreateEcsReq) GetMemory() string
- func (x *CreateEcsReq) GetNamespace() string
- func (x *CreateEcsReq) GetNetwork() string
- func (x *CreateEcsReq) GetNetworkDataTemplate() string
- func (x *CreateEcsReq) GetNetworkModel() string
- func (x *CreateEcsReq) GetNetworkName() string
- func (x *CreateEcsReq) GetNetworkType() string
- func (x *CreateEcsReq) GetOsType() string
- func (x *CreateEcsReq) GetProvider() pbtenant.CloudProvider
- func (x *CreateEcsReq) GetRegionId() int32
- func (x *CreateEcsReq) GetSecurityGroupId() string
- func (x *CreateEcsReq) GetSshKey() string
- func (x *CreateEcsReq) GetSubnetId() string
- func (x *CreateEcsReq) GetSystemDisk() *SystemDisk
- func (x *CreateEcsReq) GetUserDataTemplate() string
- func (x *CreateEcsReq) GetVSwitchId() string
- func (x *CreateEcsReq) GetVmTemplateName() string
- func (x *CreateEcsReq) GetVmTemplateVersion() string
- func (x *CreateEcsReq) GetVpcId() string
- func (x *CreateEcsReq) GetZoneId() string
- func (*CreateEcsReq) ProtoMessage()
- func (x *CreateEcsReq) ProtoReflect() protoreflect.Message
- func (x *CreateEcsReq) Reset()
- func (x *CreateEcsReq) String() string
- type CreateEcsResp
- func (*CreateEcsResp) Descriptor() ([]byte, []int)deprecated
- func (x *CreateEcsResp) GetAccountName() string
- func (x *CreateEcsResp) GetFinished() bool
- func (x *CreateEcsResp) GetInstanceIdSets() []string
- func (x *CreateEcsResp) GetOrderId() string
- func (x *CreateEcsResp) GetProvider() pbtenant.CloudProvider
- func (x *CreateEcsResp) GetRegionId() int32
- func (x *CreateEcsResp) GetRequestId() string
- func (x *CreateEcsResp) GetTradePrice() float32
- func (*CreateEcsResp) ProtoMessage()
- func (x *CreateEcsResp) ProtoReflect() protoreflect.Message
- func (x *CreateEcsResp) Reset()
- func (x *CreateEcsResp) String() string
- type DeleteEcsReq
- func (*DeleteEcsReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteEcsReq) GetAccountName() string
- func (x *DeleteEcsReq) GetDeletePublicip() string
- func (x *DeleteEcsReq) GetDeleteVolume() string
- func (x *DeleteEcsReq) GetDiskName() string
- func (x *DeleteEcsReq) GetDryRun() string
- func (x *DeleteEcsReq) GetForce() string
- func (x *DeleteEcsReq) GetInstanceIds() string
- func (x *DeleteEcsReq) GetInstanceName() string
- func (x *DeleteEcsReq) GetNamespace() string
- func (x *DeleteEcsReq) GetProvider() pbtenant.CloudProvider
- func (x *DeleteEcsReq) GetRegionId() int32
- func (x *DeleteEcsReq) GetTerminateSubscription() string
- func (*DeleteEcsReq) ProtoMessage()
- func (x *DeleteEcsReq) ProtoReflect() protoreflect.Message
- func (x *DeleteEcsReq) Reset()
- func (x *DeleteEcsReq) String() string
- type DeleteEcsResp
- func (*DeleteEcsResp) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteEcsResp) GetAccountName() string
- func (x *DeleteEcsResp) GetProvider() pbtenant.CloudProvider
- func (x *DeleteEcsResp) GetRegionId() int32
- func (x *DeleteEcsResp) GetRequestId() string
- func (*DeleteEcsResp) ProtoMessage()
- func (x *DeleteEcsResp) ProtoReflect() protoreflect.Message
- func (x *DeleteEcsResp) Reset()
- func (x *DeleteEcsResp) String() string
- type EcsInstance
- func (*EcsInstance) Descriptor() ([]byte, []int)deprecated
- func (x *EcsInstance) GetAccountName() string
- func (x *EcsInstance) GetCpu() string
- func (x *EcsInstance) GetCreationTime() string
- func (x *EcsInstance) GetDescription() string
- func (x *EcsInstance) GetExpireTime() string
- func (x *EcsInstance) GetInnerIps() []string
- func (x *EcsInstance) GetInstanceChargeType() string
- func (x *EcsInstance) GetInstanceId() string
- func (x *EcsInstance) GetInstanceName() string
- func (x *EcsInstance) GetInstanceType() string
- func (x *EcsInstance) GetMemory() string
- func (x *EcsInstance) GetNamespace() string
- func (x *EcsInstance) GetNode() string
- func (x *EcsInstance) GetProvider() pbtenant.CloudProvider
- func (x *EcsInstance) GetPublicIps() []string
- func (x *EcsInstance) GetRegionName() string
- func (x *EcsInstance) GetResourceGroupId() string
- func (x *EcsInstance) GetStatus() string
- func (x *EcsInstance) GetVpcId() string
- func (*EcsInstance) ProtoMessage()
- func (x *EcsInstance) ProtoReflect() protoreflect.Message
- func (x *EcsInstance) Reset()
- func (x *EcsInstance) String() string
- type EcsServiceClient
- type EcsServiceServer
- type InternetChargeType
- func (InternetChargeType) Descriptor() protoreflect.EnumDescriptor
- func (x InternetChargeType) Enum() *InternetChargeType
- func (InternetChargeType) EnumDescriptor() ([]byte, []int)deprecated
- func (x InternetChargeType) Number() protoreflect.EnumNumber
- func (x InternetChargeType) String() string
- func (InternetChargeType) Type() protoreflect.EnumType
- type ListAllReq
- type ListDetailReq
- func (*ListDetailReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListDetailReq) GetAccountName() string
- func (x *ListDetailReq) GetNamespace() string
- func (x *ListDetailReq) GetNextToken() string
- func (x *ListDetailReq) GetPageNumber() int32
- func (x *ListDetailReq) GetPageSize() int32
- func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider
- func (x *ListDetailReq) GetRegionId() int32
- func (*ListDetailReq) ProtoMessage()
- func (x *ListDetailReq) ProtoReflect() protoreflect.Message
- func (x *ListDetailReq) Reset()
- func (x *ListDetailReq) String() string
- type ListDetailResp
- func (*ListDetailResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListDetailResp) GetEcses() []*EcsInstance
- func (x *ListDetailResp) GetFinished() bool
- func (x *ListDetailResp) GetNextToken() string
- func (x *ListDetailResp) GetPageNumber() int32
- func (x *ListDetailResp) GetPageSize() int32
- func (x *ListDetailResp) GetRequestId() string
- func (*ListDetailResp) ProtoMessage()
- func (x *ListDetailResp) ProtoReflect() protoreflect.Message
- func (x *ListDetailResp) Reset()
- func (x *ListDetailResp) String() string
- type ListReq
- type ListResp
- type SystemDisk
- func (*SystemDisk) Descriptor() ([]byte, []int)deprecated
- func (x *SystemDisk) GetAutoSnapshotPolicyId() string
- func (x *SystemDisk) GetCategory() string
- func (x *SystemDisk) GetDescription() string
- func (x *SystemDisk) GetDiskName() string
- func (x *SystemDisk) GetPerformanceLevel() string
- func (x *SystemDisk) GetSize() string
- func (*SystemDisk) ProtoMessage()
- func (x *SystemDisk) ProtoReflect() protoreflect.Message
- func (x *SystemDisk) Reset()
- func (x *SystemDisk) String() string
- type UnimplementedEcsServiceServer
- func (UnimplementedEcsServiceServer) ActionEcs(context.Context, *ActionReq) (*ActionResp, error)
- func (UnimplementedEcsServiceServer) CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error)
- func (UnimplementedEcsServiceServer) CreateMultipleEcs(context.Context, *CreateEcsMultipleReq) (*CreateEcsMultipleResp, error)
- func (UnimplementedEcsServiceServer) DeleteEcs(context.Context, *DeleteEcsReq) (*DeleteEcsResp, error)
- func (UnimplementedEcsServiceServer) ListEcs(context.Context, *ListReq) (*ListResp, error)
- func (UnimplementedEcsServiceServer) ListEcsAll(context.Context, *ListAllReq) (*ListResp, error)
- func (UnimplementedEcsServiceServer) ListEcsDetail(context.Context, *ListDetailReq) (*ListDetailResp, error)
- func (UnimplementedEcsServiceServer) UpdateEcs(context.Context, *UpdateEcsReq) (*UpdateEcsResp, error)
- type UnsafeEcsServiceServer
- type UpdateEcsReq
- func (*UpdateEcsReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateEcsReq) GetAccountName() string
- func (x *UpdateEcsReq) GetCpu() string
- func (x *UpdateEcsReq) GetDescription() string
- func (x *UpdateEcsReq) GetHostName() string
- func (x *UpdateEcsReq) GetInstanceIds() string
- func (x *UpdateEcsReq) GetInstanceName() string
- func (x *UpdateEcsReq) GetIsRestart() bool
- func (x *UpdateEcsReq) GetMemory() string
- func (x *UpdateEcsReq) GetNamespace() string
- func (x *UpdateEcsReq) GetPassword() string
- func (x *UpdateEcsReq) GetProvider() pbtenant.CloudProvider
- func (x *UpdateEcsReq) GetRegionId() int32
- func (x *UpdateEcsReq) GetSecurityGroupIds() string
- func (*UpdateEcsReq) ProtoMessage()
- func (x *UpdateEcsReq) ProtoReflect() protoreflect.Message
- func (x *UpdateEcsReq) Reset()
- func (x *UpdateEcsReq) String() string
- type UpdateEcsResp
- func (*UpdateEcsResp) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateEcsResp) GetAccountName() string
- func (x *UpdateEcsResp) GetProvider() pbtenant.CloudProvider
- func (x *UpdateEcsResp) GetRegionId() int32
- func (x *UpdateEcsResp) GetRequestId() string
- func (*UpdateEcsResp) ProtoMessage()
- func (x *UpdateEcsResp) ProtoReflect() protoreflect.Message
- func (x *UpdateEcsResp) Reset()
- func (x *UpdateEcsResp) String() string
Constants ¶
This section is empty.
Variables ¶
var ( InternetChargeType_name = map[int32]string{ 0: "PayByBandwidth", 1: "PayByTraffic", } InternetChargeType_value = map[string]int32{ "PayByBandwidth": 0, "PayByTraffic": 1, } )
Enum value maps for InternetChargeType.
var ( ActionType_name = map[int32]string{ 0: "start", 1: "stop", 2: "restart", } ActionType_value = map[string]int32{ "start": 0, "stop": 1, "restart": 2, } )
Enum value maps for ActionType.
var EcsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbecs.EcsService", HandlerType: (*EcsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateMultipleEcs", Handler: _EcsService_CreateMultipleEcs_Handler, }, { MethodName: "CreateEcs", Handler: _EcsService_CreateEcs_Handler, }, { MethodName: "DeleteEcs", Handler: _EcsService_DeleteEcs_Handler, }, { MethodName: "UpdateEcs", Handler: _EcsService_UpdateEcs_Handler, }, { MethodName: "ListEcsDetail", Handler: _EcsService_ListEcsDetail_Handler, }, { MethodName: "ListEcs", Handler: _EcsService_ListEcs_Handler, }, { MethodName: "ListEcsAll", Handler: _EcsService_ListEcsAll_Handler, }, { MethodName: "ActionEcs", Handler: _EcsService_ActionEcs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "idl/pbecs/ecs.proto", }
EcsService_ServiceDesc is the grpc.ServiceDesc for EcsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_idl_pbecs_ecs_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEcsServiceHandler ¶
func RegisterEcsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEcsServiceHandler registers the http handlers for service EcsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEcsServiceHandlerClient ¶
func RegisterEcsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EcsServiceClient) error
RegisterEcsServiceHandlerClient registers the http handlers for service EcsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EcsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EcsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EcsServiceClient" to call the correct interceptors.
func RegisterEcsServiceHandlerFromEndpoint ¶
func RegisterEcsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEcsServiceHandlerFromEndpoint is same as RegisterEcsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEcsServiceHandlerServer ¶
func RegisterEcsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EcsServiceServer) error
RegisterEcsServiceHandlerServer registers the http handlers for service EcsService to "mux". UnaryRPC :call EcsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEcsServiceHandlerFromEndpoint instead.
func RegisterEcsServiceServer ¶
func RegisterEcsServiceServer(s grpc.ServiceRegistrar, srv EcsServiceServer)
Types ¶
type ActionReq ¶
type ActionReq struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 区域Id,参考 tenant.proto 中的各个云的区域 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` //命名空间 Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` //虚拟机名称 VmName string `protobuf:"bytes,5,opt,name=vm_name,json=vmName,proto3" json:"vm_name,omitempty"` //虚拟机操作状态 ActionType ActionType `protobuf:"varint,6,opt,name=action_type,json=actionType,proto3,enum=pbecs.ActionType" json:"action_type,omitempty"` // contains filtered or unexported fields }
func (*ActionReq) GetActionType ¶
func (x *ActionReq) GetActionType() ActionType
func (*ActionReq) GetProvider ¶
func (x *ActionReq) GetProvider() pbtenant.CloudProvider
func (*ActionReq) ProtoReflect ¶
func (x *ActionReq) ProtoReflect() protoreflect.Message
type ActionResp ¶
type ActionResp struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // Ecs 机器集合 Ecses []*EcsInstance `protobuf:"bytes,3,rep,name=ecses,proto3" json:"ecses,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 Finished bool `protobuf:"varint,4,opt,name=finished,proto3" json:"finished,omitempty"` //vm状态 Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ActionResp) Descriptor
deprecated
func (*ActionResp) Descriptor() ([]byte, []int)
Deprecated: Use ActionResp.ProtoReflect.Descriptor instead.
func (*ActionResp) GetAccountName ¶
func (x *ActionResp) GetAccountName() string
func (*ActionResp) GetEcses ¶
func (x *ActionResp) GetEcses() []*EcsInstance
func (*ActionResp) GetFinished ¶
func (x *ActionResp) GetFinished() bool
func (*ActionResp) GetProvider ¶
func (x *ActionResp) GetProvider() pbtenant.CloudProvider
func (*ActionResp) GetStatus ¶
func (x *ActionResp) GetStatus() string
func (*ActionResp) ProtoMessage ¶
func (*ActionResp) ProtoMessage()
func (*ActionResp) ProtoReflect ¶
func (x *ActionResp) ProtoReflect() protoreflect.Message
func (*ActionResp) Reset ¶
func (x *ActionResp) Reset()
func (*ActionResp) String ¶
func (x *ActionResp) String() string
type ActionType ¶
type ActionType int32
虚拟机状态操作
const ( //启动 ActionType_start ActionType = 0 //停止 ActionType_stop ActionType = 1 //重启 ActionType_restart ActionType = 2 )
func (ActionType) Descriptor ¶
func (ActionType) Descriptor() protoreflect.EnumDescriptor
func (ActionType) Enum ¶
func (x ActionType) Enum() *ActionType
func (ActionType) EnumDescriptor
deprecated
func (ActionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ActionType.Descriptor instead.
func (ActionType) Number ¶
func (x ActionType) Number() protoreflect.EnumNumber
func (ActionType) String ¶
func (x ActionType) String() string
func (ActionType) Type ¶
func (ActionType) Type() protoreflect.EnumType
type CreateEcsMultipleReq ¶
type CreateEcsMultipleReq struct { CreateEcsReqs []*CreateEcsReq `protobuf:"bytes,1,rep,name=createEcsReqs,proto3" json:"createEcsReqs,omitempty"` // contains filtered or unexported fields }
创建多家云ECS入参
func (*CreateEcsMultipleReq) Descriptor
deprecated
func (*CreateEcsMultipleReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateEcsMultipleReq.ProtoReflect.Descriptor instead.
func (*CreateEcsMultipleReq) GetCreateEcsReqs ¶
func (x *CreateEcsMultipleReq) GetCreateEcsReqs() []*CreateEcsReq
func (*CreateEcsMultipleReq) ProtoMessage ¶
func (*CreateEcsMultipleReq) ProtoMessage()
func (*CreateEcsMultipleReq) ProtoReflect ¶
func (x *CreateEcsMultipleReq) ProtoReflect() protoreflect.Message
func (*CreateEcsMultipleReq) Reset ¶
func (x *CreateEcsMultipleReq) Reset()
func (*CreateEcsMultipleReq) String ¶
func (x *CreateEcsMultipleReq) String() string
type CreateEcsMultipleResp ¶
type CreateEcsMultipleResp struct { // 请求ID RequestId []string `protobuf:"bytes,1,rep,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` // contains filtered or unexported fields }
创建多家云ECS返回值
func (*CreateEcsMultipleResp) Descriptor
deprecated
func (*CreateEcsMultipleResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateEcsMultipleResp.ProtoReflect.Descriptor instead.
func (*CreateEcsMultipleResp) GetFinished ¶
func (x *CreateEcsMultipleResp) GetFinished() bool
func (*CreateEcsMultipleResp) GetRequestId ¶
func (x *CreateEcsMultipleResp) GetRequestId() []string
func (*CreateEcsMultipleResp) ProtoMessage ¶
func (*CreateEcsMultipleResp) ProtoMessage()
func (*CreateEcsMultipleResp) ProtoReflect ¶
func (x *CreateEcsMultipleResp) ProtoReflect() protoreflect.Message
func (*CreateEcsMultipleResp) Reset ¶
func (x *CreateEcsMultipleResp) Reset()
func (*CreateEcsMultipleResp) String ¶
func (x *CreateEcsMultipleResp) String() string
type CreateEcsReq ¶
type CreateEcsReq struct { // 云类型 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账号名称 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 地域,数据中心 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` //镜像id ImageId string `protobuf:"bytes,4,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` // 实例的付费方式 InstanceChargeType string `protobuf:"bytes,5,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` //实例的资源规格 InstanceType string `protobuf:"bytes,6,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` // 安全组id SecurityGroupId string `protobuf:"bytes,7,opt,name=security_group_id,json=securityGroupId,proto3" json:"security_group_id,omitempty"` //交换机id VSwitchId string `protobuf:"bytes,8,opt,name=v_switch_id,json=vSwitchId,proto3" json:"v_switch_id,omitempty"` //实例名称 InstanceName string `protobuf:"bytes,9,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` //实例描述 Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` //可用区id ZoneId string `protobuf:"bytes,11,opt,name=zone_id,json=zoneId,proto3" json:"zone_id,omitempty"` //系统磁盘 SystemDisk *SystemDisk `protobuf:"bytes,12,opt,name=system_disk,json=systemDisk,proto3" json:"system_disk,omitempty"` //创建ECS的数量 Amount int32 `protobuf:"varint,13,opt,name=amount,proto3" json:"amount,omitempty"` //预检此次请求,为true时请求通过,则返回 Request validation has been passed with DryRun flag set DryRun string `protobuf:"bytes,14,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` //数据盘N的云盘种类。取值范围:cloud_efficiency:高效云盘;cloud_ssd:SSD云盘;cloud_essd:ESSD云盘;cloud:普通云盘。 Category string `protobuf:"bytes,15,opt,name=category,proto3" json:"category,omitempty"` //网络计费类型。取值范围:PayByBandwidth:按固定带宽计费。PayByTraffic(默认):按使用流量计费 InternetChargeType InternetChargeType `` /* 149-byte string literal not displayed */ //公网入带宽最大值,单位为Mbit/s。创建的实例如果参数InternetMaxBandwidthOut的值大于0,则自动为实例分配公网IP。 InternetMaxBandwidthOut int32 `` /* 136-byte string literal not displayed */ // vpc id 华为云必需 VpcId string `protobuf:"bytes,18,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` //待创建云服务器所在的子网信息。需要指定vpcid对应VPC下已创建的子网(subnet)的网络ID,UUID格式。华为云必需 SubnetId string `protobuf:"bytes,19,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` //-------------harvester--------------- //命名空间 Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` //vCpu Cpu int32 `protobuf:"varint,21,opt,name=cpu,proto3" json:"cpu,omitempty"` //memory Memory string `protobuf:"bytes,22,opt,name=memory,proto3" json:"memory,omitempty"` //ssh_key SshKey string `protobuf:"bytes,23,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` //diskName DiskName string `protobuf:"bytes,24,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` //disk类型 disk,cd-rom DiskType string `protobuf:"bytes,25,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` //卷大小 DiskSize string `protobuf:"bytes,26,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` //bus 总线指示要模拟的磁盘设备的类型,支持virtio, sata, scsi. Bus string `protobuf:"bytes,27,opt,name=bus,proto3" json:"bus,omitempty"` //网络名称 NetworkName string `protobuf:"bytes,28,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` //network_model 网络模式,支持e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. NetworkModel string `protobuf:"bytes,29,opt,name=network_model,json=networkModel,proto3" json:"network_model,omitempty"` //网络 Network string `protobuf:"bytes,30,opt,name=network,proto3" json:"network,omitempty"` //网络连接方法,默认bridge NetworkType string `protobuf:"bytes,31,opt,name=network_type,json=networkType,proto3" json:"network_type,omitempty"` //osType //系统类型 OsType string `protobuf:"bytes,32,opt,name=os_type,json=osType,proto3" json:"os_type,omitempty"` //machineType //机器类型 none、q35、pc MachineType string `protobuf:"bytes,33,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` //machineName //主机名称,默认为虚拟机名称 MachineName string `protobuf:"bytes,34,opt,name=machine_name,json=machineName,proto3" json:"machine_name,omitempty"` //userDataTemplate //用户数据模板 UserDataTemplate string `protobuf:"bytes,35,opt,name=user_data_template,json=userDataTemplate,proto3" json:"user_data_template,omitempty"` //networkDataTemplate //网络数据模板 NetworkDataTemplate string `protobuf:"bytes,36,opt,name=network_data_template,json=networkDataTemplate,proto3" json:"network_data_template,omitempty"` //vmTemplateName //模板名称 VmTemplateName string `protobuf:"bytes,37,opt,name=vm_template_name,json=vmTemplateName,proto3" json:"vm_template_name,omitempty"` //vmTemplateVersion //版本号 VmTemplateVersion string `protobuf:"bytes,38,opt,name=vm_template_version,json=vmTemplateVersion,proto3" json:"vm_template_version,omitempty"` // contains filtered or unexported fields }
创建ECS入参
func (*CreateEcsReq) Descriptor
deprecated
func (*CreateEcsReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateEcsReq.ProtoReflect.Descriptor instead.
func (*CreateEcsReq) GetAccountName ¶
func (x *CreateEcsReq) GetAccountName() string
func (*CreateEcsReq) GetAmount ¶
func (x *CreateEcsReq) GetAmount() int32
func (*CreateEcsReq) GetBus ¶
func (x *CreateEcsReq) GetBus() string
func (*CreateEcsReq) GetCategory ¶
func (x *CreateEcsReq) GetCategory() string
func (*CreateEcsReq) GetCpu ¶
func (x *CreateEcsReq) GetCpu() int32
func (*CreateEcsReq) GetDescription ¶
func (x *CreateEcsReq) GetDescription() string
func (*CreateEcsReq) GetDiskName ¶
func (x *CreateEcsReq) GetDiskName() string
func (*CreateEcsReq) GetDiskSize ¶
func (x *CreateEcsReq) GetDiskSize() string
func (*CreateEcsReq) GetDiskType ¶
func (x *CreateEcsReq) GetDiskType() string
func (*CreateEcsReq) GetDryRun ¶
func (x *CreateEcsReq) GetDryRun() string
func (*CreateEcsReq) GetImageId ¶
func (x *CreateEcsReq) GetImageId() string
func (*CreateEcsReq) GetInstanceChargeType ¶
func (x *CreateEcsReq) GetInstanceChargeType() string
func (*CreateEcsReq) GetInstanceName ¶
func (x *CreateEcsReq) GetInstanceName() string
func (*CreateEcsReq) GetInstanceType ¶
func (x *CreateEcsReq) GetInstanceType() string
func (*CreateEcsReq) GetInternetChargeType ¶
func (x *CreateEcsReq) GetInternetChargeType() InternetChargeType
func (*CreateEcsReq) GetInternetMaxBandwidthOut ¶
func (x *CreateEcsReq) GetInternetMaxBandwidthOut() int32
func (*CreateEcsReq) GetMachineName ¶
func (x *CreateEcsReq) GetMachineName() string
func (*CreateEcsReq) GetMachineType ¶
func (x *CreateEcsReq) GetMachineType() string
func (*CreateEcsReq) GetMemory ¶
func (x *CreateEcsReq) GetMemory() string
func (*CreateEcsReq) GetNamespace ¶
func (x *CreateEcsReq) GetNamespace() string
func (*CreateEcsReq) GetNetwork ¶
func (x *CreateEcsReq) GetNetwork() string
func (*CreateEcsReq) GetNetworkDataTemplate ¶
func (x *CreateEcsReq) GetNetworkDataTemplate() string
func (*CreateEcsReq) GetNetworkModel ¶
func (x *CreateEcsReq) GetNetworkModel() string
func (*CreateEcsReq) GetNetworkName ¶
func (x *CreateEcsReq) GetNetworkName() string
func (*CreateEcsReq) GetNetworkType ¶
func (x *CreateEcsReq) GetNetworkType() string
func (*CreateEcsReq) GetOsType ¶
func (x *CreateEcsReq) GetOsType() string
func (*CreateEcsReq) GetProvider ¶
func (x *CreateEcsReq) GetProvider() pbtenant.CloudProvider
func (*CreateEcsReq) GetRegionId ¶
func (x *CreateEcsReq) GetRegionId() int32
func (*CreateEcsReq) GetSecurityGroupId ¶
func (x *CreateEcsReq) GetSecurityGroupId() string
func (*CreateEcsReq) GetSshKey ¶
func (x *CreateEcsReq) GetSshKey() string
func (*CreateEcsReq) GetSubnetId ¶
func (x *CreateEcsReq) GetSubnetId() string
func (*CreateEcsReq) GetSystemDisk ¶
func (x *CreateEcsReq) GetSystemDisk() *SystemDisk
func (*CreateEcsReq) GetUserDataTemplate ¶
func (x *CreateEcsReq) GetUserDataTemplate() string
func (*CreateEcsReq) GetVSwitchId ¶
func (x *CreateEcsReq) GetVSwitchId() string
func (*CreateEcsReq) GetVmTemplateName ¶
func (x *CreateEcsReq) GetVmTemplateName() string
func (*CreateEcsReq) GetVmTemplateVersion ¶
func (x *CreateEcsReq) GetVmTemplateVersion() string
func (*CreateEcsReq) GetVpcId ¶
func (x *CreateEcsReq) GetVpcId() string
func (*CreateEcsReq) GetZoneId ¶
func (x *CreateEcsReq) GetZoneId() string
func (*CreateEcsReq) ProtoMessage ¶
func (*CreateEcsReq) ProtoMessage()
func (*CreateEcsReq) ProtoReflect ¶
func (x *CreateEcsReq) ProtoReflect() protoreflect.Message
func (*CreateEcsReq) Reset ¶
func (x *CreateEcsReq) Reset()
func (*CreateEcsReq) String ¶
func (x *CreateEcsReq) String() string
type CreateEcsResp ¶
type CreateEcsResp struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 区域Id,参考 tenant.proto 中的各个云的区域 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` // 请求ID RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 订单id OrderId string `protobuf:"bytes,5,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 订单成交价 TradePrice float32 `protobuf:"fixed32,6,opt,name=trade_price,json=tradePrice,proto3" json:"trade_price,omitempty"` //实例ID(InstanceIdSet)列表 InstanceIdSets []string `protobuf:"bytes,7,rep,name=instance_id_sets,json=instanceIdSets,proto3" json:"instance_id_sets,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 Finished bool `protobuf:"varint,8,opt,name=finished,proto3" json:"finished,omitempty"` // contains filtered or unexported fields }
创建ECS返回值
func (*CreateEcsResp) Descriptor
deprecated
func (*CreateEcsResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateEcsResp.ProtoReflect.Descriptor instead.
func (*CreateEcsResp) GetAccountName ¶
func (x *CreateEcsResp) GetAccountName() string
func (*CreateEcsResp) GetFinished ¶
func (x *CreateEcsResp) GetFinished() bool
func (*CreateEcsResp) GetInstanceIdSets ¶
func (x *CreateEcsResp) GetInstanceIdSets() []string
func (*CreateEcsResp) GetOrderId ¶
func (x *CreateEcsResp) GetOrderId() string
func (*CreateEcsResp) GetProvider ¶
func (x *CreateEcsResp) GetProvider() pbtenant.CloudProvider
func (*CreateEcsResp) GetRegionId ¶
func (x *CreateEcsResp) GetRegionId() int32
func (*CreateEcsResp) GetRequestId ¶
func (x *CreateEcsResp) GetRequestId() string
func (*CreateEcsResp) GetTradePrice ¶
func (x *CreateEcsResp) GetTradePrice() float32
func (*CreateEcsResp) ProtoMessage ¶
func (*CreateEcsResp) ProtoMessage()
func (*CreateEcsResp) ProtoReflect ¶
func (x *CreateEcsResp) ProtoReflect() protoreflect.Message
func (*CreateEcsResp) Reset ¶
func (x *CreateEcsResp) Reset()
func (*CreateEcsResp) String ¶
func (x *CreateEcsResp) String() string
type DeleteEcsReq ¶
type DeleteEcsReq struct { // 云类型 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账号名称 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 地域,数据中心 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` //是否只预检此次请求是否只预检此次请求。true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DRYRUN.SUCCESS。 //false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。 DryRun string `protobuf:"bytes,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` //Force是否强制释放**运行中**;true:强制释放运行中(Running)的实例。强制释放相当于断电,实例内存以及存储中的临时数据都会被擦除,无法恢复。 //false(默认值):正常释放实例,此时实例必须处于已停止(Stopped)状态 Force string `protobuf:"bytes,5,opt,name=force,proto3" json:"force,omitempty"` //是否释放已到期的包年包月实例 true,false TerminateSubscription string `protobuf:"bytes,6,opt,name=terminate_subscription,json=terminateSubscription,proto3" json:"terminate_subscription,omitempty"` //实例ID数组以”,“分割。列:i-8vb2nlubkow0fxbq2218,i-8vb2nlubkow0fxbq2216 InstanceIds string `protobuf:"bytes,7,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` //配置删除云服务器是否删除云服务器绑定的弹性IP。如果选择不删除,则系统仅做解绑定操作,保留弹性IP资源。 //取值为true或false。默认false;华为云 DeletePublicip string `protobuf:"bytes,8,opt,name=delete_publicip,json=deletePublicip,proto3" json:"delete_publicip,omitempty"` //配置删除云服务器是否删除云服务器对应的数据盘,如果选择不删除,则系统仅做卸载操作,保留云硬盘资源。默认为false。 //取值为true或false。默认false;华为云 DeleteVolume string `protobuf:"bytes,9,opt,name=delete_volume,json=deleteVolume,proto3" json:"delete_volume,omitempty"` //----------------harvester---------------- //虚拟机名称 InstanceName string `protobuf:"bytes,10,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` //namespace Namespace string `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"` //diskName,以“,” 分割 DiskName string `protobuf:"bytes,12,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` // contains filtered or unexported fields }
删除ECS入参
func (*DeleteEcsReq) Descriptor
deprecated
func (*DeleteEcsReq) Descriptor() ([]byte, []int)
Deprecated: Use DeleteEcsReq.ProtoReflect.Descriptor instead.
func (*DeleteEcsReq) GetAccountName ¶
func (x *DeleteEcsReq) GetAccountName() string
func (*DeleteEcsReq) GetDeletePublicip ¶
func (x *DeleteEcsReq) GetDeletePublicip() string
func (*DeleteEcsReq) GetDeleteVolume ¶
func (x *DeleteEcsReq) GetDeleteVolume() string
func (*DeleteEcsReq) GetDiskName ¶
func (x *DeleteEcsReq) GetDiskName() string
func (*DeleteEcsReq) GetDryRun ¶
func (x *DeleteEcsReq) GetDryRun() string
func (*DeleteEcsReq) GetForce ¶
func (x *DeleteEcsReq) GetForce() string
func (*DeleteEcsReq) GetInstanceIds ¶
func (x *DeleteEcsReq) GetInstanceIds() string
func (*DeleteEcsReq) GetInstanceName ¶
func (x *DeleteEcsReq) GetInstanceName() string
func (*DeleteEcsReq) GetNamespace ¶
func (x *DeleteEcsReq) GetNamespace() string
func (*DeleteEcsReq) GetProvider ¶
func (x *DeleteEcsReq) GetProvider() pbtenant.CloudProvider
func (*DeleteEcsReq) GetRegionId ¶
func (x *DeleteEcsReq) GetRegionId() int32
func (*DeleteEcsReq) GetTerminateSubscription ¶
func (x *DeleteEcsReq) GetTerminateSubscription() string
func (*DeleteEcsReq) ProtoMessage ¶
func (*DeleteEcsReq) ProtoMessage()
func (*DeleteEcsReq) ProtoReflect ¶
func (x *DeleteEcsReq) ProtoReflect() protoreflect.Message
func (*DeleteEcsReq) Reset ¶
func (x *DeleteEcsReq) Reset()
func (*DeleteEcsReq) String ¶
func (x *DeleteEcsReq) String() string
type DeleteEcsResp ¶
type DeleteEcsResp struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 区域Id,参考 tenant.proto 中的各个云的区域 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` // 请求ID RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
删除ECS返回值
func (*DeleteEcsResp) Descriptor
deprecated
func (*DeleteEcsResp) Descriptor() ([]byte, []int)
Deprecated: Use DeleteEcsResp.ProtoReflect.Descriptor instead.
func (*DeleteEcsResp) GetAccountName ¶
func (x *DeleteEcsResp) GetAccountName() string
func (*DeleteEcsResp) GetProvider ¶
func (x *DeleteEcsResp) GetProvider() pbtenant.CloudProvider
func (*DeleteEcsResp) GetRegionId ¶
func (x *DeleteEcsResp) GetRegionId() int32
func (*DeleteEcsResp) GetRequestId ¶
func (x *DeleteEcsResp) GetRequestId() string
func (*DeleteEcsResp) ProtoMessage ¶
func (*DeleteEcsResp) ProtoMessage()
func (*DeleteEcsResp) ProtoReflect ¶
func (x *DeleteEcsResp) ProtoReflect() protoreflect.Message
func (*DeleteEcsResp) Reset ¶
func (x *DeleteEcsResp) Reset()
func (*DeleteEcsResp) String ¶
func (x *DeleteEcsResp) String() string
type EcsInstance ¶
type EcsInstance struct { // 云类型 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账号名称 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 实例id InstanceId string `protobuf:"bytes,3,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` // 实例名称 InstanceName string `protobuf:"bytes,4,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` // 地域,数据中心 RegionName string `protobuf:"bytes,5,opt,name=region_name,json=regionName,proto3" json:"region_name,omitempty"` // 公网ip PublicIps []string `protobuf:"bytes,6,rep,name=public_ips,json=publicIps,proto3" json:"public_ips,omitempty"` // 实例类型 InstanceType string `protobuf:"bytes,7,opt,name=instance_type,json=instanceType,proto3" json:"instance_type,omitempty"` // vcpu数 Cpu string `protobuf:"bytes,8,opt,name=cpu,proto3" json:"cpu,omitempty"` // 内存MB Memory string `protobuf:"bytes,9,opt,name=memory,proto3" json:"memory,omitempty"` // 实例描述 Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` // 状态 Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` // 创建时间,ISO8601 CreationTime string `protobuf:"bytes,12,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // 过期时间 ExpireTime string `protobuf:"bytes,13,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` // 内网ip InnerIps []string `protobuf:"bytes,14,rep,name=inner_ips,json=innerIps,proto3" json:"inner_ips,omitempty"` // vpc id VpcId string `protobuf:"bytes,15,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` // 资源组id ResourceGroupId string `protobuf:"bytes,16,opt,name=resource_group_id,json=resourceGroupId,proto3" json:"resource_group_id,omitempty"` // 收费类型 InstanceChargeType string `protobuf:"bytes,17,opt,name=instance_charge_type,json=instanceChargeType,proto3" json:"instance_charge_type,omitempty"` // -----------harvester--------- //虚拟机所在的节点 Node string `protobuf:"bytes,18,opt,name=node,proto3" json:"node,omitempty"` //namespace Namespace string `protobuf:"bytes,20,opt,name=namespace,proto3" json:"namespace,omitempty"` // contains filtered or unexported fields }
ECS 实例
func (*EcsInstance) Descriptor
deprecated
func (*EcsInstance) Descriptor() ([]byte, []int)
Deprecated: Use EcsInstance.ProtoReflect.Descriptor instead.
func (*EcsInstance) GetAccountName ¶
func (x *EcsInstance) GetAccountName() string
func (*EcsInstance) GetCpu ¶
func (x *EcsInstance) GetCpu() string
func (*EcsInstance) GetCreationTime ¶
func (x *EcsInstance) GetCreationTime() string
func (*EcsInstance) GetDescription ¶
func (x *EcsInstance) GetDescription() string
func (*EcsInstance) GetExpireTime ¶
func (x *EcsInstance) GetExpireTime() string
func (*EcsInstance) GetInnerIps ¶
func (x *EcsInstance) GetInnerIps() []string
func (*EcsInstance) GetInstanceChargeType ¶
func (x *EcsInstance) GetInstanceChargeType() string
func (*EcsInstance) GetInstanceId ¶
func (x *EcsInstance) GetInstanceId() string
func (*EcsInstance) GetInstanceName ¶
func (x *EcsInstance) GetInstanceName() string
func (*EcsInstance) GetInstanceType ¶
func (x *EcsInstance) GetInstanceType() string
func (*EcsInstance) GetMemory ¶
func (x *EcsInstance) GetMemory() string
func (*EcsInstance) GetNamespace ¶
func (x *EcsInstance) GetNamespace() string
func (*EcsInstance) GetNode ¶
func (x *EcsInstance) GetNode() string
func (*EcsInstance) GetProvider ¶
func (x *EcsInstance) GetProvider() pbtenant.CloudProvider
func (*EcsInstance) GetPublicIps ¶
func (x *EcsInstance) GetPublicIps() []string
func (*EcsInstance) GetRegionName ¶
func (x *EcsInstance) GetRegionName() string
func (*EcsInstance) GetResourceGroupId ¶
func (x *EcsInstance) GetResourceGroupId() string
func (*EcsInstance) GetStatus ¶
func (x *EcsInstance) GetStatus() string
func (*EcsInstance) GetVpcId ¶
func (x *EcsInstance) GetVpcId() string
func (*EcsInstance) ProtoMessage ¶
func (*EcsInstance) ProtoMessage()
func (*EcsInstance) ProtoReflect ¶
func (x *EcsInstance) ProtoReflect() protoreflect.Message
func (*EcsInstance) Reset ¶
func (x *EcsInstance) Reset()
func (*EcsInstance) String ¶
func (x *EcsInstance) String() string
type EcsServiceClient ¶
type EcsServiceClient interface { // 创建多家云ECS CreateMultipleEcs(ctx context.Context, in *CreateEcsMultipleReq, opts ...grpc.CallOption) (*CreateEcsMultipleResp, error) // 创建ECS CreateEcs(ctx context.Context, in *CreateEcsReq, opts ...grpc.CallOption) (*CreateEcsResp, error) // 删除ECS DeleteEcs(ctx context.Context, in *DeleteEcsReq, opts ...grpc.CallOption) (*DeleteEcsResp, error) // 修改ECS UpdateEcs(ctx context.Context, in *UpdateEcsReq, opts ...grpc.CallOption) (*UpdateEcsResp, error) // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 ListEcsDetail(ctx context.Context, in *ListDetailReq, opts ...grpc.CallOption) (*ListDetailResp, error) // 查询ECS全量 - 根据云类型 ListEcs(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListResp, error) // 查询所有云的ECS ListEcsAll(ctx context.Context, in *ListAllReq, opts ...grpc.CallOption) (*ListResp, error) //操作ecs(start-stop-restart) ActionEcs(ctx context.Context, in *ActionReq, opts ...grpc.CallOption) (*ActionResp, error) }
EcsServiceClient is the client API for EcsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEcsServiceClient ¶
func NewEcsServiceClient(cc grpc.ClientConnInterface) EcsServiceClient
type EcsServiceServer ¶
type EcsServiceServer interface { // 创建多家云ECS CreateMultipleEcs(context.Context, *CreateEcsMultipleReq) (*CreateEcsMultipleResp, error) // 创建ECS CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error) // 删除ECS DeleteEcs(context.Context, *DeleteEcsReq) (*DeleteEcsResp, error) // 修改ECS UpdateEcs(context.Context, *UpdateEcsReq) (*UpdateEcsResp, error) // 查询ECS明细 - 支持云类型、区域、账户、分页等过滤条件 ListEcsDetail(context.Context, *ListDetailReq) (*ListDetailResp, error) // 查询ECS全量 - 根据云类型 ListEcs(context.Context, *ListReq) (*ListResp, error) // 查询所有云的ECS ListEcsAll(context.Context, *ListAllReq) (*ListResp, error) //操作ecs(start-stop-restart) ActionEcs(context.Context, *ActionReq) (*ActionResp, error) // contains filtered or unexported methods }
EcsServiceServer is the server API for EcsService service. All implementations must embed UnimplementedEcsServiceServer for forward compatibility
type InternetChargeType ¶
type InternetChargeType int32
网络计费类型
const ( //按固定带宽计费。 InternetChargeType_PayByBandwidth InternetChargeType = 0 //(默认):按使用流量计费 InternetChargeType_PayByTraffic InternetChargeType = 1 )
func (InternetChargeType) Descriptor ¶
func (InternetChargeType) Descriptor() protoreflect.EnumDescriptor
func (InternetChargeType) Enum ¶
func (x InternetChargeType) Enum() *InternetChargeType
func (InternetChargeType) EnumDescriptor
deprecated
func (InternetChargeType) EnumDescriptor() ([]byte, []int)
Deprecated: Use InternetChargeType.Descriptor instead.
func (InternetChargeType) Number ¶
func (x InternetChargeType) Number() protoreflect.EnumNumber
func (InternetChargeType) String ¶
func (x InternetChargeType) String() string
func (InternetChargeType) Type ¶
func (InternetChargeType) Type() protoreflect.EnumType
type ListAllReq ¶
type ListAllReq struct {
// contains filtered or unexported fields
}
func (*ListAllReq) Descriptor
deprecated
func (*ListAllReq) Descriptor() ([]byte, []int)
Deprecated: Use ListAllReq.ProtoReflect.Descriptor instead.
func (*ListAllReq) ProtoMessage ¶
func (*ListAllReq) ProtoMessage()
func (*ListAllReq) ProtoReflect ¶
func (x *ListAllReq) ProtoReflect() protoreflect.Message
func (*ListAllReq) Reset ¶
func (x *ListAllReq) Reset()
func (*ListAllReq) String ¶
func (x *ListAllReq) String() string
type ListDetailReq ¶
type ListDetailReq struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 区域Id,参考 tenant.proto 中的各个云的区域 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` // 分页相关参数,页码 PageNumber int32 `protobuf:"varint,4,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // 分页相关参数,每页数量 PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 分页相关参数,下一页的token NextToken string `protobuf:"bytes,6,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` //--------harvester--------- //namespace Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` // contains filtered or unexported fields }
查询ECS入参
func (*ListDetailReq) Descriptor
deprecated
func (*ListDetailReq) Descriptor() ([]byte, []int)
Deprecated: Use ListDetailReq.ProtoReflect.Descriptor instead.
func (*ListDetailReq) GetAccountName ¶
func (x *ListDetailReq) GetAccountName() string
func (*ListDetailReq) GetNamespace ¶
func (x *ListDetailReq) GetNamespace() string
func (*ListDetailReq) GetNextToken ¶
func (x *ListDetailReq) GetNextToken() string
func (*ListDetailReq) GetPageNumber ¶
func (x *ListDetailReq) GetPageNumber() int32
func (*ListDetailReq) GetPageSize ¶
func (x *ListDetailReq) GetPageSize() int32
func (*ListDetailReq) GetProvider ¶
func (x *ListDetailReq) GetProvider() pbtenant.CloudProvider
func (*ListDetailReq) GetRegionId ¶
func (x *ListDetailReq) GetRegionId() int32
func (*ListDetailReq) ProtoMessage ¶
func (*ListDetailReq) ProtoMessage()
func (*ListDetailReq) ProtoReflect ¶
func (x *ListDetailReq) ProtoReflect() protoreflect.Message
func (*ListDetailReq) Reset ¶
func (x *ListDetailReq) Reset()
func (*ListDetailReq) String ¶
func (x *ListDetailReq) String() string
type ListDetailResp ¶
type ListDetailResp struct { // Ecs 机器集合 Ecses []*EcsInstance `protobuf:"bytes,1,rep,name=ecses,proto3" json:"ecses,omitempty"` // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询 Finished bool `protobuf:"varint,2,opt,name=finished,proto3" json:"finished,omitempty"` // 分页相关参数,页码 PageNumber int32 `protobuf:"varint,3,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` // 分页相关参数,每页数量 PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 分页相关参数,下一页的token NextToken string `protobuf:"bytes,5,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // 请求id,出现问题后提供给云厂商,排查问题 RequestId string `protobuf:"bytes,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
查询ECS返回值
func (*ListDetailResp) Descriptor
deprecated
func (*ListDetailResp) Descriptor() ([]byte, []int)
Deprecated: Use ListDetailResp.ProtoReflect.Descriptor instead.
func (*ListDetailResp) GetEcses ¶
func (x *ListDetailResp) GetEcses() []*EcsInstance
func (*ListDetailResp) GetFinished ¶
func (x *ListDetailResp) GetFinished() bool
func (*ListDetailResp) GetNextToken ¶
func (x *ListDetailResp) GetNextToken() string
func (*ListDetailResp) GetPageNumber ¶
func (x *ListDetailResp) GetPageNumber() int32
func (*ListDetailResp) GetPageSize ¶
func (x *ListDetailResp) GetPageSize() int32
func (*ListDetailResp) GetRequestId ¶
func (x *ListDetailResp) GetRequestId() string
func (*ListDetailResp) ProtoMessage ¶
func (*ListDetailResp) ProtoMessage()
func (*ListDetailResp) ProtoReflect ¶
func (x *ListDetailResp) ProtoReflect() protoreflect.Message
func (*ListDetailResp) Reset ¶
func (x *ListDetailResp) Reset()
func (*ListDetailResp) String ¶
func (x *ListDetailResp) String() string
type ListReq ¶
type ListReq struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // contains filtered or unexported fields }
func (*ListReq) GetProvider ¶
func (x *ListReq) GetProvider() pbtenant.CloudProvider
func (*ListReq) ProtoReflect ¶
func (x *ListReq) ProtoReflect() protoreflect.Message
type ListResp ¶
type ListResp struct { // Ecs 机器集合 Ecses []*EcsInstance `protobuf:"bytes,1,rep,name=ecses,proto3" json:"ecses,omitempty"` // contains filtered or unexported fields }
func (*ListResp) GetEcses ¶
func (x *ListResp) GetEcses() []*EcsInstance
func (*ListResp) ProtoReflect ¶
func (x *ListResp) ProtoReflect() protoreflect.Message
type SystemDisk ¶
type SystemDisk struct { //系统盘大小,单位为GiB。取值范围:20~500。该参数的取值必须大于或者等于max{20, ImageSize}。默认值:max{40, 参数ImageId对应的镜像大小} Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` //系统盘类型。系统盘的云盘种类。取值范围:cloud_efficiency:高效云盘。cloud_ssd:SSD云盘。cloud_essd:ESSD云盘。cloud:普通云盘。 Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` //系统盘名称 DiskName string `protobuf:"bytes,3,opt,name=disk_name,json=diskName,proto3" json:"disk_name,omitempty"` //系统盘描述 Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` //创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:PL0:单盘最高随机读写IOPS 1万。PL1(默认):单盘最高随机读写IOPS 5万。PL2:单盘最高随机读写IOPS 10万。PL3:单盘最高随机读写IOPS 100万。 PerformanceLevel string `protobuf:"bytes,5,opt,name=performance_level,json=performanceLevel,proto3" json:"performance_level,omitempty"` //系统盘采用的自动快照策略ID。 AutoSnapshotPolicyId string `protobuf:"bytes,6,opt,name=auto_snapshot_policy_id,json=autoSnapshotPolicyId,proto3" json:"auto_snapshot_policy_id,omitempty"` // contains filtered or unexported fields }
系统磁盘
func (*SystemDisk) Descriptor
deprecated
func (*SystemDisk) Descriptor() ([]byte, []int)
Deprecated: Use SystemDisk.ProtoReflect.Descriptor instead.
func (*SystemDisk) GetAutoSnapshotPolicyId ¶
func (x *SystemDisk) GetAutoSnapshotPolicyId() string
func (*SystemDisk) GetCategory ¶
func (x *SystemDisk) GetCategory() string
func (*SystemDisk) GetDescription ¶
func (x *SystemDisk) GetDescription() string
func (*SystemDisk) GetDiskName ¶
func (x *SystemDisk) GetDiskName() string
func (*SystemDisk) GetPerformanceLevel ¶
func (x *SystemDisk) GetPerformanceLevel() string
func (*SystemDisk) GetSize ¶
func (x *SystemDisk) GetSize() string
func (*SystemDisk) ProtoMessage ¶
func (*SystemDisk) ProtoMessage()
func (*SystemDisk) ProtoReflect ¶
func (x *SystemDisk) ProtoReflect() protoreflect.Message
func (*SystemDisk) Reset ¶
func (x *SystemDisk) Reset()
func (*SystemDisk) String ¶
func (x *SystemDisk) String() string
type UnimplementedEcsServiceServer ¶
type UnimplementedEcsServiceServer struct { }
UnimplementedEcsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEcsServiceServer) ActionEcs ¶
func (UnimplementedEcsServiceServer) ActionEcs(context.Context, *ActionReq) (*ActionResp, error)
func (UnimplementedEcsServiceServer) CreateEcs ¶
func (UnimplementedEcsServiceServer) CreateEcs(context.Context, *CreateEcsReq) (*CreateEcsResp, error)
func (UnimplementedEcsServiceServer) CreateMultipleEcs ¶
func (UnimplementedEcsServiceServer) CreateMultipleEcs(context.Context, *CreateEcsMultipleReq) (*CreateEcsMultipleResp, error)
func (UnimplementedEcsServiceServer) DeleteEcs ¶
func (UnimplementedEcsServiceServer) DeleteEcs(context.Context, *DeleteEcsReq) (*DeleteEcsResp, error)
func (UnimplementedEcsServiceServer) ListEcs ¶
func (UnimplementedEcsServiceServer) ListEcsAll ¶
func (UnimplementedEcsServiceServer) ListEcsAll(context.Context, *ListAllReq) (*ListResp, error)
func (UnimplementedEcsServiceServer) ListEcsDetail ¶
func (UnimplementedEcsServiceServer) ListEcsDetail(context.Context, *ListDetailReq) (*ListDetailResp, error)
func (UnimplementedEcsServiceServer) UpdateEcs ¶
func (UnimplementedEcsServiceServer) UpdateEcs(context.Context, *UpdateEcsReq) (*UpdateEcsResp, error)
type UnsafeEcsServiceServer ¶
type UnsafeEcsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEcsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EcsServiceServer will result in compilation errors.
type UpdateEcsReq ¶
type UpdateEcsReq struct { // 云类型 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账号名称 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 地域,数据中心 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` //实例id InstanceIds string `protobuf:"bytes,4,opt,name=instance_ids,json=instanceIds,proto3" json:"instance_ids,omitempty"` // 实例状态不能为启动中(Starting)。重启实例后,重置生效,且必须是在ECS控制台重启或者调用API RebootInstance重启,新密码才能生效。在操作系统内部重启不能生效。 Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` //操作系统的主机名 HostName string `protobuf:"bytes,6,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` //实例名称 InstanceName string `protobuf:"bytes,7,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"` //实例描述 Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` //实例重新加入的安全组列表,安全组ID不能重复。以”,“分割 SecurityGroupIds string `protobuf:"bytes,9,opt,name=security_group_ids,json=securityGroupIds,proto3" json:"security_group_ids,omitempty"` //---------------harvester----------------- //namespace Namespace string `protobuf:"bytes,10,opt,name=namespace,proto3" json:"namespace,omitempty"` //cpu Cpu string `protobuf:"bytes,11,opt,name=cpu,proto3" json:"cpu,omitempty"` //memory Memory string `protobuf:"bytes,12,opt,name=memory,proto3" json:"memory,omitempty"` //修改配置后是否重启 IsRestart bool `protobuf:"varint,13,opt,name=is_restart,json=isRestart,proto3" json:"is_restart,omitempty"` // contains filtered or unexported fields }
更新ECS入参
func (*UpdateEcsReq) Descriptor
deprecated
func (*UpdateEcsReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateEcsReq.ProtoReflect.Descriptor instead.
func (*UpdateEcsReq) GetAccountName ¶
func (x *UpdateEcsReq) GetAccountName() string
func (*UpdateEcsReq) GetCpu ¶
func (x *UpdateEcsReq) GetCpu() string
func (*UpdateEcsReq) GetDescription ¶
func (x *UpdateEcsReq) GetDescription() string
func (*UpdateEcsReq) GetHostName ¶
func (x *UpdateEcsReq) GetHostName() string
func (*UpdateEcsReq) GetInstanceIds ¶
func (x *UpdateEcsReq) GetInstanceIds() string
func (*UpdateEcsReq) GetInstanceName ¶
func (x *UpdateEcsReq) GetInstanceName() string
func (*UpdateEcsReq) GetIsRestart ¶
func (x *UpdateEcsReq) GetIsRestart() bool
func (*UpdateEcsReq) GetMemory ¶
func (x *UpdateEcsReq) GetMemory() string
func (*UpdateEcsReq) GetNamespace ¶
func (x *UpdateEcsReq) GetNamespace() string
func (*UpdateEcsReq) GetPassword ¶
func (x *UpdateEcsReq) GetPassword() string
func (*UpdateEcsReq) GetProvider ¶
func (x *UpdateEcsReq) GetProvider() pbtenant.CloudProvider
func (*UpdateEcsReq) GetRegionId ¶
func (x *UpdateEcsReq) GetRegionId() int32
func (*UpdateEcsReq) GetSecurityGroupIds ¶
func (x *UpdateEcsReq) GetSecurityGroupIds() string
func (*UpdateEcsReq) ProtoMessage ¶
func (*UpdateEcsReq) ProtoMessage()
func (*UpdateEcsReq) ProtoReflect ¶
func (x *UpdateEcsReq) ProtoReflect() protoreflect.Message
func (*UpdateEcsReq) Reset ¶
func (x *UpdateEcsReq) Reset()
func (*UpdateEcsReq) String ¶
func (x *UpdateEcsReq) String() string
type UpdateEcsResp ¶
type UpdateEcsResp struct { // 云名称 Provider pbtenant.CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"` // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户 AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"` // 区域Id,参考 tenant.proto 中的各个云的区域 RegionId int32 `protobuf:"varint,3,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` // 请求ID RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // contains filtered or unexported fields }
更新ECS返回值
func (*UpdateEcsResp) Descriptor
deprecated
func (*UpdateEcsResp) Descriptor() ([]byte, []int)
Deprecated: Use UpdateEcsResp.ProtoReflect.Descriptor instead.
func (*UpdateEcsResp) GetAccountName ¶
func (x *UpdateEcsResp) GetAccountName() string
func (*UpdateEcsResp) GetProvider ¶
func (x *UpdateEcsResp) GetProvider() pbtenant.CloudProvider
func (*UpdateEcsResp) GetRegionId ¶
func (x *UpdateEcsResp) GetRegionId() int32
func (*UpdateEcsResp) GetRequestId ¶
func (x *UpdateEcsResp) GetRequestId() string
func (*UpdateEcsResp) ProtoMessage ¶
func (*UpdateEcsResp) ProtoMessage()
func (*UpdateEcsResp) ProtoReflect ¶
func (x *UpdateEcsResp) ProtoReflect() protoreflect.Message
func (*UpdateEcsResp) Reset ¶
func (x *UpdateEcsResp) Reset()
func (*UpdateEcsResp) String ¶
func (x *UpdateEcsResp) String() string