vpc

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 4 Imported by: 8

Documentation

Overview

Package vpc include resources of ucloud vpc 2.0 product

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddVPCNetworkRequest

type AddVPCNetworkRequest struct {
	request.CommonBase

	// 源VPC短ID
	VPCId *string `required:"true"`

	// 增加网段
	Network []string `required:"true"`
}

AddVPCNetworkRequest is request schema for AddVPCNetwork action

type AddVPCNetworkResponse

type AddVPCNetworkResponse struct {
	response.CommonBase
}

AddVPCNetworkResponse is response schema for AddVPCNetwork action

type CreateSubnetRequest

type CreateSubnetRequest struct {
	request.CommonBase

	// VPC资源ID
	VPCId *string `required:"true"`

	// 子网网络地址,例如192.168.0.0
	Subnet *string `required:"true"`

	// 子网网络号位数,默认为24
	Netmask *int `required:"false"`

	// 子网名称,默认为Subnet
	SubnetName *string `required:"false"`

	// 业务组名称,默认为Default
	Tag *string `required:"false"`

	// 备注
	Remark *string `required:"false"`
}

CreateSubnetRequest is request schema for CreateSubnet action

type CreateSubnetResponse

type CreateSubnetResponse struct {
	response.CommonBase

	// 子网ID
	SubnetId string
}

CreateSubnetResponse is response schema for CreateSubnet action

type CreateVPCIntercomRequest

type CreateVPCIntercomRequest struct {
	request.CommonBase

	// 源VPC短ID
	VPCId *string `required:"true"`

	// 目的VPC短ID
	DstVPCId *string `required:"true"`

	// 目的VPC所在地域,默认与源VPC同地域。
	DstRegion *string `required:"false"`

	// 目的VPC项目ID。默认与源VPC同项目。
	DstProjectId *string `required:"false"`
}

CreateVPCIntercomRequest is request schema for CreateVPCIntercom action

type CreateVPCIntercomResponse

type CreateVPCIntercomResponse struct {
	response.CommonBase
}

CreateVPCIntercomResponse is response schema for CreateVPCIntercom action

type CreateVPCRequest

type CreateVPCRequest struct {
	request.CommonBase

	// VPC名称
	Name *string `required:"true"`

	// VPC网段
	Network []string `required:"true"`

	// 业务组名称
	Tag *string `required:"false"`

	// 备注
	Remark *string `required:"false"`

	// VPC类型
	Type *int `required:"false"`
}

CreateVPCRequest is request schema for CreateVPC action

type CreateVPCResponse

type CreateVPCResponse struct {
	response.CommonBase

	// VPC资源Id
	VPCId string
}

CreateVPCResponse is response schema for CreateVPC action

type DeleteSubnetRequest

type DeleteSubnetRequest struct {
	request.CommonBase

	// 子网ID
	SubnetId *string `required:"true"`
}

DeleteSubnetRequest is request schema for DeleteSubnet action

type DeleteSubnetResponse

type DeleteSubnetResponse struct {
	response.CommonBase
}

DeleteSubnetResponse is response schema for DeleteSubnet action

type DeleteVPCIntercomRequest

type DeleteVPCIntercomRequest struct {
	request.CommonBase

	// 源VPC短ID
	VPCId *string `required:"true"`

	// 目的VPC短ID
	DstVPCId *string `required:"true"`

	// 目的VPC所在地域,默认为源VPC所在地域
	DstRegion *string `required:"false"`

	// 目的VPC所在项目ID,默认为源VPC所在项目ID
	DstProjectId *string `required:"false"`
}

DeleteVPCIntercomRequest is request schema for DeleteVPCIntercom action

type DeleteVPCIntercomResponse

type DeleteVPCIntercomResponse struct {
	response.CommonBase
}

DeleteVPCIntercomResponse is response schema for DeleteVPCIntercom action

type DeleteVPCRequest

type DeleteVPCRequest struct {
	request.CommonBase

	// VPC资源Id
	VPCId *string `required:"true"`
}

DeleteVPCRequest is request schema for DeleteVPC action

type DeleteVPCResponse

type DeleteVPCResponse struct {
	response.CommonBase
}

DeleteVPCResponse is response schema for DeleteVPC action

type DescribeSubnetRequest

type DescribeSubnetRequest struct {
	request.CommonBase

	// 子网id数组,适用于一次查询多个子网信息
	SubnetIds []string `required:"false"`

	// 子网id,适用于一次查询一个子网信息
	SubnetId *string `required:"false"`

	// VPC资源id
	VPCId *string `required:"false"`

	// 业务组名称,默认为Default
	Tag *string `required:"false"`

	// 业务组
	BusinessId *string `required:"false"`

	// 偏移量,默认为0
	Offset *int `required:"false"`

	// 列表长度,默认为20
	Limit *int `required:"false"`
}

DescribeSubnetRequest is request schema for DescribeSubnet action

type DescribeSubnetResourceRequest

type DescribeSubnetResourceRequest struct {
	request.CommonBase

	// 子网id
	SubnetId *string `required:"true"`

	// 资源类型,默认为全部资源类型。枚举值为:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,Kafka消息队列;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP.
	ResourceType *string `required:"false"`

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

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

DescribeSubnetResourceRequest is request schema for DescribeSubnetResource action

type DescribeSubnetResourceResponse

type DescribeSubnetResourceResponse struct {
	response.CommonBase

	// 总数
	TotalCount int

	// 返回数据集
	DataSet []ResourceInfo
}

DescribeSubnetResourceResponse is response schema for DescribeSubnetResource action

type DescribeSubnetResponse

type DescribeSubnetResponse struct {
	response.CommonBase

	// 子网总数量
	TotalCount int

	// 子网信息数组
	DataSet []VPCSubnetInfoSet
}

DescribeSubnetResponse is response schema for DescribeSubnet action

type DescribeVPCIntercomRequest

type DescribeVPCIntercomRequest struct {
	request.CommonBase

	// VPC短ID
	VPCId *string `required:"true"`

	// 目的VPC所在地域,默认为全部地域
	DstRegion *string `required:"false"`

	// 目的项目ID,默认为全部项目
	DstProjectId *string `required:"false"`
}

DescribeVPCIntercomRequest is request schema for DescribeVPCIntercom action

type DescribeVPCIntercomResponse

type DescribeVPCIntercomResponse struct {
	response.CommonBase

	// 联通VPC信息数组
	DataSet []VPCIntercomInfo
}

DescribeVPCIntercomResponse is response schema for DescribeVPCIntercom action

type DescribeVPCRequest

type DescribeVPCRequest struct {
	request.CommonBase

	// VPCId
	VPCIds []string `required:"false"`

	// 业务组名称
	Tag *string `required:"false"`

	// 偏移量
	Offset *int `required:"false"`

	// 列表长度
	Limit *int `required:"false"`
}

DescribeVPCRequest is request schema for DescribeVPC action

type DescribeVPCResponse

type DescribeVPCResponse struct {
	response.CommonBase

	// vpc信息,具体结构见下方VPCInfo
	DataSet []VPCInfo
}

DescribeVPCResponse is response schema for DescribeVPC action

type ResourceInfo

type ResourceInfo struct {

	// 资源名称
	Name string

	// 资源id
	ResourceId string

	// 资源类型
	ResourceType string

	// ip地址
	IP string
}

ResourceInfo - 资源信息

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

type UpdateSubnetAttributeRequest

type UpdateSubnetAttributeRequest struct {
	request.CommonBase

	// 子网ID
	SubnetId *string `required:"true"`

	// 子网名称(如果Name不填写,Tag必须填写)
	Name *string `required:"false"`

	// 业务组名称(如果Tag不填写,Name必须填写)
	Tag *string `required:"false"`
}

UpdateSubnetAttributeRequest is request schema for UpdateSubnetAttribute action

type UpdateSubnetAttributeResponse

type UpdateSubnetAttributeResponse struct {
	response.CommonBase
}

UpdateSubnetAttributeResponse is response schema for UpdateSubnetAttribute action

type UpdateVPCNetworkRequest added in v0.6.9

type UpdateVPCNetworkRequest struct {
	request.CommonBase

	// VPC的ID
	VPCId *string `required:"true"`

	// 更新的全量网段
	Network []string `required:"true"`
}

UpdateVPCNetworkRequest is request schema for UpdateVPCNetwork action

type UpdateVPCNetworkResponse added in v0.6.9

type UpdateVPCNetworkResponse struct {
	response.CommonBase

	// 错误信息
	Message string
}

UpdateVPCNetworkResponse is response schema for UpdateVPCNetwork action

type VPCClient

type VPCClient struct {
	*ucloud.Client
}

VPCClient is the client of VPC2.0

func NewClient

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

NewClient will return a instance of VPCClient

func (*VPCClient) AddVPCNetwork

func (c *VPCClient) AddVPCNetwork(req *AddVPCNetworkRequest) (*AddVPCNetworkResponse, error)

AddVPCNetwork - 添加VPC网段

func (*VPCClient) CreateSubnet

func (c *VPCClient) CreateSubnet(req *CreateSubnetRequest) (*CreateSubnetResponse, error)

CreateSubnet - 创建子网

func (*VPCClient) CreateVPC

func (c *VPCClient) CreateVPC(req *CreateVPCRequest) (*CreateVPCResponse, error)

CreateVPC - 创建VPC

func (*VPCClient) CreateVPCIntercom

func (c *VPCClient) CreateVPCIntercom(req *CreateVPCIntercomRequest) (*CreateVPCIntercomResponse, error)

CreateVPCIntercom - 新建VPC互通关系

func (*VPCClient) DeleteSubnet

func (c *VPCClient) DeleteSubnet(req *DeleteSubnetRequest) (*DeleteSubnetResponse, error)

DeleteSubnet - 删除子网

func (*VPCClient) DeleteVPC

func (c *VPCClient) DeleteVPC(req *DeleteVPCRequest) (*DeleteVPCResponse, error)

DeleteVPC - 删除VPC

func (*VPCClient) DeleteVPCIntercom

func (c *VPCClient) DeleteVPCIntercom(req *DeleteVPCIntercomRequest) (*DeleteVPCIntercomResponse, error)

DeleteVPCIntercom - 删除VPC互通关系

func (*VPCClient) DescribeSubnet

func (c *VPCClient) DescribeSubnet(req *DescribeSubnetRequest) (*DescribeSubnetResponse, error)

DescribeSubnet - 获取子网信息

func (*VPCClient) DescribeSubnetResource

DescribeSubnetResource - 展示子网资源

func (*VPCClient) DescribeVPC

func (c *VPCClient) DescribeVPC(req *DescribeVPCRequest) (*DescribeVPCResponse, error)

DescribeVPC - 获取VPC信息

func (*VPCClient) DescribeVPCIntercom

func (c *VPCClient) DescribeVPCIntercom(req *DescribeVPCIntercomRequest) (*DescribeVPCIntercomResponse, error)

DescribeVPCIntercom - 获取VPC互通信息

func (*VPCClient) NewAddVPCNetworkRequest

func (c *VPCClient) NewAddVPCNetworkRequest() *AddVPCNetworkRequest

NewAddVPCNetworkRequest will create request of AddVPCNetwork action.

func (*VPCClient) NewCreateSubnetRequest

func (c *VPCClient) NewCreateSubnetRequest() *CreateSubnetRequest

NewCreateSubnetRequest will create request of CreateSubnet action.

func (*VPCClient) NewCreateVPCIntercomRequest

func (c *VPCClient) NewCreateVPCIntercomRequest() *CreateVPCIntercomRequest

NewCreateVPCIntercomRequest will create request of CreateVPCIntercom action.

func (*VPCClient) NewCreateVPCRequest

func (c *VPCClient) NewCreateVPCRequest() *CreateVPCRequest

NewCreateVPCRequest will create request of CreateVPC action.

func (*VPCClient) NewDeleteSubnetRequest

func (c *VPCClient) NewDeleteSubnetRequest() *DeleteSubnetRequest

NewDeleteSubnetRequest will create request of DeleteSubnet action.

func (*VPCClient) NewDeleteVPCIntercomRequest

func (c *VPCClient) NewDeleteVPCIntercomRequest() *DeleteVPCIntercomRequest

NewDeleteVPCIntercomRequest will create request of DeleteVPCIntercom action.

func (*VPCClient) NewDeleteVPCRequest

func (c *VPCClient) NewDeleteVPCRequest() *DeleteVPCRequest

NewDeleteVPCRequest will create request of DeleteVPC action.

func (*VPCClient) NewDescribeSubnetRequest

func (c *VPCClient) NewDescribeSubnetRequest() *DescribeSubnetRequest

NewDescribeSubnetRequest will create request of DescribeSubnet action.

func (*VPCClient) NewDescribeSubnetResourceRequest

func (c *VPCClient) NewDescribeSubnetResourceRequest() *DescribeSubnetResourceRequest

NewDescribeSubnetResourceRequest will create request of DescribeSubnetResource action.

func (*VPCClient) NewDescribeVPCIntercomRequest

func (c *VPCClient) NewDescribeVPCIntercomRequest() *DescribeVPCIntercomRequest

NewDescribeVPCIntercomRequest will create request of DescribeVPCIntercom action.

func (*VPCClient) NewDescribeVPCRequest

func (c *VPCClient) NewDescribeVPCRequest() *DescribeVPCRequest

NewDescribeVPCRequest will create request of DescribeVPC action.

func (*VPCClient) NewUpdateSubnetAttributeRequest

func (c *VPCClient) NewUpdateSubnetAttributeRequest() *UpdateSubnetAttributeRequest

NewUpdateSubnetAttributeRequest will create request of UpdateSubnetAttribute action.

func (*VPCClient) NewUpdateVPCNetworkRequest added in v0.6.9

func (c *VPCClient) NewUpdateVPCNetworkRequest() *UpdateVPCNetworkRequest

NewUpdateVPCNetworkRequest will create request of UpdateVPCNetwork action.

func (*VPCClient) UpdateSubnetAttribute

UpdateSubnetAttribute - 更新子网信息

func (*VPCClient) UpdateVPCNetwork added in v0.6.9

func (c *VPCClient) UpdateVPCNetwork(req *UpdateVPCNetworkRequest) (*UpdateVPCNetworkResponse, error)

UpdateVPCNetwork - 修改VPC地址空间,只支持删除地址空间

type VPCInfo

type VPCInfo struct {

	// 业务组
	Tag string

	// 创建时间
	CreateTime int

	// vpc名称
	Name string

	// vpc地址空间
	Network []string

	// vpc地址空间信息
	NetworkInfo []VPCNetworkInfo

	// vpc中子网数量
	SubnetCount int

	// 更新时间
	UpdateTime int

	// vpc的资源ID
	VPCId string
}

VPCInfo - vpc信息

type VPCIntercomInfo

type VPCIntercomInfo struct {

	// 项目Id
	ProjectId string

	// VPC的地址空间
	Network []string

	// 所属地域
	DstRegion string

	// VPC名字
	Name string

	// VPCId
	VPCId string

	// 业务组(未分组显示为 Default)
	Tag string
}

VPCIntercomInfo -

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

type VPCNetworkInfo

type VPCNetworkInfo struct {

	// 地址空间段
	Network string

	// 地址空间中子网数量
	SubnetCount int
}

VPCNetworkInfo - vpc地址空间信息

type VPCSubnetInfoSet

type VPCSubnetInfoSet struct {

	// VPC id
	VPCId string

	// VPC名称
	VPCName string

	// 子网id
	SubnetId string

	// 子网名称
	SubnetName string

	// 地址
	Zone string

	// 名称
	Name string

	// 备注
	Remark string

	// Tag
	Tag string

	// 子网类型
	SubnetType int

	// 子网网段
	Subnet string

	// 子网掩码
	Netmask string

	// 子网网关
	Gateway string

	// 创建时间
	CreateTime int

	// 虚拟路由 id
	VRouterId string

	// 是否关联NATGW
	HasNATGW bool
}

VPCSubnetInfoSet - DescribeSubnet

this model is auto created by ucloud code generater for open api, you can also see https://docs.ucloud.cn for detail.

Jump to

Keyboard shortcuts

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