Help us shape the future of Go! Take the 2026 Go Developer Survey

resource

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListOpts

type ListOpts struct {
	//客户唯一标示。是domain ID
	CustomerId string `q:"customer_id,required"`

	//资源ID列表。是Server ID
	ResourceIds string `q:"resource_ids"`

	//订单号。
	OrderId string `q:"order_id"`

	//是否只查询主资源。
	OnlyMainResource int `q:"only_main_resource"`

	//资源状态。
	StatusList string `q:"status_list"`

	//页码
	PageNo int `q:"page_no"`

	//每页条数。
	PageSize int `q:"page_size"`
}

ListOpts represents options used to get resources.

func (ListOpts) ToResourcesListQuery

func (opts ListOpts) ToResourcesListQuery() (string, error)

ToResourcesListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToResourcesListQuery() (string, error)
}

type ListResult

type ListResult struct {
	// contains filtered or unexported fields
}

func ListDetail

func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) (r ListResult)

该接口对应的api不支持类似pagination分页机制。

func (ListResult) Extract

func (r ListResult) Extract() (Resources, error)

type ResourceInstance

type ResourceInstance struct {
	//标示要开通资源的临时ID,资源开通以后生成的ID为resourceID。对应订购关系ID。
	Id string `json:"id"`

	//资源实例ID
	ResourceId string `json:"resource_id"`

	//资源实例名
	ResourceName string `json:"resource_name"`

	//云服务资源池区域编码
	RegionCode string `json:"region_code"`

	//用户购买云服务产品的云服务类型。
	CloudServiceTypeCode string `json:"cloud_service_type_code"`

	//用户购买云服务产品的资源类型。
	ResourceTypeCode string `json:"resource_type_code"`

	//用户购买云服务产品的资源规格。
	ResourceSpecCode string `json:"resource_spec_code"`

	//资源项目ID。
	ProjectCode string `json:"project_code"`

	//产品ID
	ProductId string `json:"product_id"`

	//主资源ID
	MainResourceId string `json:"main_resource_id"`

	//是否是主资源。
	IsMainResource int `json:"is_main_resource"`

	//资源状态。
	Status int `json:"status"`

	//资源生效时间。
	ValidTime string `json:"valid_time"`

	//资源过期时间。
	ExpireTime string `json:"expire_time"`

	//下一次扣费策略
	NextOperationPolicy int `json:"next_operation_policy"`
}

type Resources

type Resources struct {
	//订单列表。
	Data []ResourceInstance `json:"data"`

	//总记录数。
	TotalCount int `json:"total_count"`

	//状态码。
	ErrorCode string `json:"error_code"`

	//错误描述。
	ErrorMsg string `json:"error_msg"`
}

Jump to

Keyboard shortcuts

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