udpn

package
v0.22.27 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package udpn include resources of ucloud udpn product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocateUDPNRequest

type AllocateUDPNRequest struct {
	request.CommonBase

	// 带宽
	Bandwidth *int `required:"true"`

	// 计费类型,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费
	ChargeType *string `required:"false"`

	// 代金劵
	CouponId *string `required:"false"`

	// 计费模式. 枚举值:"Traffic", 流量计费模式; 否则 带宽计费模式;
	PayMode *string `required:"false"`

	// 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg,  洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky
	Peer1 *string `required:"true"`

	// 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg,  洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky
	Peer2 *string `required:"true"`

	// 计费时长,默认 1
	Quantity *int `required:"false"`
}

AllocateUDPNRequest is request schema for AllocateUDPN action

type AllocateUDPNResponse

type AllocateUDPNResponse struct {
	response.CommonBase

	// 操作名称
	Action string

	// 返回码
	RetCode int

	// 资源名称
	UDPNId string
}

AllocateUDPNResponse is response schema for AllocateUDPN action

type DescribeUDPNRequest

type DescribeUDPNRequest struct {
	request.CommonBase

	// 返回数据长度,默认为 20
	Limit *int `required:"false"`

	// 列表起始位置偏移量,默认为 0
	Offset *int `required:"false"`

	// 申请到的 UDPN 资源 ID。若为空,则查询该用户在机房所有的专线信息。非默认项目资源,需填写ProjectId
	UDPNId *string `required:"false"`
}

DescribeUDPNRequest is request schema for DescribeUDPN action

type DescribeUDPNResponse

type DescribeUDPNResponse struct {
	response.CommonBase

	// UDPN详情
	DataSet []UDPNData

	// 查询到的总数量
	TotalCount int
}

DescribeUDPNResponse is response schema for DescribeUDPN action

type GetUDPNLineListRequest

type GetUDPNLineListRequest struct {
	request.CommonBase
}

GetUDPNLineListRequest is request schema for GetUDPNLineList action

type GetUDPNLineListResponse

type GetUDPNLineListResponse struct {
	response.CommonBase

	// 当前支持的专线线路详细信息,详见UDPNLineSet
	DataSet []UDPNLineSet

	// DataSet中的元素个数
	TotalCount int
}

GetUDPNLineListResponse is response schema for GetUDPNLineList action

type GetUDPNPriceRequest

type GetUDPNPriceRequest struct {
	request.CommonBase

	// 带宽信息
	Bandwidth *int `required:"true"`

	// 计费类型
	ChargeType *string `required:"false"`

	// PayMode,枚举值,Bandwidth:带宽;Traffic:流量  默认不填写:带宽
	PayMode *string `required:"false"`

	// 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky
	Peer1 *string `required:"true"`

	// 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky
	Peer2 *string `required:"true"`

	// 购买时长
	Quantity *int `required:"false"`
}

GetUDPNPriceRequest is request schema for GetUDPNPrice action

type GetUDPNPriceResponse

type GetUDPNPriceResponse struct {
	response.CommonBase

	// 专线价格
	Price float64

	// 资源有效期 unix 时间戳
	PurchaseValue int
}

GetUDPNPriceResponse is response schema for GetUDPNPrice action

type GetUDPNUpgradePriceRequest

type GetUDPNUpgradePriceRequest struct {
	request.CommonBase

	// 带宽
	Bandwidth *int `required:"true"`

	// 专线带宽资源 Id
	UDPNId *string `required:"true"`
}

GetUDPNUpgradePriceRequest is request schema for GetUDPNUpgradePrice action

type GetUDPNUpgradePriceResponse

type GetUDPNUpgradePriceResponse struct {
	response.CommonBase

	// 升级后的价格
	Price float64
}

GetUDPNUpgradePriceResponse is response schema for GetUDPNUpgradePrice action

type ModifyUDPNBandwidthRequest

type ModifyUDPNBandwidthRequest struct {
	request.CommonBase

	// 调整后专线带宽, 单位为Mbps,取值范围为大于等于2且小于等于1000([2-1000])的整数
	Bandwidth *int `required:"true"`

	// 代金劵 ID
	CouponId *string `required:"false"`

	// UDPN Id
	UDPNId *string `required:"true"`
}

ModifyUDPNBandwidthRequest is request schema for ModifyUDPNBandwidth action

type ModifyUDPNBandwidthResponse

type ModifyUDPNBandwidthResponse struct {
	response.CommonBase
}

ModifyUDPNBandwidthResponse is response schema for ModifyUDPNBandwidth action

type ReleaseUDPNRequest

type ReleaseUDPNRequest struct {
	request.CommonBase

	// UDPN 资源 Id
	UDPNId *string `required:"true"`
}

ReleaseUDPNRequest is request schema for ReleaseUDPN action

type ReleaseUDPNResponse

type ReleaseUDPNResponse struct {
	response.CommonBase
}

ReleaseUDPNResponse is response schema for ReleaseUDPN action

type UDPNClient

type UDPNClient struct {
	*ucloud.Client
}

UDPNClient is the client of UDPN

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *UDPNClient

NewClient will return a instance of UDPNClient

func (*UDPNClient) AllocateUDPN

func (c *UDPNClient) AllocateUDPN(req *AllocateUDPNRequest) (*AllocateUDPNResponse, error)

API: AllocateUDPN

分配一条 UDPN 专线

func (*UDPNClient) DescribeUDPN

func (c *UDPNClient) DescribeUDPN(req *DescribeUDPNRequest) (*DescribeUDPNResponse, error)

API: DescribeUDPN

描述 UDPN

func (*UDPNClient) GetUDPNLineList

func (c *UDPNClient) GetUDPNLineList(req *GetUDPNLineListRequest) (*GetUDPNLineListResponse, error)

API: GetUDPNLineList

获取当前支持的专线线路列表

func (*UDPNClient) GetUDPNPrice

func (c *UDPNClient) GetUDPNPrice(req *GetUDPNPriceRequest) (*GetUDPNPriceResponse, error)

API: GetUDPNPrice

获取 UDPN 价格

func (*UDPNClient) GetUDPNUpgradePrice

API: GetUDPNUpgradePrice

获取专线升级价格

func (*UDPNClient) ModifyUDPNBandwidth

API: ModifyUDPNBandwidth

修改带宽值

func (*UDPNClient) NewAllocateUDPNRequest

func (c *UDPNClient) NewAllocateUDPNRequest() *AllocateUDPNRequest

NewAllocateUDPNRequest will create request of AllocateUDPN action.

func (*UDPNClient) NewDescribeUDPNRequest

func (c *UDPNClient) NewDescribeUDPNRequest() *DescribeUDPNRequest

NewDescribeUDPNRequest will create request of DescribeUDPN action.

func (*UDPNClient) NewGetUDPNLineListRequest

func (c *UDPNClient) NewGetUDPNLineListRequest() *GetUDPNLineListRequest

NewGetUDPNLineListRequest will create request of GetUDPNLineList action.

func (*UDPNClient) NewGetUDPNPriceRequest

func (c *UDPNClient) NewGetUDPNPriceRequest() *GetUDPNPriceRequest

NewGetUDPNPriceRequest will create request of GetUDPNPrice action.

func (*UDPNClient) NewGetUDPNUpgradePriceRequest

func (c *UDPNClient) NewGetUDPNUpgradePriceRequest() *GetUDPNUpgradePriceRequest

NewGetUDPNUpgradePriceRequest will create request of GetUDPNUpgradePrice action.

func (*UDPNClient) NewModifyUDPNBandwidthRequest

func (c *UDPNClient) NewModifyUDPNBandwidthRequest() *ModifyUDPNBandwidthRequest

NewModifyUDPNBandwidthRequest will create request of ModifyUDPNBandwidth action.

func (*UDPNClient) NewReleaseUDPNRequest

func (c *UDPNClient) NewReleaseUDPNRequest() *ReleaseUDPNRequest

NewReleaseUDPNRequest will create request of ReleaseUDPN action.

func (*UDPNClient) ReleaseUDPN

func (c *UDPNClient) ReleaseUDPN(req *ReleaseUDPNRequest) (*ReleaseUDPNResponse, error)

API: ReleaseUDPN

释放 UDPN

type UDPNData

type UDPNData struct {

	// 带宽
	Bandwidth int

	// 计费类型
	ChargeType string

	// unix 时间戳 创建时间
	CreateTime int

	// unix 时间戳 到期时间
	ExpireTime int

	// 可用区域 1
	Peer1 string

	// 可用区域 2
	Peer2 string

	// UDPN 资源短 ID
	UDPNId string
}

UDPNData - UDPN 详细信息

type UDPNLineSet

type UDPNLineSet struct {

	// 线路带宽上限,单位 M
	BandwidthUpperLimit int

	// 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky
	LocalRegion string

	// 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky
	RemoteRegion string
}

UDPNLineSet - GetUDPNLineList

Jump to

Keyboard shortcuts

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