Documentation ¶
Overview ¶
Package vpc defines the VPC services of BCE. The supported APIs are all defined in different files.
Index ¶
- Constants
- type AclEntry
- type AclRule
- type AclRuleActionType
- type AclRuleDirectionType
- type AclRulePortType
- type AclRuleProtocolType
- type AclRuleRequest
- type BatchCreateNatGatewayDnatRuleArgs
- type BatchCreateNatGatewayDnatRuleResult
- type BatchCreateNatGatewaySnatRuleArgs
- type BatchCreateNatGatewaySnatRuleResult
- type Billing
- type BindDnatEipsArgs
- type BindEipsArgs
- type Client
- func (c *Client) AcceptPeerConnApply(peerConnId, clientToken string) error
- func (c *Client) BatchCreateNatGatewayDnatRule(natId string, args *BatchCreateNatGatewayDnatRuleArgs) (*BatchCreateNatGatewayDnatRuleResult, error)
- func (c *Client) BatchCreateNatGatewaySnatRule(args *BatchCreateNatGatewaySnatRuleArgs) (*BatchCreateNatGatewaySnatRuleResult, error)
- func (c *Client) BindDnatEips(natId string, args *BindDnatEipsArgs) error
- func (c *Client) BindEips(natId string, args *BindEipsArgs) error
- func (c *Client) ClosePeerConnSyncDNS(peerConnId string, args *PeerConnSyncDNSArgs) error
- func (c *Client) CreateAclRule(args *CreateAclRuleArgs) error
- func (c *Client) CreateNatGateway(args *CreateNatGatewayArgs) (*CreateNatGatewayResult, error)
- func (c *Client) CreateNatGatewayDnatRule(natId string, args *CreateNatGatewayDnatRuleArgs) (*CreateNatGatewayDnatRuleResult, error)
- func (c *Client) CreateNatGatewaySnatRule(natId string, args *CreateNatGatewaySnatRuleArgs) (*CreateNatGatewaySnatRuleResult, error)
- func (c *Client) CreatePeerConn(args *CreatePeerConnArgs) (*CreatePeerConnResult, error)
- func (c *Client) CreateRouteRule(args *CreateRouteRuleArgs) (*CreateRouteRuleResult, error)
- func (c *Client) CreateSubnet(args *CreateSubnetArgs) (*CreateSubnetResult, error)
- func (c *Client) CreateVPC(args *CreateVPCArgs) (*CreateVPCResult, error)
- func (c *Client) DeleteAclRule(aclRuleId, clientToken string) error
- func (c *Client) DeleteNatGateway(natId, clientToken string) error
- func (c *Client) DeleteNatGatewayDnatRule(natId string, dnatRuleId string, clientToken string) error
- func (c *Client) DeleteNatGatewaySnatRule(natId string, snatRuleId string, clientToken string) error
- func (c *Client) DeletePeerConn(peerConnId, clientToken string) error
- func (c *Client) DeleteRouteRule(routeRuleId, clientToken string) error
- func (c *Client) DeleteSubnet(subnetId string, clientToken string) error
- func (c *Client) DeleteVPC(vpcId, clientToken string) error
- func (c *Client) GetNatGatewayDetail(natId string) (*NAT, error)
- func (c *Client) GetNetworkTopologyInfo(args *GetNetworkTopologyArgs) (*NetworkTopologyResult, error)
- func (c *Client) GetPeerConnDetail(peerConnId string, role PeerConnRoleType) (*PeerConn, error)
- func (c *Client) GetPrivateIpAddressesInfo(args *GetVpcPrivateIpArgs) (*VpcPrivateIpAddressesResult, error)
- func (c *Client) GetRouteTableDetail(routeTableId, vpcId string) (*GetRouteTableResult, error)
- func (c *Client) GetSubnetDetail(subnetId string) (*GetSubnetDetailResult, error)
- func (c *Client) GetVPCDetail(vpcId string) (*GetVPCDetailResult, error)
- func (c *Client) ListAclEntrys(vpcId string) (*ListAclEntrysResult, error)
- func (c *Client) ListAclRules(args *ListAclRulesArgs) (*ListAclRulesResult, error)
- func (c *Client) ListNatGateway(args *ListNatGatewayArgs) (*ListNatGatewayResult, error)
- func (c *Client) ListNatGatewayDnatRules(natId string, args *ListNatGatewaDnatRuleArgs) (*ListNatGatewayDnatRulesResult, error)
- func (c *Client) ListNatGatewaySnatRules(args *ListNatGatewaySnatRuleArgs) (*ListNatGatewaySnatRulesResult, error)
- func (c *Client) ListPeerConn(args *ListPeerConnsArgs) (*ListPeerConnsResult, error)
- func (c *Client) ListSubnets(args *ListSubnetArgs) (*ListSubnetResult, error)
- func (c *Client) ListVPC(args *ListVPCArgs) (*ListVPCResult, error)
- func (c *Client) OpenPeerConnSyncDNS(peerConnId string, args *PeerConnSyncDNSArgs) error
- func (c *Client) RejectPeerConnApply(peerConnId, clientToken string) error
- func (c *Client) RenewNatGateway(natId string, args *RenewNatGatewayArgs) error
- func (c *Client) RenewPeerConn(peerConnId string, args *RenewPeerConnArgs) error
- func (c *Client) ResizeNatGateway(natId string, args *ResizeNatGatewayArgs) error
- func (c *Client) ResizePeerConn(peerConnId string, args *ResizePeerConnArgs) error
- func (c *Client) UnBindDnatEips(natId string, args *UnBindDnatEipsArgs) error
- func (c *Client) UnBindEips(natId string, args *UnBindEipsArgs) error
- func (c *Client) UpdateAclRule(aclRuleId string, args *UpdateAclRuleArgs) error
- func (c *Client) UpdateNatGateway(natId string, args *UpdateNatGatewayArgs) error
- func (c *Client) UpdateNatGatewayDnatRule(natId string, dnatRuleId string, args *UpdateNatGatewayDnatRuleArgs) error
- func (c *Client) UpdateNatGatewaySnatRule(natId string, snatRuleId string, args *UpdateNatGatewaySnatRuleArgs) error
- func (c *Client) UpdatePeerConn(peerConnId string, args *UpdatePeerConnArgs) error
- func (c *Client) UpdateSubnet(subnetId string, args *UpdateSubnetArgs) error
- func (c *Client) UpdateVPC(vpcId string, updateVPCArgs *UpdateVPCArgs) error
- type CreateAclRuleArgs
- type CreateNatGatewayArgs
- type CreateNatGatewayDnatRuleArgs
- type CreateNatGatewayDnatRuleResult
- type CreateNatGatewayResult
- type CreateNatGatewaySnatRuleArgs
- type CreateNatGatewaySnatRuleResult
- type CreatePeerConnArgs
- type CreatePeerConnResult
- type CreateRouteRuleArgs
- type CreateRouteRuleResult
- type CreateSubnetArgs
- type CreateSubnetResult
- type CreateVPCArgs
- type CreateVPCResult
- type DnatRule
- type DnatRuleArgs
- type DnsStatusType
- type GetNetworkTopologyArgs
- type GetRouteTableResult
- type GetSubnetDetailResult
- type GetVPCDetailResult
- type GetVpcPrivateIpArgs
- type ListAclEntrysResult
- type ListAclRulesArgs
- type ListAclRulesResult
- type ListNatGatewaDnatRuleArgs
- type ListNatGatewayArgs
- type ListNatGatewayDnatRulesResult
- type ListNatGatewayResult
- type ListNatGatewaySnatRuleArgs
- type ListNatGatewaySnatRulesResult
- type ListPeerConnsArgs
- type ListPeerConnsResult
- type ListSubnetArgs
- type ListSubnetResult
- type ListVPCArgs
- type ListVPCResult
- type NAT
- type NatGatewaySpecType
- type NatStatusType
- type NetworkTopology
- type NetworkTopologyResult
- type NexthopType
- type PaymentTimingType
- type PeerConn
- type PeerConnRoleType
- type PeerConnStatusType
- type PeerConnSyncDNSArgs
- type RenewNatGatewayArgs
- type RenewPeerConnArgs
- type Reservation
- type ResizeNatGatewayArgs
- type ResizePeerConnArgs
- type RouteRule
- type ShowVPCModel
- type SnatRule
- type SnatRuleArgs
- type Subnet
- type SubnetType
- type UnBindDnatEipsArgs
- type UnBindEipsArgs
- type UpdateAclRuleArgs
- type UpdateNatGatewayArgs
- type UpdateNatGatewayDnatRuleArgs
- type UpdateNatGatewaySnatRuleArgs
- type UpdatePeerConnArgs
- type UpdateSubnetArgs
- type UpdateVPCArgs
- type VPC
- type VpcPrivateIpAddress
- type VpcPrivateIpAddressesResult
Constants ¶
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" REQUEST_NETWORK_TOPOLOGY_URL = "/topology" )
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 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 BatchCreateNatGatewayDnatRuleArgs ¶ added in v0.9.118
type BatchCreateNatGatewayDnatRuleArgs struct { ClientToken string `json:"-"` Rules []DnatRuleArgs `json:"rules"` }
type BatchCreateNatGatewayDnatRuleResult ¶ added in v0.9.118
type BatchCreateNatGatewayDnatRuleResult struct {
RuleIds []string `json:"ruleIds"`
}
type BatchCreateNatGatewaySnatRuleArgs ¶ added in v0.9.118
type BatchCreateNatGatewaySnatRuleArgs struct { ClientToken string `json:"-"` NatId string `json:"natId"` SnatRules []SnatRuleArgs `json:"snatRules"` }
type BatchCreateNatGatewaySnatRuleResult ¶ added in v0.9.118
type BatchCreateNatGatewaySnatRuleResult struct {
SnatRuleIds []string `json:"snatRuleIds"`
}
type Billing ¶
type Billing struct { PaymentTiming PaymentTimingType `json:"paymentTiming,omitempty"` Reservation *Reservation `json:"reservation,omitempty"` }
type BindDnatEipsArgs ¶ added in v0.9.134
BindDnatEipsArgs defines the structure of the input parameters for the BindDnatEips api
type BindEipsArgs ¶
BindEipsArgs defines the structure of the input parameters for the BindEips api
type Client ¶
Client of VPC service is a kind of BceClient, so derived from BceClient
func (*Client) AcceptPeerConnApply ¶
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) BatchCreateNatGatewayDnatRule ¶ added in v0.9.118
func (c *Client) BatchCreateNatGatewayDnatRule(natId string, args *BatchCreateNatGatewayDnatRuleArgs) (*BatchCreateNatGatewayDnatRuleResult, error)
func (*Client) BatchCreateNatGatewaySnatRule ¶ added in v0.9.118
func (c *Client) BatchCreateNatGatewaySnatRule(args *BatchCreateNatGatewaySnatRuleArgs) (*BatchCreateNatGatewaySnatRuleResult, error)
func (*Client) BindDnatEips ¶ added in v0.9.134
func (c *Client) BindDnatEips(natId string, args *BindDnatEipsArgs) error
BindDnatEips - bind dnatEips for the specific nat gateway
PARAMS:
- natId: the id of the specific nat gateway
- args: the arguments to bind dnatEips
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) CreateNatGatewayDnatRule ¶ added in v0.9.118
func (c *Client) CreateNatGatewayDnatRule(natId string, args *CreateNatGatewayDnatRuleArgs) (*CreateNatGatewayDnatRuleResult, error)
func (*Client) CreateNatGatewaySnatRule ¶ added in v0.9.118
func (c *Client) CreateNatGatewaySnatRule(natId string, args *CreateNatGatewaySnatRuleArgs) (*CreateNatGatewaySnatRuleResult, 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 ¶
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 ¶
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) DeleteNatGatewayDnatRule ¶ added in v0.9.118
func (*Client) DeleteNatGatewaySnatRule ¶ added in v0.9.118
func (*Client) DeletePeerConn ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) GetNetworkTopologyInfo ¶ added in v0.9.89
func (c *Client) GetNetworkTopologyInfo(args *GetNetworkTopologyArgs) (*NetworkTopologyResult, error)
GetNetworkTopologyInfo - get the network topology info
PARAMS:
- getNetworkTopologyArgs: the arguments to GetNetworkTopologyInfo
RETURNS:
- *NetworkTopologyResult: the network topologies info obtained based on host ip or host id
- 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) GetPrivateIpAddressesInfo ¶ added in v0.9.36
func (c *Client) GetPrivateIpAddressesInfo(args *GetVpcPrivateIpArgs) (*VpcPrivateIpAddressesResult, error)
GetPrivateIpAddressesInfo - get the privateIpAddressesInfo from vpc
PARAMS:
- getVpcPrivateIpArgs: the arguments to GetPrivateIpAddressInfo
RETURNS:
- *VpcPrivateIpAddressesResult: the privateIpAddresses info of the specified privateIps in specified vpc
- 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) ListNatGatewayDnatRules ¶ added in v0.9.118
func (c *Client) ListNatGatewayDnatRules(natId string, args *ListNatGatewaDnatRuleArgs) (*ListNatGatewayDnatRulesResult, error)
func (*Client) ListNatGatewaySnatRules ¶ added in v0.9.118
func (c *Client) ListNatGatewaySnatRules(args *ListNatGatewaySnatRuleArgs) (*ListNatGatewaySnatRulesResult, 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 ¶
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) ResizeNatGateway ¶ added in v0.9.138
func (c *Client) ResizeNatGateway(natId string, args *ResizeNatGatewayArgs) 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) UnBindDnatEips ¶ added in v0.9.134
func (c *Client) UnBindDnatEips(natId string, args *UnBindDnatEipsArgs) error
UnBindDnatEips - unbind dnatEips for the specific nat gateway
PARAMS:
- natId: the id of the specific nat gateway
- args: the arguments to unbind dnatEips
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) UpdateNatGatewayDnatRule ¶ added in v0.9.118
func (c *Client) UpdateNatGatewayDnatRule(natId string, dnatRuleId string, args *UpdateNatGatewayDnatRuleArgs) error
func (*Client) UpdateNatGatewaySnatRule ¶ added in v0.9.118
func (c *Client) UpdateNatGatewaySnatRule(natId string, snatRuleId string, args *UpdateNatGatewaySnatRuleArgs) 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
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"` CuNum string `json:"cuNum,omitempty"` Eips []string `json:"eips,omitempty"` Billing *Billing `json:"billing"` Tags []model.TagModel `json:"tags,omitempty"` }
CreateNatGatewayArgs defines the structure of the input parameters for the CreateNatGateway api
type CreateNatGatewayDnatRuleArgs ¶ added in v0.9.118
type CreateNatGatewayDnatRuleArgs struct { ClientToken string `json:"-"` RuleName string `json:"ruleName,omitempty"` PublicIpAddress string `json:"publicIpAddress,omitempty"` PrivateIpAddress string `json:"privateIpAddress,omitempty"` Protocol string `json:"protocol,omitempty"` PublicPort string `json:"publicPort,omitempty"` PrivatePort string `json:"privatePort,omitempty"` }
type CreateNatGatewayDnatRuleResult ¶ added in v0.9.118
type CreateNatGatewayDnatRuleResult struct {
RuleId string `json:"ruleId"`
}
type CreateNatGatewayResult ¶
type CreateNatGatewayResult struct {
NatId string `json:"natId"`
}
CreateNatGatewayResult defines the structure of the output parameters for the CreateNatGateway api
type CreateNatGatewaySnatRuleArgs ¶ added in v0.9.118
type CreateNatGatewaySnatRuleResult ¶ added in v0.9.118
type CreateNatGatewaySnatRuleResult struct {
RuleId string `json:"ruleId"`
}
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"` Tags []model.TagModel `json:"tags,omitempty"` }
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"` VpcSecondaryCidr string `json:"vpcSecondaryCidr,omitempty"` 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 DnatRule ¶ added in v0.9.118
type DnatRule struct { RuleId string `json:"ruleId"` RuleName string `json:"ruleName"` PublicIpAddress string `json:"publicIpAddress"` PrivateIpAddress string `json:"privateIpAddress"` Protocol string `json:"protocol"` PublicPort int `json:"publicPort"` PrivatePort int `json:"privatePort"` Status string `json:"status"` }
type DnatRuleArgs ¶ added in v0.9.118
type DnatRuleArgs struct { RuleName string `json:"ruleName,omitempty"` PublicIpAddress string `json:"publicIpAddress,omitempty"` PrivateIpAddress string `json:"privateIpAddress,omitempty"` Protocol string `json:"protocol,omitempty"` PublicPort string `json:"publicPort,omitempty"` PrivatePort string `json:"privatePort,omitempty"` }
type DnsStatusType ¶
type DnsStatusType string
type GetNetworkTopologyArgs ¶ added in v0.9.89
type GetNetworkTopologyArgs struct { HostIp string `json:"hostIp,omitempty"` HostId string `json:"hostId,omitempty"` }
Get NetworkTopologyInfo args
HostIp:the host ip of the network topology to be queried HostId:the host id of the network topology to be queried If both HostIp and HostId are passed in, the HostIp will effect (only need to pass in one of the two)
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 GetVpcPrivateIpArgs ¶ added in v0.9.36
type GetVpcPrivateIpArgs struct { VpcId string `json:"vpcId"` PrivateIpAddresses []string `json:"privateIpAddresses",omitempty` PrivateIpRange string `json:"privateIpRange,omitempty"` }
Get VpcPrivateIpAddressedInfo args
VpcId:the vpc you want to query ips PrivateIpAddresses:the privateIp list you want to query PrivateIpRange:the range of privateIp .ex:"192.168.0.1-192.168.0.5" pay attention that the size of PrivateIpAddresses and PrivateIpRange must less than 100 if both PrivateIpAddresses and PrivateIpRange ,the PrivateIpRange will effect
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 ListNatGatewaDnatRuleArgs ¶ added in v0.9.118
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 ListNatGatewayDnatRulesResult ¶ added in v0.9.118
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 ListNatGatewaySnatRuleArgs ¶ added in v0.9.118
type ListNatGatewaySnatRulesResult ¶ added in v0.9.118
type ListPeerConnsArgs ¶
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,omitempty"` CuNum int `json:"cuNum,omitempty"` Status NatStatusType `json:"status"` Eips []string `json:"eips"` PaymentTiming string `json:"paymentTiming"` ExpiredTime string `json:"expiredTime"` Tags []model.TagModel `json:"tags"` }
NAT is the result for getNatGatewayDetail api.
type NatGatewaySpecType ¶
type NatGatewaySpecType string
type NatStatusType ¶
type NatStatusType string
type NetworkTopology ¶ added in v0.9.89
type NetworkTopologyResult ¶ added in v0.9.89
type NetworkTopologyResult struct {
NetworkTopologies []NetworkTopology `json:"networkTopologies"`
}
NetworkTopologyResult defines the structure of the output parameters for the GetNetworkTopologyInfo api
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"` Tags []model.TagModel `json:"tags"` }
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 ¶
RenewNatGatewayArgs defines the structure of the input parameters for the RenewNatGateway api
type RenewPeerConnArgs ¶
RenewPeerConnArgs defines the structure of the input parameters for the RenewPeerConn api
type Reservation ¶
type ResizeNatGatewayArgs ¶ added in v0.9.138
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 SnatRuleArgs ¶ added in v0.9.118
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"` CreatedTime string `json:"createdTime"` AvailableIp int `json:"availableIp"` Tags []model.TagModel `json:"tags"` }
type SubnetType ¶
type SubnetType string
type UnBindDnatEipsArgs ¶ added in v0.9.134
type UnBindDnatEipsArgs struct { ClientToken string `json:"-"` DnatEips []string `json:"dnatEips"` }
UnBindDnatEipsArgs defines the structure of the input parameters for the UnBindDnatEips api
type UnBindEipsArgs ¶
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 ¶
UpdateNatGatewayArgs defines the structure of the input parameters for the UpdateNatGateway api
type UpdateNatGatewayDnatRuleArgs ¶ added in v0.9.118
type UpdateNatGatewayDnatRuleArgs struct { ClientToken string `json:"-"` RuleName string `json:"ruleName,omitempty"` PublicIpAddress string `json:"publicIpAddress,omitempty"` PrivateIpAddress string `json:"privateIpAddress,omitempty"` Protocol string `json:"protocol,omitempty"` PublicPort string `json:"publicPort,omitempty"` PrivatePort string `json:"privatePort,omitempty"` }
type UpdateNatGatewaySnatRuleArgs ¶ added in v0.9.118
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 VpcPrivateIpAddress ¶ added in v0.9.36
type VpcPrivateIpAddressesResult ¶ added in v0.9.36
type VpcPrivateIpAddressesResult struct {
VpcPrivateIpAddresses []VpcPrivateIpAddress `json:"vpcPrivateIpAddresses"`
}
VpcPrivateIpAddressesResult defines the structure of the output parameters for the GetPrivateIpAddressInfo api