vpc

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vpc defines the VPC services of BCE. The supported APIs are all defined in different files.

Index

Constants

View Source
const (
	URI_PREFIX = bce.URI_PREFIX + "v1"

	DEFAULT_ENDPOINT = "bcc." + bce.DEFAULT_REGION + ".baidubce.com"

	REQUEST_VPC_URL      = "/vpc"
	REQUEST_SUBNET_URL   = "/subnet"
	REQUEST_ROUTE_URL    = "/route"
	REQUEST_RULE_URL     = "/rule"
	REQUEST_ACL_URL      = "/acl"
	REQUEST_NAT_URL      = "/nat"
	REQUEST_PEERCONN_URL = "/peerconn"
)
View Source
const (
	SUBNET_TYPE_BCC    SubnetType = "BCC"
	SUBNET_TYPE_BCCNAT SubnetType = "BCC_NAT"
	SUBNET_TYPE_BBC    SubnetType = "BBC"

	NEXTHOP_TYPE_CUSTOM NexthopType = "custom"
	NEXTHOP_TYPE_VPN    NexthopType = "vpn"
	NEXTHOP_TYPE_NAT    NexthopType = "nat"

	ACL_RULE_PROTOCOL_TCP  AclRuleProtocolType = "tcp"
	ACL_RULE_PROTOCOL_UDP  AclRuleProtocolType = "udp"
	ACL_RULE_PROTOCOL_ICMP AclRuleProtocolType = "icmp"

	ACL_RULE_DIRECTION_INGRESS AclRuleDirectionType = "ingress"
	ACL_RULE_DIRECTION_EGRESS  AclRuleDirectionType = "egress"

	ACL_RULE_ACTION_ALLOW AclRuleActionType = "allow"
	ACL_RULE_ACTION_DENY  AclRuleActionType = "deny"

	ACL_RULE_PORT_ALL AclRulePortType = "all"

	NAT_GATEWAY_SPEC_SMALL  NatGatewaySpecType = "small"
	NAT_GATEWAY_SPEC_MEDIUM NatGatewaySpecType = "medium"
	NAT_GATEWAY_SPEC_LARGE  NatGatewaySpecType = "large"

	PAYMENT_TIMING_PREPAID  PaymentTimingType = "Prepaid"
	PAYMENT_TIMING_POSTPAID PaymentTimingType = "Postpaid"

	PEERCONN_ROLE_INITIATOR PeerConnRoleType = "initiator"
	PEERCONN_ROLE_ACCEPTOR  PeerConnRoleType = "acceptor"

	NAT_STATUS_BUILDING     NatStatusType = "building"
	NAT_STATUS_UNCONFIGURED NatStatusType = "unconfigured"
	NAT_STATUS_CONFIGURING  NatStatusType = "configuring"
	NAT_STATUS_ACTIVE       NatStatusType = "active"
	NAT_STATUS_STOPPING     NatStatusType = "stopping"
	NAT_STATUS_DOWN         NatStatusType = "down"
	NAT_STATUS_STARTING     NatStatusType = "starting"
	NAT_STATUS_DELETING     NatStatusType = "deleting"
	NAT_STATUS_DELETED      NatStatusType = "deleted"

	PEERCONN_STATUS_CREATING       PeerConnStatusType = "creating"
	PEERCONN_STATUS_CONSULTING     PeerConnStatusType = "consulting"
	PEERCONN_STATUS_CONSULT_FAILED PeerConnStatusType = "consult_failed"
	PEERCONN_STATUS_ACTIVE         PeerConnStatusType = "active"
	PEERCONN_STATUS_DOWN           PeerConnStatusType = "down"
	PEERCONN_STATUS_STARTING       PeerConnStatusType = "starting"
	PEERCONN_STATUS_STOPPING       PeerConnStatusType = "stopping"
	PEERCONN_STATUS_DELETING       PeerConnStatusType = "deleting"
	PEERCONN_STATUS_DELETED        PeerConnStatusType = "deleted"
	PEERCONN_STATUS_EXPIRED        PeerConnStatusType = "expired"
	PEERCONN_STATUS_ERROR          PeerConnStatusType = "error"
	PEERCONN_STATUS_UPDATING       PeerConnStatusType = "updating"

	DNS_STATUS_CLOSE   DnsStatusType = "close"
	DNS_STATUS_WAIT    DnsStatusType = "wait"
	DNS_STATUS_SYNCING DnsStatusType = "syncing"
	DNS_STATUS_OPEN    DnsStatusType = "open"
	DNS_STATUS_CLOSING DnsStatusType = "closing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AclEntry

type AclEntry struct {
	SubnetId   string    `json:"subnetId"`
	SubnetName string    `json:"subnetName"`
	SubnetCidr string    `json:"subnetCidr"`
	AclRules   []AclRule `json:"aclRules"`
}

type AclRule

type AclRule struct {
	Id                   string               `json:"id"`
	SubnetId             string               `json:"subnetId"`
	Description          string               `json:"description"`
	Protocol             AclRuleProtocolType  `json:"protocol"`
	SourceIpAddress      string               `json:"sourceIpAddress"`
	DestinationIpAddress string               `json:"destinationIpAddress"`
	SourcePort           string               `json:"sourcePort"`
	DestinationPort      string               `json:"destinationPort"`
	Position             int                  `json:"position"`
	Direction            AclRuleDirectionType `json:"direction"`
	Action               AclRuleActionType    `json:"action"`
}

type AclRuleActionType

type AclRuleActionType string

type AclRuleDirectionType

type AclRuleDirectionType string

type AclRulePortType

type AclRulePortType string

type AclRuleProtocolType

type AclRuleProtocolType string

type AclRuleRequest

type AclRuleRequest struct {
	SubnetId             string               `json:"subnetId"`
	Description          string               `json:"description,omitempty"`
	Protocol             AclRuleProtocolType  `json:"protocol"`
	SourceIpAddress      string               `json:"sourceIpAddress"`
	DestinationIpAddress string               `json:"destinationIpAddress"`
	SourcePort           string               `json:"sourcePort"`
	DestinationPort      string               `json:"destinationPort"`
	Position             int                  `json:"position"`
	Direction            AclRuleDirectionType `json:"direction"`
	Action               AclRuleActionType    `json:"action"`
}

type Billing

type Billing struct {
	PaymentTiming PaymentTimingType `json:"paymentTiming,omitempty"`
	Reservation   *Reservation      `json:"reservation,omitempty"`
}

type BindEipsArgs

type BindEipsArgs struct {
	ClientToken string   `json:"-"`
	Eips        []string `json:"eips"`
}

BindEipsArgs defines the structure of the input parameters for the BindEips api

type Client

type Client struct {
	*bce.BceClient
}

Client of VPC service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

func (*Client) AcceptPeerConnApply

func (c *Client) AcceptPeerConnApply(peerConnId, clientToken string) error

AcceptPeerConnApply - accept the specific peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) BindEips

func (c *Client) BindEips(natId string, args *BindEipsArgs) error

BindEips - bind eips for the specific nat gateway

PARAMS:

  • natId: the id of the specific nat gateway
  • args: the arguments to bind eips

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ClosePeerConnSyncDNS

func (c *Client) ClosePeerConnSyncDNS(peerConnId string, args *PeerConnSyncDNSArgs) error

ClosePeerConnSyncDNS - close the dns synchronization for the given peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • args: the arguments to close dns synchronization

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateAclRule

func (c *Client) CreateAclRule(args *CreateAclRuleArgs) error

CreateAclRule - create a new acl rule with the specific parameters

PARAMS:

  • args: the arguments to create acl rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) CreateNatGateway

func (c *Client) CreateNatGateway(args *CreateNatGatewayArgs) (*CreateNatGatewayResult, error)

CreateNatGateway - create a new nat gateway

PARAMS:

  • args: the arguments to create nat gateway

RETURNS:

  • *CreateNatGatewayResult: the id of the nat gateway newly created
  • error: nil if success otherwise the specific error

func (*Client) CreatePeerConn

func (c *Client) CreatePeerConn(args *CreatePeerConnArgs) (*CreatePeerConnResult, error)

CreatePeerConn - create a new peer connection with the specific parameters

PARAMS:

  • args: the arguments to create peer connection

RETURNS:

  • *CreatePeerConnResult: the id of peer connection newly created
  • error: nil if success otherwise the specific error

func (*Client) CreateRouteRule

func (c *Client) CreateRouteRule(args *CreateRouteRuleArgs) (*CreateRouteRuleResult, error)

CreateRouteRule - create a new route rule with the given parameters

PARAMS:

  • args: the arguments to create route rule

RETURNS:

  • *CreateRouteRuleResult: the id of the route rule newly created
  • error: nil if success otherwise the specific error

func (*Client) CreateSubnet

func (c *Client) CreateSubnet(args *CreateSubnetArgs) (*CreateSubnetResult, error)

CreateSubnet - create a new subnet with the specified parameters

PARAMS:

  • args: the arguments to create subnet

RETURNS:

  • *CreateSubnetResult: the ID of the subnet newly created
  • error: nil if success otherwise the specific error

func (*Client) CreateVPC

func (c *Client) CreateVPC(args *CreateVPCArgs) (*CreateVPCResult, error)

CreateVPC - create a new VPC with the specified parameters

PARAMS:

  • args: the arguments to create VPC

RETURNS:

  • *CreateVPCResult: the id of the VPC newly created
  • error: nil if success otherwise the specific error

func (*Client) DeleteAclRule

func (c *Client) DeleteAclRule(aclRuleId, clientToken string) error

DeleteAclRule - delete the specific acl rule

PARAMS:

  • aclRuleId: the id of the specific acl rule
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteNatGateway

func (c *Client) DeleteNatGateway(natId, clientToken string) error

DeleteNatGateway - delete the specific nat gateway

PARAMS:

  • natId: the id of the specific nat gateway
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeletePeerConn

func (c *Client) DeletePeerConn(peerConnId, clientToken string) error

DeletePeerConn - delete the specific peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteRouteRule

func (c *Client) DeleteRouteRule(routeRuleId, clientToken string) error

DeleteRouteRule - delete the given routing rule

PARAMS:

  • routeRuleId: the id of the specific routing rule
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteSubnet

func (c *Client) DeleteSubnet(subnetId string, clientToken string) error

DeleteSubnet - delete the given subnet

PARAMS:

  • subnetId: the id of the specified subnet
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) DeleteVPC

func (c *Client) DeleteVPC(vpcId, clientToken string) error

DeleteVPC - delete a specified VPC

PARAMS:

  • vpcId: the VPC id to be deleted
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) GetNatGatewayDetail

func (c *Client) GetNatGatewayDetail(natId string) (*NAT, error)

GetNatGatewayDetail - get details of the specific nat gateway

PARAMS:

  • natId: the id of the specified nat

RETURNS:

  • *NAT: the result of the specific nat gateway details
  • error: nil if success otherwise the specific error

func (*Client) GetPeerConnDetail

func (c *Client) GetPeerConnDetail(peerConnId string, role PeerConnRoleType) (*PeerConn, error)

GetPeerConnDetail - get details for the specific peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • role: the role of the specific peer connection, which can be initiator or acceptor

RETURNS:

  • *PeerConn: the result of the specfic peer connection details
  • error: nil if success otherwise the specific error

func (*Client) GetRouteTableDetail

func (c *Client) GetRouteTableDetail(routeTableId, vpcId string) (*GetRouteTableResult, error)

GetRouteTableDetail - get details of the given routeTableId or vpcId

PARAMS:

  • routeTableId: the id of the specific route table
  • vpcId: the id of the specific VPC

RETURNS:

  • *GetRouteTableResult: the result of route table details
  • error: nil if success otherwise the specific error

func (*Client) GetSubnetDetail

func (c *Client) GetSubnetDetail(subnetId string) (*GetSubnetDetailResult, error)

GetSubnetDetail - get details of the given subnet

PARAMS:

  • subnetId: the id of the specified subnet

RETURNS:

  • *GetSubnetDetailResult: the result of the given subnet details
  • error: nil if success otherwise the specific error

func (*Client) GetVPCDetail

func (c *Client) GetVPCDetail(vpcId string) (*GetVPCDetailResult, error)

GetVPCDetail - get details of the specified VPC

PARAMS:

  • vpcId: the VPC id

RETURNS:

  • *GetVPCDetailResult: the details of the specified VPC
  • error: nil if success otherwise the specific error

func (*Client) ListAclEntrys

func (c *Client) ListAclEntrys(vpcId string) (*ListAclEntrysResult, error)

ListAclEntrys - list all acl entrys of the given VPC

PARAMS:

  • vpcId: the id of the specific VPC

RETURNS:

  • *ListAclEntrysResult: the result of all acl entrys
  • error: nil if success otherwise the specific error

func (*Client) ListAclRules

func (c *Client) ListAclRules(args *ListAclRulesArgs) (*ListAclRulesResult, error)

ListAclRules - list all acl rules with the specific parameters

PARAMS:

  • args: the arguments to list all acl rules

RETURNS:

  • *ListAclRulesResult: the result of all acl rules
  • error: nil if success otherwise the specific error

func (*Client) ListNatGateway

func (c *Client) ListNatGateway(args *ListNatGatewayArgs) (*ListNatGatewayResult, error)

ListNatGateway - list all nat gateways with the specific parameters

PARAMS:

  • args: the arguments to list nat gateways

RETURNS:

  • *ListNatGatewayResult: the result of nat gateway list
  • error: nil if success otherwise the specific error

func (*Client) ListPeerConn

func (c *Client) ListPeerConn(args *ListPeerConnsArgs) (*ListPeerConnsResult, error)

ListPeerConn - list all peer connections with the specific parameters

PARAMS:

  • args: the arguments to list peer connections

RETURNS:

  • *ListPeerConnsResult: the result of the peer connection list
  • error: nil if success otherwise the specific error

func (*Client) ListSubnets

func (c *Client) ListSubnets(args *ListSubnetArgs) (*ListSubnetResult, error)

ListSubnets - list all subnets with the specified parameters

PARAMS:

  • args: the arguments to list subnets
  • :

RETURNS:

  • *ListSubnetResult: the result of all subnets
  • error: nil if success otherwise the specific error

func (*Client) ListVPC

func (c *Client) ListVPC(args *ListVPCArgs) (*ListVPCResult, error)

ListVPC - list all VPCs with the specified parameters

PARAMS:

  • args: the arguments to list VPCs

RETURNS:

  • *ListVPCResult: the result of all VPCs
  • error: nil if success otherwise the specific error

func (*Client) OpenPeerConnSyncDNS

func (c *Client) OpenPeerConnSyncDNS(peerConnId string, args *PeerConnSyncDNSArgs) error

OpenPeerConnSyncDNS - open the dns synchronization for the given peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • args: the arguments to open dns synchronization

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RejectPeerConnApply

func (c *Client) RejectPeerConnApply(peerConnId, clientToken string) error

RejectPeerConnApply - reject the specific peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • clientToken: the idempotent token

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RenewNatGateway

func (c *Client) RenewNatGateway(natId string, args *RenewNatGatewayArgs) error

RenewNatGateway - renew nat gateway with the specific parameters

PARAMS:

  • natId: the id of the specific nat gateway
  • args: the arguments to renew nat gateway

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) RenewPeerConn

func (c *Client) RenewPeerConn(peerConnId string, args *RenewPeerConnArgs) error

RenewPeerConn - renew the specific peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • args: the arguments to renew the peer connection

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) ResizePeerConn

func (c *Client) ResizePeerConn(peerConnId string, args *ResizePeerConnArgs) error

ResizePeerConn - resize the specific peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • args: the arguments to resize the peer connection

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UnBindEips

func (c *Client) UnBindEips(natId string, args *UnBindEipsArgs) error

UnBindEips - unbind eips for the specific nat gateway

PARAMS:

  • natId: the id of the specific nat gateway
  • args: the arguments to unbind eips

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateAclRule

func (c *Client) UpdateAclRule(aclRuleId string, args *UpdateAclRuleArgs) error

UpdateAclRule - udpate acl rule with the specific parameters

PARAMS:

  • aclRuleId: the id of the specific acl rule
  • args: the arguments to update acl rule

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateNatGateway

func (c *Client) UpdateNatGateway(natId string, args *UpdateNatGatewayArgs) error

UpdateNatGateway - update the specified nat gateway

PARAMS:

  • natId: the id of the specific nat gateway
  • args: the arguments to update nat gateway

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdatePeerConn

func (c *Client) UpdatePeerConn(peerConnId string, args *UpdatePeerConnArgs) error

UpdatePeerConn - update the specific peer connection

PARAMS:

  • peerConnId: the id of the specific peer connection
  • args: the arguments to update the specific peer connection

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateSubnet

func (c *Client) UpdateSubnet(subnetId string, args *UpdateSubnetArgs) error

UpdateSubnet - update the given subnet

PARAMS:

  • subnetId: the id of the given subnet
  • args: the arguments to update subnet

RETURNS:

  • error: nil if success otherwise the specific error

func (*Client) UpdateVPC

func (c *Client) UpdateVPC(vpcId string, updateVPCArgs *UpdateVPCArgs) error

UpdateVPC - update a specified VPC

PARAMS:

  • vpcId: the id of the specified VPC
  • updateVPCArgs: the arguments to udpate VPC

RETURNS:

  • error: nil if success otherwise the specific error

type CreateAclRuleArgs

type CreateAclRuleArgs struct {
	ClientToken string           `json:"-"`
	AclRules    []AclRuleRequest `json:"aclRules"`
}

CreateAclRuleArgs defines the structure of the input parameters for the CreateAclRule api

type CreateNatGatewayArgs

type CreateNatGatewayArgs struct {
	ClientToken string             `json:"-"`
	Name        string             `json:"name"`
	VpcId       string             `json:"vpcId"`
	Spec        NatGatewaySpecType `json:"spec"`
	Eips        []string           `json:"eips,omitempty"`
	Billing     *Billing           `json:"billing"`
}

CreateNatGatewayArgs defines the structure of the input parameters for the CreateNatGateway api

type CreateNatGatewayResult

type CreateNatGatewayResult struct {
	NatId string `json:"natId"`
}

CreateNatGatewayResult defines the structure of the output parameters for the CreateNatGateway api

type CreatePeerConnArgs

type CreatePeerConnArgs struct {
	ClientToken     string   `json:"-"`
	BandwidthInMbps int      `json:"bandwidthInMbps"`
	Description     string   `json:"description,omitempty"`
	LocalIfName     string   `json:"localIfName,omitempty"`
	LocalVpcId      string   `json:"localVpcId"`
	PeerAccountId   string   `json:"peerAccountId,omitempty"`
	PeerVpcId       string   `json:"peerVpcId"`
	PeerRegion      string   `json:"peerRegion"`
	PeerIfName      string   `json:"peerIfName,omitempty"`
	Billing         *Billing `json:"billing"`
}

CreatePeerConnArgs defines the structure of the input parameters for the CreatePeerConn api

type CreatePeerConnResult

type CreatePeerConnResult struct {
	PeerConnId string `json:"peerConnId"`
}

CreatePeerConnResult defines the structure of the output parameters for the CreatePeerConn api

type CreateRouteRuleArgs

type CreateRouteRuleArgs struct {
	ClientToken        string      `json:"-"`
	RouteTableId       string      `json:"routeTableId"`
	SourceAddress      string      `json:"sourceAddress"`
	DestinationAddress string      `json:"destinationAddress"`
	NexthopId          string      `json:"nexthopId,omitempty"`
	NexthopType        NexthopType `json:"nexthopType"`
	Description        string      `json:"description,omitempty"`
}

CreateRouteRuleArgs defines the structure of the input parameters for the CreateRouteRule api

type CreateRouteRuleResult

type CreateRouteRuleResult struct {
	RouteRuleId string `json:"routeRuleId"`
}

CreateRouteRuleResult defines the structure of the output parameters for the CreateRouteRule api

type CreateSubnetArgs

type CreateSubnetArgs struct {
	ClientToken string           `json:"-"`
	Name        string           `json:"name"`
	ZoneName    string           `json:"zoneName"`
	Cidr        string           `json:"cidr"`
	VpcId       string           `json:"vpcId"`
	SubnetType  SubnetType       `json:"subnetType,omitempty"`
	Description string           `json:"description,omitempty"`
	Tags        []model.TagModel `json:"tags,omitempty"`
}

CreateSubnetArgs defines the structure of the input parameters for the CreateSubnet api

type CreateSubnetResult

type CreateSubnetResult struct {
	SubnetId string `json:"subnetId"`
}

CreateSubnetResult defines the structure of the output parameters for the CreateSubnet api

type CreateVPCArgs

type CreateVPCArgs struct {
	ClientToken string           `json:"-"`
	Name        string           `json:"name"`
	Description string           `json:"description,omitempty"`
	Cidr        string           `json:"cidr"`
	Tags        []model.TagModel `json:"tags,omitempty"`
}

CreateVPCArgs defines the structure of the input parameters for the CreateVPC api

type CreateVPCResult

type CreateVPCResult struct {
	VPCID string `json:"vpcId"`
}

CreateVPCResult defines the structure of the output parameters for the CreateVPC api

type DnsStatusType

type DnsStatusType string

type GetRouteTableResult

type GetRouteTableResult struct {
	RouteTableId string      `json:"routeTableId"`
	VpcId        string      `json:"vpcId"`
	RouteRules   []RouteRule `json:"routeRules"`
}

GetRouteTableResult defines the structure of the output parameters for the GetRouteTableDetail api

type GetSubnetDetailResult

type GetSubnetDetailResult struct {
	Subnet Subnet `json:"subnet"`
}

GetSubnetDetailResult defines the structure of the output parameters for the GetSubnetDetail api

type GetVPCDetailResult

type GetVPCDetailResult struct {
	VPC ShowVPCModel `json:"vpc"`
}

GetVPCDetailResult defines the structure of the output parameters for the GetVPCDetail api

type ListAclEntrysResult

type ListAclEntrysResult struct {
	VpcId     string     `json:"vpcId"`
	VpcName   string     `json:"vpcName"`
	VpcCidr   string     `json:"vpcCidr"`
	AclEntrys []AclEntry `json:"aclEntrys"`
}

ListAclEntrysResult defines the structure of the output parameters for the ListAclEntrys api

type ListAclRulesArgs

type ListAclRulesArgs struct {
	Marker   string `json:"marker"`
	MaxKeys  int    `json:"maxKeys"`
	SubnetId string `json:"subnetId"`
}

ListAclRulesArgs defines the structure of the input parameters for the ListAclRules api

type ListAclRulesResult

type ListAclRulesResult struct {
	Marker      string    `json:"marker"`
	IsTruncated bool      `json:"isTruncated"`
	NextMarker  string    `json:"nextMarker"`
	MaxKeys     int       `json:"maxKeys"`
	AclRules    []AclRule `json:"aclRules"`
}

ListAclRulesResult defines the structure of the output parameters for the ListAclRules api

type ListNatGatewayArgs

type ListNatGatewayArgs struct {
	VpcId   string
	NatId   string
	Name    string
	Ip      string
	Marker  string
	MaxKeys int
}

ListNatGatewayArgs defines the structure of the input parameters for the ListNatGateway api

type ListNatGatewayResult

type ListNatGatewayResult struct {
	Nats        []NAT  `json:"nats"`
	Marker      string `json:"marker"`
	IsTruncated bool   `json:"isTruncated"`
	NextMarker  string `json:"nextMarker"`
	MaxKeys     int    `json:"maxKeys"`
}

ListNatGatewayResult defines the structure of the output parameters for the ListNatGateway api

type ListPeerConnsArgs

type ListPeerConnsArgs struct {
	VpcId   string
	Marker  string
	MaxKeys int
}

ListPeerConnsArgs defines the structure of the input parameters for the ListPeerConns api

type ListPeerConnsResult

type ListPeerConnsResult struct {
	PeerConns   []PeerConn `json:"peerConns"`
	Marker      string     `json:"marker"`
	IsTruncated bool       `json:"isTruncated"`
	NextMarker  string     `json:"nextMarker"`
	MaxKeys     int        `json:"maxKeys"`
}

ListPeerConnsResult defines the structure of the output parameters for the ListPeerConns api

type ListSubnetArgs

type ListSubnetArgs struct {
	Marker     string
	MaxKeys    int
	VpcId      string
	ZoneName   string
	SubnetType SubnetType
}

ListSubnetArgs defines the structure of the input parameters for the ListSubnet api

type ListSubnetResult

type ListSubnetResult struct {
	Marker      string   `json:"marker"`
	IsTruncated bool     `json:"isTruncated"`
	NextMarker  string   `json:"nextMarker"`
	MaxKeys     int      `json:"maxKeys"`
	Subnets     []Subnet `json:"subnets"`
}

ListSubnetResult defines the structure of the output parameters for the ListSubnet api

type ListVPCArgs

type ListVPCArgs struct {
	Marker  string
	MaxKeys int

	// IsDefault is a string type,
	// so we can identify if it has been setted when the value is false.
	// NOTE: it can be only true or false.
	IsDefault string
}

ListVPCArgs defines the structure of the input parameters for the ListVPC api

type ListVPCResult

type ListVPCResult struct {
	Marker      string `json:"marker"`
	IsTruncated bool   `json:"isTruncated"`
	NextMarker  string `json:"nextMarker"`
	MaxKeys     int    `json:"maxKeys"`
	VPCs        []VPC  `json:"vpcs"`
}

ListVPCResult defines the structure of the output parameters for the ListVPC api

type NAT

type NAT struct {
	Id            string        `json:"id"`
	Name          string        `json:"name"`
	VpcId         string        `json:"vpcId"`
	Spec          string        `json:"spec"`
	Status        NatStatusType `json:"status"`
	Eips          []string      `json:"eips"`
	PaymentTiming string        `json:"paymentTiming"`
	ExpiredTime   string        `json:"expiredTime"`
}

NAT is the result for getNatGatewayDetail api.

type NatGatewaySpecType

type NatGatewaySpecType string

type NatStatusType

type NatStatusType string

type NexthopType

type NexthopType string

type PaymentTimingType

type PaymentTimingType string

type PeerConn

type PeerConn struct {
	PeerConnId      string             `json:"peerConnId"`
	Role            PeerConnRoleType   `json:"role"`
	Status          PeerConnStatusType `json:"status"`
	BandwidthInMbps int                `json:"bandwidthInMbps"`
	Description     string             `json:"description"`
	LocalIfId       string             `json:"localIfId"`
	LocalIfName     string             `json:"localIfName"`
	LocalVpcId      string             `json:"localVpcId"`
	LocalRegion     string             `json:"localRegion"`
	PeerVpcId       string             `json:"peerVpcId"`
	PeerRegion      string             `json:"peerRegion"`
	PeerAccountId   string             `json:"peerAccountId"`
	PaymentTiming   string             `json:"paymentTiming"`
	DnsStatus       DnsStatusType      `json:"dnsStatus"`
	CreatedTime     string             `json:"createdTime"`
	ExpiredTime     string             `json:"expiredTime"`
}

type PeerConnRoleType

type PeerConnRoleType string

type PeerConnStatusType

type PeerConnStatusType string

type PeerConnSyncDNSArgs

type PeerConnSyncDNSArgs struct {
	Role        PeerConnRoleType `json:"role"`
	ClientToken string           `json:"-"`
}

PeerConnSyncDNSArgs defines the structure of the input parameters for the PeerConnSyncDNS api

type RenewNatGatewayArgs

type RenewNatGatewayArgs struct {
	ClientToken string   `json:"-"`
	Billing     *Billing `json:"billing"`
}

RenewNatGatewayArgs defines the structure of the input parameters for the RenewNatGateway api

type RenewPeerConnArgs

type RenewPeerConnArgs struct {
	Billing     *Billing `json:"billing"`
	ClientToken string   `json:"-"`
}

RenewPeerConnArgs defines the structure of the input parameters for the RenewPeerConn api

type Reservation

type Reservation struct {
	ReservationLength   int    `json:"reservationLength"`
	ReservationTimeUnit string `json:"reservationTimeUnit"`
}

type ResizePeerConnArgs

type ResizePeerConnArgs struct {
	NewBandwidthInMbps int    `json:"newBandwidthInMbps"`
	ClientToken        string `json:"-"`
}

ResizePeerConnArgs defines the structure of the input parameters for the ResizePeerConn api

type RouteRule

type RouteRule struct {
	RouteRuleId        string      `json:"routeRuleId"`
	RouteTableId       string      `json:"routeTableId"`
	SourceAddress      string      `json:"sourceAddress"`
	DestinationAddress string      `json:"destinationAddress"`
	NexthopId          string      `json:"nexthopId"`
	NexthopType        NexthopType `json:"nexthopType"`
	Description        string      `json:"description"`
}

type ShowVPCModel

type ShowVPCModel struct {
	VPCId         string           `json:"vpcId"`
	Name          string           `json:"name"`
	Cidr          string           `json:"cidr"`
	Description   string           `json:"description"`
	IsDefault     bool             `json:"isDefault"`
	Subnets       []Subnet         `json:"subnets"`
	SecondaryCidr []string         `json:"secondaryCidr"`
	Tags          []model.TagModel `json:"tags"`
}

type Subnet

type Subnet struct {
	SubnetId    string           `json:"subnetId"`
	Name        string           `json:"name"`
	ZoneName    string           `json:"zoneName"`
	Cidr        string           `json:"cidr"`
	VPCId       string           `json:"vpcId"`
	SubnetType  SubnetType       `json:"subnetType"`
	Description string           `json:"description"`
	AvailableIp int              `json:"availableIp"`
	Tags        []model.TagModel `json:"tags"`
}

type SubnetType

type SubnetType string

type UnBindEipsArgs

type UnBindEipsArgs struct {
	ClientToken string   `json:"-"`
	Eips        []string `json:"eips"`
}

UnBindEipsArgs defines the structure of the input parameters for the UnBindEips api

type UpdateAclRuleArgs

type UpdateAclRuleArgs struct {
	ClientToken          string              `json:"-"`
	Description          string              `json:"description,omitempty"`
	Protocol             AclRuleProtocolType `json:"protocol,omitempty"`
	SourceIpAddress      string              `json:"sourceIpAddress,omitempty"`
	DestinationIpAddress string              `json:"destinationIpAddress,omitempty"`
	SourcePort           string              `json:"sourcePort,omitempty"`
	DestinationPort      string              `json:"destinationPort,omitempty"`
	Position             int                 `json:"position,omitempty"`
	Action               AclRuleActionType   `json:"action,omitempty"`
}

UpdateAclRuleArgs defines the structure of the input parameters for the UpdateAclRule api

type UpdateNatGatewayArgs

type UpdateNatGatewayArgs struct {
	ClientToken string `json:"-"`
	Name        string `json:"name"`
}

UpdateNatGatewayArgs defines the structure of the input parameters for the UpdateNatGateway api

type UpdatePeerConnArgs

type UpdatePeerConnArgs struct {
	LocalIfId   string `json:"localIfId"`
	Description string `json:"description,omitempty"`
	LocalIfName string `json:"localIfName,omitempty"`
}

UpdatePeerConnArgs defines the structure of the input parameters for the UpdatePeerConn api

type UpdateSubnetArgs

type UpdateSubnetArgs struct {
	ClientToken string `json:"-"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

UpdateSubnetArgs defines the structure of the input parameters for the UpdateSubnet api

type UpdateVPCArgs

type UpdateVPCArgs struct {
	ClientToken string `json:"-"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

UpdateVPCArgs defines the structure of the input parameters for the UpdateVPC api

type VPC

type VPC struct {
	VPCID         string           `json:"vpcId"`
	Name          string           `json:"name"`
	Cidr          string           `json:"cidr"`
	Description   string           `json:"description"`
	IsDefault     bool             `json:"isDefault"`
	SecondaryCidr []string         `json:"secondaryCidr"`
	Tags          []model.TagModel `json:"tags"`
}

Jump to

Keyboard shortcuts

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