ctebs

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndpointNameCtebs = "ctebs"
	UrlProdCtebs      = "ebs-global.ctapi.ctyun.cn"
	UrlTestCtebs      = "ebs-global.ctapi-test.ctyun.cn"
)

Variables

View Source
var EndpointCtebsProd = ctyunsdk.Endpoint{
	EndpointName: EndpointNameCtebs,
	Url:          UrlProdCtebs,
}
View Source
var EndpointCtebsTest = ctyunsdk.Endpoint{
	EndpointName: EndpointNameCtebs,
	Url:          UrlTestCtebs,
}

Functions

This section is empty.

Types

type Apis

type Apis struct {
	EbsCreateApi       *EbsCreateApi
	EbsDeleteApi       *EbsDeleteApi
	EbsChangeNameApi   *EbsChangeNameApi
	EbsChangeSizeApi   *EbsChangeSizeApi
	EbsAssociateApi    *EbsAssociateApi
	EbsDisassociateApi *EbsDisassociateApi
	EbsShowApi         *EbsShowApi
}

Apis api的接口

func NewApis

func NewApis(client *ctyunsdk.CtyunClient) *Apis

NewApis 构建

type EbsAssociateApi

type EbsAssociateApi struct {
	ctyunsdk.CtyunRequestBuilder
	// contains filtered or unexported fields
}

EbsAssociateApi 云硬盘绑定 https://www.ctyun.cn/document/10027696/10110703

func NewEbsAssociateApi

func NewEbsAssociateApi(client *ctyunsdk.CtyunClient) *EbsAssociateApi

func (*EbsAssociateApi) Do

func (this *EbsAssociateApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *EbsAssociateRequest) (*EbsAssociateResponse, ctyunsdk.CtyunRequestError)

type EbsAssociateRequest

type EbsAssociateRequest struct {
	RegionId   string
	DiskId     string
	InstanceId string
}

type EbsAssociateResponse

type EbsAssociateResponse struct {
	DiskJobId string
}

type EbsAttachment

type EbsAttachment struct {
	InstanceId   string // 绑定云主机实例UUID
	AttachmentId string // 挂载ID
	Device       string // 挂载设备名,比如/dev/sda
}

type EbsChangeNameApi

type EbsChangeNameApi struct {
	ctyunsdk.CtyunRequestBuilder
	// contains filtered or unexported fields
}

EbsChangeNameApi 云硬盘修改名称 https://www.ctyun.cn/document/10027696/10110706

func NewEbsChangeNameApi

func NewEbsChangeNameApi(client *ctyunsdk.CtyunClient) *EbsChangeNameApi

func (*EbsChangeNameApi) Do

func (this *EbsChangeNameApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *EbsChangeNameRequest) (*EbsChangeNameResponse, ctyunsdk.CtyunRequestError)

type EbsChangeNameRequest

type EbsChangeNameRequest struct {
	RegionId string
	DiskId   string
	DiskName string
}

type EbsChangeNameResponse

type EbsChangeNameResponse struct {
}

type EbsChangeSizeApi

type EbsChangeSizeApi struct {
	ctyunsdk.CtyunRequestBuilder
	// contains filtered or unexported fields
}

EbsChangeSizeApi 云硬盘修改规格 https://www.ctyun.cn/document/10027696/10110705

func NewEbsChangeSizeApi

func NewEbsChangeSizeApi(client *ctyunsdk.CtyunClient) *EbsChangeSizeApi

func (*EbsChangeSizeApi) Do

func (this *EbsChangeSizeApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *EbsChangeSizeRequest) (*EbsChangeSizeResponse, ctyunsdk.CtyunRequestError)

type EbsChangeSizeRequest

type EbsChangeSizeRequest struct {
	RegionId    string
	DiskId      string
	DiskSize    int
	ClientToken string
}

type EbsChangeSizeResponse

type EbsChangeSizeResponse struct {
	MasterOrderId string
	MasterOrderNo string
}

type EbsCreateApi

type EbsCreateApi struct {
	ctyunsdk.CtyunRequestBuilder
	// contains filtered or unexported fields
}

EbsCreateApi 云硬盘开通 https://www.ctyun.cn/document/10027696/10110700

func NewEbsCreateApi

func NewEbsCreateApi(client *ctyunsdk.CtyunClient) *EbsCreateApi

func (*EbsCreateApi) Do

func (this *EbsCreateApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *EbsCreateRequest) (*EbsCreateResponse, ctyunsdk.CtyunRequestError)

type EbsCreateRequest

type EbsCreateRequest struct {
	ClientToken string
	DiskName    string
	DiskMode    string
	DiskType    string
	DiskSize    int64
	RegionId    string
	AzName      string
	OnDemand    bool
	CycleType   string
	CycleCount  int64
	ProjectId   string
}

type EbsCreateResourceResponse

type EbsCreateResourceResponse struct {
	OrderId          string
	Status           int64
	IsMaster         bool
	DiskName         string
	ResourceType     string
	MasterOrderId    string
	UpdateTime       int64
	MasterResourceId string
	ItemValue        int64
	StartTime        int64
	CreateTime       int64
	DiskId           string
}

type EbsCreateResponse

type EbsCreateResponse struct {
	MasterResourceStatus string
	RegionId             string
	MasterOrderId        string
	MasterResourceId     string
	MasterOrderNo        string
	Resources            []EbsCreateResourceResponse
}

type EbsDeleteApi

type EbsDeleteApi struct {
	ctyunsdk.CtyunRequestBuilder
	// contains filtered or unexported fields
}

EbsDeleteApi 云硬盘退订 https://www.ctyun.cn/document/10027696/10110701

func NewEbsDeleteApi

func NewEbsDeleteApi(client *ctyunsdk.CtyunClient) *EbsDeleteApi

func (*EbsDeleteApi) Do

func (this *EbsDeleteApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *EbsDeleteRequest) (*EbsDeleteResponse, ctyunsdk.CtyunRequestError)

type EbsDeleteRequest

type EbsDeleteRequest struct {
	RegionId    string
	DiskId      string
	ClientToken string
}

type EbsDeleteResponse

type EbsDeleteResponse struct {
	MasterOrderId string
	MasterOrderNo string
}

type EbsDisassociateApi

type EbsDisassociateApi struct {
	ctyunsdk.CtyunRequestBuilder
	// contains filtered or unexported fields
}

EbsDisassociateApi 云硬盘解绑 https://www.ctyun.cn/document/10027696/10110704

func NewEbsDisassociateApi

func NewEbsDisassociateApi(client *ctyunsdk.CtyunClient) *EbsDisassociateApi

func (*EbsDisassociateApi) Do

func (this *EbsDisassociateApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *EbsDisassociateRequest) (*EbsDisassociateResponse, ctyunsdk.CtyunRequestError)

type EbsDisassociateRequest

type EbsDisassociateRequest struct {
	DiskId   string
	RegionId string
}

type EbsDisassociateResponse

type EbsDisassociateResponse struct {
	DiskJobId string
}

type EbsShowApi

type EbsShowApi struct {
	ctyunsdk.CtyunRequestBuilder
	// contains filtered or unexported fields
}

EbsShowApi 云硬盘信息查询(基于diskID) https://www.ctyun.cn/document/10027696/10110677

func NewEbsShowApi

func NewEbsShowApi(client *ctyunsdk.CtyunClient) *EbsShowApi

func (*EbsShowApi) Do

func (this *EbsShowApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *EbsShowRequest) (*EbsShowResponse, ctyunsdk.CtyunRequestError)

type EbsShowRequest

type EbsShowRequest struct {
	RegionId string
	DiskId   string
}

type EbsShowResponse

type EbsShowResponse struct {
	DiskName       string          // 磁盘名
	DiskID         string          // 磁盘ID
	DiskSize       int64           // 磁盘大小(GB)
	DiskType       string          // 磁盘规格类型 SATA/SAS/SSD-genric/SSD/FAST-SSD
	DiskMode       string          // 磁盘模式。VBD/ISCSI/FCSAN
	DiskStatus     string          // 云硬盘使用状态 deleting/creating/detaching,具体请参考云硬盘使用状态
	CreateTime     int64           // 创建时刻,epoch时戳,精度毫秒
	UpdateTime     int64           // 更新时刻,epoch时戳,精度毫秒
	ExpireTime     int64           // 过期时刻,epoch时戳,精度毫秒
	IsSystemVolume bool            // 是否系统盘,只有为系统盘时才返回该字段
	IsPackaged     bool            // 是否是云主机成套资源
	InstanceName   string          // 绑定的云主机名,有挂载时才返回
	InstanceID     string          // 绑定云主机resourceUUID,有挂载时才返回
	InstanceStatus string          // 云主机状态starting/restarting/stopping,具体参考云主机状态,有挂载时才返回
	MultiAttach    bool            // 是否共享云硬盘
	Attachments    []EbsAttachment // 挂载信息。如果是共享挂载云硬盘,有多项		参考表attachment
	ProjectID      string          // 资源所属企业项目id
	IsEncrypt      bool            // 是否加密盘
	KmsUUID        string          // 加密盘密钥UUID,是加密盘时才返回
	OnDemand       bool            // 是否按需订购,按需时才返回该字段
	CycleType      *string         // month/year,非按需时返回
	CycleCount     *int64          // 包周期数,非按需时返回
	RegionID       string          // 资源池ID
	AzName         string          // 多可用区下的可用区名字
}

Jump to

Keyboard shortcuts

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