ctimage

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndpointNameCtimage = "ctimage"
	UrlProdCtiamge      = "ctimage-global.ctapi.ctyun.cn"
	UrlTestCtiamge      = "ctimage-global.ctapi-test.ctyun.cn:21443"
)

Variables

View Source
var EndpointCtimageProd = ctyunsdk.Endpoint{
	EndpointName: EndpointNameCtimage,
	Url:          UrlProdCtiamge,
}
View Source
var EndpointCtimageTest = ctyunsdk.Endpoint{
	EndpointName: EndpointNameCtimage,
	Url:          UrlTestCtiamge,
}

Functions

This section is empty.

Types

type Apis

type Apis struct {
	ImageListApi            *ImageListApi
	ImageDetailApi          *ImageDetailApi
	ImageImportApi          *ImageImportApi
	ImageListImportTasksApi *ImageListImportTasksApi
	ImageDeleteApi          *ImageDeleteApi
	ImageUpdateApi          *ImageUpdateApi
	ImageShareCreateApi     *ImageShareCreateApi
	ImageShareDeleteApi     *ImageShareDeleteApi
	ImageShareAcceptApi     *ImageShareAcceptApi
	ImageShareRejectApi     *ImageShareRejectApi
	ImageShareListApi       *ImageShareListApi
}

Apis api的接口

func NewApis

func NewApis(client *ctyunsdk.CtyunClient) *Apis

NewApis 构建

type ImageDeleteApi

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

ImageDeleteApi 删除私有镜像 https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=23&api=4766&data=89

func NewImageDeleteApi

func NewImageDeleteApi(client *ctyunsdk.CtyunClient) *ImageDeleteApi

func (*ImageDeleteApi) Do

func (this *ImageDeleteApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageDeleteRequest) (*ImageDeleteResponse, ctyunsdk.CtyunRequestError)

type ImageDeleteRequest

type ImageDeleteRequest struct {
	RegionId string // 资源池id
	ImageId  string // 镜像id
}

type ImageDeleteResponse

type ImageDeleteResponse struct {
}

type ImageDetailApi

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

ImageDetailApi 查询镜像详细信息 https://www.ctyun.cn/document/10027726/10040046

func NewImageDetailApi

func NewImageDetailApi(client *ctyunsdk.CtyunClient) *ImageDetailApi

func (*ImageDetailApi) Do

func (this *ImageDetailApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageDetailRequest) (*ImageDetailResponse, ctyunsdk.CtyunRequestError)

type ImageDetailImagesResponse

type ImageDetailImagesResponse struct {
	Architecture     string
	AzName           string
	BootMode         string
	ContainerFormat  string
	CreatedTime      int
	Description      string
	DestinationUser  string
	DiskFormat       string
	DiskId           string
	DiskSize         int
	ImageClass       string
	ImageId          string
	ImageName        string
	ImageType        string
	MaximumRam       int
	MinimumRam       int
	OsDistro         string
	OsType           string
	OsVersion        string
	ProjectId        string
	SharedListLength int
	Size             int64
	SourceServerId   string
	SourceUser       string
	Status           string
	Tags             string
	UpdatedTime      int
	Visibility       string
}

type ImageDetailRequest

type ImageDetailRequest struct {
	RegionId string // 资源池id
	ImageId  string // 镜像id
}

type ImageDetailResponse

type ImageDetailResponse struct {
	Images []ImageDetailImagesResponse
}

type ImageImportApi

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

ImageImportApi 创建私有镜像(镜像文件) https://www.ctyun.cn/document/10027726/10040048

func NewImageImportApi

func NewImageImportApi(client *ctyunsdk.CtyunClient) *ImageImportApi

func (*ImageImportApi) Do

func (this *ImageImportApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageImportRequest) (*ImageImportResponse, ctyunsdk.CtyunRequestError)

type ImageImportImagePropertiesRequest

type ImageImportImagePropertiesRequest struct {
	ImageName    string
	OsDistro     string
	OsVersion    string
	Architecture string
	BootMode     string
	Description  string
	DiskSize     int
	ImageType    string
	MaximumRam   int
	MinimumRam   int
}

type ImageImportImagesResponse

type ImageImportImagesResponse struct {
	Architecture     string
	AzName           string
	BootMode         string
	ContainerFormat  string
	CreatedTime      int
	Description      string
	DestinationUser  string
	DiskFormat       string
	DiskId           string
	DiskSize         int
	ImageClass       string
	ImageId          string
	ImageName        string
	ImageType        string
	MaximumRam       int
	MinimumRam       int
	OsDistro         string
	OsType           string
	OsVersion        string
	ProjectId        string
	SharedListLength int
	Size             int
	SourceServerId   string
	SourceUser       string
	Status           string
	Tags             string
	UpdatedTime      int
	Visibility       string
}

type ImageImportRequest

type ImageImportRequest struct {
	RegionId        string                            // 资源池id
	ImageFileSource string                            // 镜像文件地址,格式应为 {internetEndpoint}/{bucket}/{key}。可使用访问控制 endpoint 查询接口来查询外网访问 endpoint,可使用获取桶列表接口来查询您拥有的桶的列表,可使用查看对象列表接口来查询存储桶内所有对象。
	ImageProperties ImageImportImagePropertiesRequest //  镜像属性。注意:对启动方式、最大和最小内存的指定仅在镜像属性中镜像种类的取值为空或空字符串(系统盘镜像)时生效。此外,当前对启动方式、最大和最小内存的指定在多可用区资源池下不生效。可使用资源池概况信息查询接口来确认所指定的资源池是否是多可用区资源池。
	ProjectId       string                            // 企业项目id
}

type ImageImportResponse

type ImageImportResponse struct {
	Images []ImageImportImagesResponse
}

type ImageListApi

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

ImageListApi 查询可以使用的镜像资源 https://www.ctyun.cn/document/10027726/10040047

func NewImageListApi

func NewImageListApi(client *ctyunsdk.CtyunClient) *ImageListApi

func (*ImageListApi) Do

func (this *ImageListApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageListRequest) (*ImageListResponse, ctyunsdk.CtyunRequestError)

type ImageListImagesResponse

type ImageListImagesResponse struct {
	Architecture     string
	AzName           string
	BootMode         string
	ContainerFormat  string
	CreatedTime      int
	Description      string
	DestinationUser  string
	DiskFormat       string
	DiskId           string
	DiskSize         int
	ImageClass       string
	ImageId          string
	ImageName        string
	ImageType        string
	MaximumRam       int
	MinimumRam       int
	OsDistro         string
	OsType           string
	OsVersion        string
	ProjectId        string
	SharedListLength int
	Size             int64
	SourceServerId   string
	SourceUser       string
	Status           string
	Tags             string
	UpdatedTime      int
	Visibility       string
}

type ImageListImportTasksApi

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

ImageListImportTasksApi 查询创建私有镜像(镜像文件)任务列表 https://www.ctyun.cn/document/10027726/10087256

func NewImageListImportTasksApi

func NewImageListImportTasksApi(client *ctyunsdk.CtyunClient) *ImageListImportTasksApi

func (*ImageListImportTasksApi) Do

func (this *ImageListImportTasksApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageListImportTasksRequest) (*ImageListImportTasksResponse, ctyunsdk.CtyunRequestError)

type ImageListImportTasksImageImportTasksResponse

type ImageListImportTasksImageImportTasksResponse struct {
	ImageName  string
	OsType     string
	TaskId     string
	TaskStatus string
}

type ImageListImportTasksRequest

type ImageListImportTasksRequest struct {
	RegionId string // 资源池id
	PageNo   int    // 页码,取值范围:最小 1(默认值)
	PageSize int    // 每页记录数目,取值范围:最小 1,最大 50,默认值 10
}

type ImageListImportTasksResponse

type ImageListImportTasksResponse struct {
	PageNo           int
	CurrentPage      int
	PageSize         int
	CurrentCount     int
	TotalCount       int
	ImageImportTasks ImageListImportTasksImageImportTasksResponse
}

type ImageListRequest

type ImageListRequest struct {
	RegionId     string // 资源池id
	AzName       string // 可用区名称
	FlavorName   string // 云主机规格名称
	Visibility   int    // 镜像可见类型,取值范围(值:描述):0:私有镜像1:公共镜像(默认值)2:共享镜像3:安全产品镜像4:甄选应用镜像
	PageNo       int    // 页码,取值范围:最小 1(默认值)
	PageSize     int    // 分页查询时每页的行数,最大值为 50,默认值为 10
	QueryContent string // 查询内容
	Status       string // 镜像状态 accepted:已接受共享镜像 rejected:已拒绝共享镜像 waiting:等待接受/拒绝共享镜像

}

type ImageListResponse

type ImageListResponse struct {
	Images       []ImageListImagesResponse
	CurrentCount int
	TotalCount   int
	TotalPage    int
}

type ImageShareAcceptApi

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

ImageShareAcceptApi 接受共享镜像 https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=23&api=5225&data=89

func NewimageShareAcceptApi

func NewimageShareAcceptApi(client *ctyunsdk.CtyunClient) *ImageShareAcceptApi

func (*ImageShareAcceptApi) Do

func (this *ImageShareAcceptApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageShareAcceptRequest) (*ImageShareAcceptResponse, ctyunsdk.CtyunRequestError)

type ImageShareAcceptRequest

type ImageShareAcceptRequest struct {
	ImageId  string
	RegionId string
}

type ImageShareAcceptResponse

type ImageShareAcceptResponse struct {
}

type ImageShareCreateApi

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

ImageShareCreateApi 共享私有镜像 https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=23&api=5114&data=89

func NewImageShareCreateApi

func NewImageShareCreateApi(client *ctyunsdk.CtyunClient) *ImageShareCreateApi

func (*ImageShareCreateApi) Do

func (this *ImageShareCreateApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageShareCreateRequest) (*ImageShareCreateResponse, ctyunsdk.CtyunRequestError)

type ImageShareCreateRequest

type ImageShareCreateRequest struct {
	DestinationUser string
	ImageId         string
	RegionId        string
}

type ImageShareCreateResponse

type ImageShareCreateResponse struct {
}

type ImageShareDeleteApi

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

ImageShareDeleteApi 取消共享私有镜像 https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=23&api=5229&data=89

func NewImageShareDeleteApi

func NewImageShareDeleteApi(client *ctyunsdk.CtyunClient) *ImageShareDeleteApi

func (*ImageShareDeleteApi) Do

func (this *ImageShareDeleteApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageShareDeleteRequest) (*ImageShareDeleteResponse, ctyunsdk.CtyunRequestError)

type ImageShareDeleteRequest

type ImageShareDeleteRequest struct {
	DestinationUser string
	ImageId         string
	RegionId        string
}

type ImageShareDeleteResponse

type ImageShareDeleteResponse struct {
}

type ImageShareListApi

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

ImageShareListApi 查询私有镜像的共享列表 https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=23&api=6764&data=89

func NewimageShareListApi

func NewimageShareListApi(client *ctyunsdk.CtyunClient) *ImageShareListApi

func (*ImageShareListApi) Do

func (this *ImageShareListApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageShareListRequest) (*ImageShareListResponse, ctyunsdk.CtyunRequestError)

type ImageShareListImagesResponse

type ImageShareListImagesResponse struct {
	Architecture    string
	BootMode        string
	ContainerFormat string
	CreatedTime     int
	Description     string
	DestinationUser string
	DiskFormat      string
	DiskId          string
	DiskSize        int
	ImageClass      string
	ImageId         string
	ImageName       string
	ImageType       string
	MaximumRam      int
	MinimumRam      int
	OsDistro        string
	OsType          string
	OsVersion       string
	ProjectId       string
	Size            int64
	SourceServerId  string
	SourceUser      string
	Status          string
	UpdatedTime     int
	Visibility      string
}

type ImageShareListRequest

type ImageShareListRequest struct {
	ImageId  string
	RegionId string
	PageNo   int
	PageSize int
}

type ImageShareListResponse

type ImageShareListResponse struct {
	Images       []ImageShareListImagesResponse
	PageNo       int
	CurrentPage  int
	PageSize     int
	CurrentCount int
	TotalCount   int
}

type ImageShareRejectApi

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

ImageShareRejectApi 拒绝共享镜像 https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=23&api=5227&data=89

func NewimageShareRejectApi

func NewimageShareRejectApi(client *ctyunsdk.CtyunClient) *ImageShareRejectApi

func (*ImageShareRejectApi) Do

func (this *ImageShareRejectApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageShareRejectRequest) (*ImageShareRejectResponse, ctyunsdk.CtyunRequestError)

type ImageShareRejectRequest

type ImageShareRejectRequest struct {
	ImageId  string
	RegionId string
}

type ImageShareRejectResponse

type ImageShareRejectResponse struct {
}

type ImageUpdateApi

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

ImageUpdateApi 修改私有镜像属性 https://eop.ctyun.cn/ebp/ctapiDocument/search?sid=23&api=5085&data=89

func NewImageUpdateApi

func NewImageUpdateApi(client *ctyunsdk.CtyunClient) *ImageUpdateApi

func (*ImageUpdateApi) Do

func (this *ImageUpdateApi) Do(ctx context.Context, credential ctyunsdk.Credential, req *ImageUpdateRequest) (*ImageUpdateResponse, ctyunsdk.CtyunRequestError)

type ImageUpdateRequest

type ImageUpdateRequest struct {
	ImageId     string
	RegionId    string
	BootMode    string
	Description string
	ImageName   string
	MaximumRam  int
	MinimumRam  int
}

type ImageUpdateResponse

type ImageUpdateResponse struct {
}

Jump to

Keyboard shortcuts

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