Documentation ¶
Overview ¶
Package vpcgw provides methods and message types of the vpcgw v1 API.
Index ¶
- Constants
- type API
- func (s *API) CreateDHCP(req *CreateDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
- func (s *API) CreateDHCPEntry(req *CreateDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
- func (s *API) CreateGateway(req *CreateGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
- func (s *API) CreateGatewayNetwork(req *CreateGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
- func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*IP, error)
- func (s *API) CreatePATRule(req *CreatePATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
- func (s *API) DeleteDHCP(req *DeleteDHCPRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteDHCPEntry(req *DeleteDHCPEntryRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteGateway(req *DeleteGatewayRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteGatewayNetwork(req *DeleteGatewayNetworkRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error
- func (s *API) DeletePATRule(req *DeletePATRuleRequest, opts ...scw.RequestOption) error
- func (s *API) GetDHCP(req *GetDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
- func (s *API) GetDHCPEntry(req *GetDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
- func (s *API) GetGateway(req *GetGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
- func (s *API) GetGatewayNetwork(req *GetGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
- func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*IP, error)
- func (s *API) GetPATRule(req *GetPATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
- func (s *API) ListDHCPEntries(req *ListDHCPEntriesRequest, opts ...scw.RequestOption) (*ListDHCPEntriesResponse, error)
- func (s *API) ListDHCPs(req *ListDHCPsRequest, opts ...scw.RequestOption) (*ListDHCPsResponse, error)
- func (s *API) ListGatewayNetworks(req *ListGatewayNetworksRequest, opts ...scw.RequestOption) (*ListGatewayNetworksResponse, error)
- func (s *API) ListGatewayTypes(req *ListGatewayTypesRequest, opts ...scw.RequestOption) (*ListGatewayTypesResponse, error)
- func (s *API) ListGateways(req *ListGatewaysRequest, opts ...scw.RequestOption) (*ListGatewaysResponse, error)
- func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)
- func (s *API) ListPATRules(req *ListPATRulesRequest, opts ...scw.RequestOption) (*ListPATRulesResponse, error)
- func (s *API) RefreshSSHKeys(req *RefreshSSHKeysRequest, opts ...scw.RequestOption) (*Gateway, error)
- func (s *API) SetDHCPEntries(req *SetDHCPEntriesRequest, opts ...scw.RequestOption) (*SetDHCPEntriesResponse, error)
- func (s *API) SetPATRules(req *SetPATRulesRequest, opts ...scw.RequestOption) (*SetPATRulesResponse, error)
- func (s *API) UpdateDHCP(req *UpdateDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
- func (s *API) UpdateDHCPEntry(req *UpdateDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
- func (s *API) UpdateGateway(req *UpdateGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
- func (s *API) UpdateGatewayNetwork(req *UpdateGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
- func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, error)
- func (s *API) UpdatePATRule(req *UpdatePATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
- func (s *API) UpgradeGateway(req *UpgradeGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
- func (s *API) WaitForDHCPEntries(req *WaitForDHCPEntriesRequest, opts ...scw.RequestOption) (*ListDHCPEntriesResponse, error)
- func (s *API) WaitForGateway(req *WaitForGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
- func (s *API) WaitForGatewayNetwork(req *WaitForGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
- func (s *API) Zones() []scw.Zone
- type CreateDHCPEntryRequest
- type CreateDHCPRequest
- type CreateGatewayNetworkRequest
- type CreateGatewayRequest
- type CreateIPRequest
- type CreatePATRuleRequest
- type DHCP
- type DHCPEntry
- type DHCPEntryType
- type DeleteDHCPEntryRequest
- type DeleteDHCPRequest
- type DeleteGatewayNetworkRequest
- type DeleteGatewayRequest
- type DeleteIPRequest
- type DeletePATRuleRequest
- type Gateway
- type GatewayNetwork
- type GatewayNetworkStatus
- type GatewayStatus
- type GatewayType
- type GetDHCPEntryRequest
- type GetDHCPRequest
- type GetGatewayNetworkRequest
- type GetGatewayRequest
- type GetIPRequest
- type GetPATRuleRequest
- type IP
- type ListDHCPEntriesRequest
- type ListDHCPEntriesRequestOrderBy
- type ListDHCPEntriesResponse
- type ListDHCPsRequest
- type ListDHCPsRequestOrderBy
- type ListDHCPsResponse
- type ListGatewayNetworksRequest
- type ListGatewayNetworksRequestOrderBy
- type ListGatewayNetworksResponse
- type ListGatewayTypesRequest
- type ListGatewayTypesResponse
- type ListGatewaysRequest
- type ListGatewaysRequestOrderBy
- type ListGatewaysResponse
- type ListIPsRequest
- type ListIPsRequestOrderBy
- type ListIPsResponse
- type ListPATRulesRequest
- type ListPATRulesRequestOrderBy
- type ListPATRulesResponse
- type PATRule
- type PATRuleProtocol
- type RefreshSSHKeysRequest
- type SetDHCPEntriesRequest
- type SetDHCPEntriesRequestEntry
- type SetDHCPEntriesResponse
- type SetPATRulesRequest
- type SetPATRulesRequestRule
- type SetPATRulesResponse
- type UpdateDHCPEntryRequest
- type UpdateDHCPRequest
- type UpdateGatewayNetworkRequest
- type UpdateGatewayRequest
- type UpdateIPRequest
- type UpdatePATRuleRequest
- type UpgradeGatewayRequest
- type WaitForDHCPEntriesRequest
- type WaitForGatewayNetworkRequest
- type WaitForGatewayRequest
Constants ¶
const ( // DHCPEntryTypeUnknown is [insert doc]. DHCPEntryTypeUnknown = DHCPEntryType("unknown") // DHCPEntryTypeReservation is [insert doc]. DHCPEntryTypeReservation = DHCPEntryType("reservation") // DHCPEntryTypeLease is [insert doc]. DHCPEntryTypeLease = DHCPEntryType("lease") )
const ( // GatewayNetworkStatusUnknown is [insert doc]. GatewayNetworkStatusUnknown = GatewayNetworkStatus("unknown") // GatewayNetworkStatusCreated is [insert doc]. GatewayNetworkStatusCreated = GatewayNetworkStatus("created") // GatewayNetworkStatusAttaching is [insert doc]. GatewayNetworkStatusAttaching = GatewayNetworkStatus("attaching") // GatewayNetworkStatusConfiguring is [insert doc]. GatewayNetworkStatusConfiguring = GatewayNetworkStatus("configuring") // GatewayNetworkStatusReady is [insert doc]. GatewayNetworkStatusReady = GatewayNetworkStatus("ready") // GatewayNetworkStatusDetaching is [insert doc]. GatewayNetworkStatusDetaching = GatewayNetworkStatus("detaching") // GatewayNetworkStatusDeleted is [insert doc]. GatewayNetworkStatusDeleted = GatewayNetworkStatus("deleted") )
const ( // GatewayStatusUnknown is [insert doc]. GatewayStatusUnknown = GatewayStatus("unknown") // GatewayStatusStopped is [insert doc]. GatewayStatusStopped = GatewayStatus("stopped") // GatewayStatusAllocating is [insert doc]. GatewayStatusAllocating = GatewayStatus("allocating") // GatewayStatusConfiguring is [insert doc]. GatewayStatusConfiguring = GatewayStatus("configuring") // GatewayStatusRunning is [insert doc]. GatewayStatusRunning = GatewayStatus("running") // GatewayStatusStopping is [insert doc]. GatewayStatusStopping = GatewayStatus("stopping") // GatewayStatusFailed is [insert doc]. GatewayStatusFailed = GatewayStatus("failed") // GatewayStatusDeleting is [insert doc]. GatewayStatusDeleting = GatewayStatus("deleting") // GatewayStatusDeleted is [insert doc]. GatewayStatusDeleted = GatewayStatus("deleted") // GatewayStatusLocked is [insert doc]. GatewayStatusLocked = GatewayStatus("locked") )
const ( // ListDHCPEntriesRequestOrderByCreatedAtAsc is [insert doc]. ListDHCPEntriesRequestOrderByCreatedAtAsc = ListDHCPEntriesRequestOrderBy("created_at_asc") // ListDHCPEntriesRequestOrderByCreatedAtDesc is [insert doc]. ListDHCPEntriesRequestOrderByCreatedAtDesc = ListDHCPEntriesRequestOrderBy("created_at_desc") // ListDHCPEntriesRequestOrderByIPAddressAsc is [insert doc]. ListDHCPEntriesRequestOrderByIPAddressAsc = ListDHCPEntriesRequestOrderBy("ip_address_asc") // ListDHCPEntriesRequestOrderByIPAddressDesc is [insert doc]. ListDHCPEntriesRequestOrderByIPAddressDesc = ListDHCPEntriesRequestOrderBy("ip_address_desc") // ListDHCPEntriesRequestOrderByHostnameAsc is [insert doc]. ListDHCPEntriesRequestOrderByHostnameAsc = ListDHCPEntriesRequestOrderBy("hostname_asc") // ListDHCPEntriesRequestOrderByHostnameDesc is [insert doc]. ListDHCPEntriesRequestOrderByHostnameDesc = ListDHCPEntriesRequestOrderBy("hostname_desc") )
const ( // ListDHCPsRequestOrderByCreatedAtAsc is [insert doc]. ListDHCPsRequestOrderByCreatedAtAsc = ListDHCPsRequestOrderBy("created_at_asc") // ListDHCPsRequestOrderByCreatedAtDesc is [insert doc]. ListDHCPsRequestOrderByCreatedAtDesc = ListDHCPsRequestOrderBy("created_at_desc") // ListDHCPsRequestOrderBySubnetAsc is [insert doc]. ListDHCPsRequestOrderBySubnetAsc = ListDHCPsRequestOrderBy("subnet_asc") // ListDHCPsRequestOrderBySubnetDesc is [insert doc]. ListDHCPsRequestOrderBySubnetDesc = ListDHCPsRequestOrderBy("subnet_desc") )
const ( // ListGatewayNetworksRequestOrderByCreatedAtAsc is [insert doc]. ListGatewayNetworksRequestOrderByCreatedAtAsc = ListGatewayNetworksRequestOrderBy("created_at_asc") // ListGatewayNetworksRequestOrderByCreatedAtDesc is [insert doc]. ListGatewayNetworksRequestOrderByCreatedAtDesc = ListGatewayNetworksRequestOrderBy("created_at_desc") // ListGatewayNetworksRequestOrderByStatusAsc is [insert doc]. ListGatewayNetworksRequestOrderByStatusAsc = ListGatewayNetworksRequestOrderBy("status_asc") // ListGatewayNetworksRequestOrderByStatusDesc is [insert doc]. ListGatewayNetworksRequestOrderByStatusDesc = ListGatewayNetworksRequestOrderBy("status_desc") )
const ( // ListGatewaysRequestOrderByCreatedAtAsc is [insert doc]. ListGatewaysRequestOrderByCreatedAtAsc = ListGatewaysRequestOrderBy("created_at_asc") // ListGatewaysRequestOrderByCreatedAtDesc is [insert doc]. ListGatewaysRequestOrderByCreatedAtDesc = ListGatewaysRequestOrderBy("created_at_desc") // ListGatewaysRequestOrderByNameAsc is [insert doc]. ListGatewaysRequestOrderByNameAsc = ListGatewaysRequestOrderBy("name_asc") // ListGatewaysRequestOrderByNameDesc is [insert doc]. ListGatewaysRequestOrderByNameDesc = ListGatewaysRequestOrderBy("name_desc") // ListGatewaysRequestOrderByTypeAsc is [insert doc]. ListGatewaysRequestOrderByTypeAsc = ListGatewaysRequestOrderBy("type_asc") // ListGatewaysRequestOrderByTypeDesc is [insert doc]. ListGatewaysRequestOrderByTypeDesc = ListGatewaysRequestOrderBy("type_desc") // ListGatewaysRequestOrderByStatusAsc is [insert doc]. ListGatewaysRequestOrderByStatusAsc = ListGatewaysRequestOrderBy("status_asc") // ListGatewaysRequestOrderByStatusDesc is [insert doc]. ListGatewaysRequestOrderByStatusDesc = ListGatewaysRequestOrderBy("status_desc") )
const ( // ListIPsRequestOrderByCreatedAtAsc is [insert doc]. ListIPsRequestOrderByCreatedAtAsc = ListIPsRequestOrderBy("created_at_asc") // ListIPsRequestOrderByCreatedAtDesc is [insert doc]. ListIPsRequestOrderByCreatedAtDesc = ListIPsRequestOrderBy("created_at_desc") // ListIPsRequestOrderByIPAsc is [insert doc]. ListIPsRequestOrderByIPAsc = ListIPsRequestOrderBy("ip_asc") // ListIPsRequestOrderByIPDesc is [insert doc]. ListIPsRequestOrderByIPDesc = ListIPsRequestOrderBy("ip_desc") // ListIPsRequestOrderByReverseAsc is [insert doc]. ListIPsRequestOrderByReverseAsc = ListIPsRequestOrderBy("reverse_asc") // ListIPsRequestOrderByReverseDesc is [insert doc]. ListIPsRequestOrderByReverseDesc = ListIPsRequestOrderBy("reverse_desc") )
const ( // ListPATRulesRequestOrderByCreatedAtAsc is [insert doc]. ListPATRulesRequestOrderByCreatedAtAsc = ListPATRulesRequestOrderBy("created_at_asc") // ListPATRulesRequestOrderByCreatedAtDesc is [insert doc]. ListPATRulesRequestOrderByCreatedAtDesc = ListPATRulesRequestOrderBy("created_at_desc") // ListPATRulesRequestOrderByPublicPortAsc is [insert doc]. ListPATRulesRequestOrderByPublicPortAsc = ListPATRulesRequestOrderBy("public_port_asc") // ListPATRulesRequestOrderByPublicPortDesc is [insert doc]. ListPATRulesRequestOrderByPublicPortDesc = ListPATRulesRequestOrderBy("public_port_desc") )
const ( // PATRuleProtocolUnknown is [insert doc]. PATRuleProtocolUnknown = PATRuleProtocol("unknown") // PATRuleProtocolBoth is [insert doc]. PATRuleProtocolBoth = PATRuleProtocol("both") // PATRuleProtocolTCP is [insert doc]. PATRuleProtocolTCP = PATRuleProtocol("tcp") // PATRuleProtocolUDP is [insert doc]. PATRuleProtocolUDP = PATRuleProtocol("udp") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: vPC Public Gateway API
func (*API) CreateDHCP ¶
func (s *API) CreateDHCP(req *CreateDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
CreateDHCP: create a DHCP configuration
func (*API) CreateDHCPEntry ¶
func (s *API) CreateDHCPEntry(req *CreateDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
CreateDHCPEntry: create a static DHCP reservation
func (*API) CreateGateway ¶
func (s *API) CreateGateway(req *CreateGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
CreateGateway: create a VPC Public Gateway
func (*API) CreateGatewayNetwork ¶
func (s *API) CreateGatewayNetwork(req *CreateGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
CreateGatewayNetwork: attach a gateway to a Private Network
func (*API) CreateIP ¶
func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*IP, error)
CreateIP: reserve an IP
func (*API) CreatePATRule ¶
func (s *API) CreatePATRule(req *CreatePATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
CreatePATRule: create a PAT rule
func (*API) DeleteDHCP ¶
func (s *API) DeleteDHCP(req *DeleteDHCPRequest, opts ...scw.RequestOption) error
DeleteDHCP: delete a DHCP configuration
func (*API) DeleteDHCPEntry ¶
func (s *API) DeleteDHCPEntry(req *DeleteDHCPEntryRequest, opts ...scw.RequestOption) error
DeleteDHCPEntry: delete a DHCP reservation
func (*API) DeleteGateway ¶
func (s *API) DeleteGateway(req *DeleteGatewayRequest, opts ...scw.RequestOption) error
DeleteGateway: delete a VPC Public Gateway
func (*API) DeleteGatewayNetwork ¶
func (s *API) DeleteGatewayNetwork(req *DeleteGatewayNetworkRequest, opts ...scw.RequestOption) error
DeleteGatewayNetwork: detach a gateway from a Private Network
func (*API) DeleteIP ¶
func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error
DeleteIP: delete an IP
func (*API) DeletePATRule ¶
func (s *API) DeletePATRule(req *DeletePATRuleRequest, opts ...scw.RequestOption) error
DeletePATRule: delete a PAT rule
func (*API) GetDHCP ¶
func (s *API) GetDHCP(req *GetDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
GetDHCP: get a DHCP configuration
func (*API) GetDHCPEntry ¶
func (s *API) GetDHCPEntry(req *GetDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
GetDHCPEntry: get DHCP entries
func (*API) GetGateway ¶
func (s *API) GetGateway(req *GetGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
GetGateway: get a VPC Public Gateway
func (*API) GetGatewayNetwork ¶
func (s *API) GetGatewayNetwork(req *GetGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
GetGatewayNetwork: get a gateway connection to a Private Network
func (*API) GetIP ¶
func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*IP, error)
GetIP: get an IP
func (*API) GetPATRule ¶
func (s *API) GetPATRule(req *GetPATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
GetPATRule: get a PAT rule
func (*API) ListDHCPEntries ¶
func (s *API) ListDHCPEntries(req *ListDHCPEntriesRequest, opts ...scw.RequestOption) (*ListDHCPEntriesResponse, error)
ListDHCPEntries: list DHCP entries
func (*API) ListDHCPs ¶
func (s *API) ListDHCPs(req *ListDHCPsRequest, opts ...scw.RequestOption) (*ListDHCPsResponse, error)
ListDHCPs: list DHCP configurations
func (*API) ListGatewayNetworks ¶
func (s *API) ListGatewayNetworks(req *ListGatewayNetworksRequest, opts ...scw.RequestOption) (*ListGatewayNetworksResponse, error)
ListGatewayNetworks: list gateway connections to Private Networks
func (*API) ListGatewayTypes ¶
func (s *API) ListGatewayTypes(req *ListGatewayTypesRequest, opts ...scw.RequestOption) (*ListGatewayTypesResponse, error)
ListGatewayTypes: list VPC Public Gateway types
func (*API) ListGateways ¶
func (s *API) ListGateways(req *ListGatewaysRequest, opts ...scw.RequestOption) (*ListGatewaysResponse, error)
ListGateways: list VPC Public Gateways
func (*API) ListIPs ¶
func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)
ListIPs: list IPs
func (*API) ListPATRules ¶
func (s *API) ListPATRules(req *ListPATRulesRequest, opts ...scw.RequestOption) (*ListPATRulesResponse, error)
ListPATRules: list PAT rules
func (*API) RefreshSSHKeys ¶
func (s *API) RefreshSSHKeys(req *RefreshSSHKeysRequest, opts ...scw.RequestOption) (*Gateway, error)
func (*API) SetDHCPEntries ¶
func (s *API) SetDHCPEntries(req *SetDHCPEntriesRequest, opts ...scw.RequestOption) (*SetDHCPEntriesResponse, error)
SetDHCPEntries: set all DHCP reservations on a Gateway Network
Set the list of DHCP reservations attached to a Gateway Network. Reservations are identified by their MAC address, and will sync the current DHCP entry list to the given list, creating, updating or deleting DHCP entries.
func (*API) SetPATRules ¶
func (s *API) SetPATRules(req *SetPATRulesRequest, opts ...scw.RequestOption) (*SetPATRulesResponse, error)
SetPATRules: set all PAT rules on a Gateway
Set the list of PAT rules attached to a Gateway. Rules are identified by their public port and protocol. This will sync the current PAT rule list with the givent list, creating, updating or deleting PAT rules.
func (*API) UpdateDHCP ¶
func (s *API) UpdateDHCP(req *UpdateDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
UpdateDHCP: update a DHCP configuration
func (*API) UpdateDHCPEntry ¶
func (s *API) UpdateDHCPEntry(req *UpdateDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
UpdateDHCPEntry: update a DHCP entry
func (*API) UpdateGateway ¶
func (s *API) UpdateGateway(req *UpdateGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
UpdateGateway: update a VPC Public Gateway
func (*API) UpdateGatewayNetwork ¶
func (s *API) UpdateGatewayNetwork(req *UpdateGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
UpdateGatewayNetwork: update a gateway connection to a Private Network
func (*API) UpdateIP ¶
func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, error)
UpdateIP: update an IP
func (*API) UpdatePATRule ¶
func (s *API) UpdatePATRule(req *UpdatePATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
UpdatePATRule: update a PAT rule
func (*API) UpgradeGateway ¶
func (s *API) UpgradeGateway(req *UpgradeGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
UpgradeGateway: upgrade a VPC Public Gateway to the latest version
func (*API) WaitForDHCPEntries ¶
func (s *API) WaitForDHCPEntries(req *WaitForDHCPEntriesRequest, opts ...scw.RequestOption) (*ListDHCPEntriesResponse, error)
WaitForDHCPEntries waits for at least one dhcp entry with the correct mac address. This function can be used to wait for an instance to use dhcp
func (*API) WaitForGateway ¶
func (s *API) WaitForGateway(req *WaitForGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
WaitForGateway waits for the gateway to be in a "terminal state" before returning. This function can be used to wait for a gateway to be ready for example.
func (*API) WaitForGatewayNetwork ¶
func (s *API) WaitForGatewayNetwork(req *WaitForGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
WaitForGatewayNetwork waits for the gateway network to be in a "terminal state" before returning. This function can be used to wait for a gateway network to be ready for example.
type CreateDHCPEntryRequest ¶
type CreateDHCPEntryRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: gatewayNetwork on which to create a DHCP reservation GatewayNetworkID string `json:"gateway_network_id"` // MacAddress: mAC address to give a static entry to MacAddress string `json:"mac_address"` // IPAddress: IP address to give to the machine IPAddress net.IP `json:"ip_address"` }
type CreateDHCPRequest ¶
type CreateDHCPRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ProjectID: project to create the DHCP configuration in ProjectID string `json:"project_id"` // Subnet: subnet for the DHCP server Subnet scw.IPNet `json:"subnet"` // Address: address of the DHCP server. This will be the gateway's address in the private network. Defaults to the first address of the subnet Address *net.IP `json:"address"` // PoolLow: low IP (included) of the dynamic address pool // // Low IP (included) of the dynamic address pool. Defaults to the second address of the subnet. PoolLow *net.IP `json:"pool_low"` // PoolHigh: high IP (included) of the dynamic address pool // // High IP (included) of the dynamic address pool. Defaults to the last address of the subnet. PoolHigh *net.IP `json:"pool_high"` // EnableDynamic: whether to enable dynamic pooling of IPs // // Whether to enable dynamic pooling of IPs. By turning the dynamic pool off, only pre-existing DHCP reservations will be handed out. Defaults to true. // EnableDynamic *bool `json:"enable_dynamic"` // ValidLifetime: for how long will DHCP entries will be valid // // For how long, in seconds, will DHCP entries will be valid. Defaults to 1h (3600s). ValidLifetime *scw.Duration `json:"valid_lifetime"` // RenewTimer: after how long a renew will be attempted // // After how long, in seconds, a renew will be attempted. Must be 30s lower than `rebind_timer`. Defaults to 50m (3000s). // RenewTimer *scw.Duration `json:"renew_timer"` // RebindTimer: after how long a DHCP client will query for a new lease if previous renews fail // // After how long, in seconds, a DHCP client will query for a new lease if previous renews fail. Must be 30s lower than `valid_lifetime`. Defaults to 51m (3060s). // RebindTimer *scw.Duration `json:"rebind_timer"` // PushDefaultRoute: whether the gateway should push a default route to DHCP clients or only hand out IPs. Defaults to true PushDefaultRoute *bool `json:"push_default_route"` // PushDNSServer: whether the gateway should push custom DNS servers to clients // // Whether the gateway should push custom DNS servers to clients. This allows for instance hostname -> IP resolution. Defaults to true. // PushDNSServer *bool `json:"push_dns_server"` // DNSServersOverride: override the DNS server list pushed to DHCP clients, instead of the gateway itself DNSServersOverride *[]string `json:"dns_servers_override"` // DNSSearch: additional DNS search paths DNSSearch *[]string `json:"dns_search"` // DNSLocalName: tLD given to hosts in the Private Network // // TLD given to hostnames in the Private Network. Allowed characters are `a-z0-9-.`. Defaults to the slugified Private Network name if created along a GatewayNetwork, or else to `priv`. // DNSLocalName *string `json:"dns_local_name"` }
type CreateGatewayNetworkRequest ¶
type CreateGatewayNetworkRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: gateway to connect GatewayID string `json:"gateway_id"` // PrivateNetworkID: private Network to connect PrivateNetworkID string `json:"private_network_id"` // EnableMasquerade: whether to enable masquerade on this network EnableMasquerade bool `json:"enable_masquerade"` // DHCPID: existing configuration // Precisely one of Address, DHCPID must be set. DHCPID *string `json:"dhcp_id,omitempty"` // Address: static IP address in CIDR format to to use without DHCP // Precisely one of Address, DHCPID must be set. Address *scw.IPNet `json:"address,omitempty"` // EnableDHCP: whether to enable DHCP on this Private Network // // Whether to enable DHCP on this Private Network. Defaults to `true` if either `dhcp_id` or `dhcp` short: are present. If set to `true`, requires that either `dhcp_id` or `dhcp` to be present. // EnableDHCP *bool `json:"enable_dhcp"` }
type CreateGatewayRequest ¶
type CreateGatewayRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ProjectID: project to create the gateway into ProjectID string `json:"project_id"` // Name: name of the gateway Name string `json:"name"` // Tags: tags for the gateway Tags []string `json:"tags"` // Type: gateway type Type string `json:"type"` // UpstreamDNSServers: override the gateway's default recursive DNS servers, if DNS features are enabled UpstreamDNSServers []string `json:"upstream_dns_servers"` // IPID: attach an existing IP to the gateway IPID *string `json:"ip_id"` // EnableSMTP: allow SMTP traffic to pass through the gateway EnableSMTP bool `json:"enable_smtp"` // EnableBastion: enable SSH bastion on the gateway EnableBastion bool `json:"enable_bastion"` // BastionPort: port of the SSH bastion BastionPort *uint32 `json:"bastion_port"` }
type CreateIPRequest ¶
type CreatePATRuleRequest ¶
type CreatePATRuleRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: gateway on which to attach the rule to GatewayID string `json:"gateway_id"` // PublicPort: public port to listen on PublicPort uint32 `json:"public_port"` // PrivateIP: private IP to forward data to PrivateIP net.IP `json:"private_ip"` // PrivatePort: private port to translate to PrivatePort uint32 `json:"private_port"` // Protocol: protocol the rule should apply to // // Default value: unknown Protocol PATRuleProtocol `json:"protocol"` }
type DHCP ¶
type DHCP struct { // ID: ID of the DHCP config ID string `json:"id"` // OrganizationID: owning organization OrganizationID string `json:"organization_id"` // ProjectID: owning project ProjectID string `json:"project_id"` // CreatedAt: configuration creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: configuration last modification date UpdatedAt *time.Time `json:"updated_at"` // Subnet: subnet for the DHCP server Subnet scw.IPNet `json:"subnet"` // Address: address of the DHCP server // // Address of the DHCP server. This will be the gateway's address in the private network. It must be part of config's subnet. // Address net.IP `json:"address"` // PoolLow: low IP (included) of the dynamic address pool. Must be in the config's subnet PoolLow net.IP `json:"pool_low"` // PoolHigh: high IP (included) of the dynamic address pool. Must be in the config's subnet PoolHigh net.IP `json:"pool_high"` // EnableDynamic: whether to enable dynamic pooling of IPs // // Whether to enable dynamic pooling of IPs. By turning the dynamic pool off, only pre-existing DHCP reservations will be handed out. // EnableDynamic bool `json:"enable_dynamic"` // ValidLifetime: how long, in seconds, DHCP entries will be valid for ValidLifetime *scw.Duration `json:"valid_lifetime"` // RenewTimer: after how long a renew will be attempted // // After how long, in seconds, a renew will be attempted. Must be 30s lower than `rebind_timer`. // RenewTimer *scw.Duration `json:"renew_timer"` // RebindTimer: after how long a DHCP client will query for a new lease if previous renews fail // // After how long, in seconds, a DHCP client will query for a new lease if previous renews fail. Must be 30s lower than `valid_lifetime`. // RebindTimer *scw.Duration `json:"rebind_timer"` // PushDefaultRoute: whether the gateway should push a default route to DHCP clients or only hand out IPs PushDefaultRoute bool `json:"push_default_route"` // PushDNSServer: whether the gateway should push custom DNS servers to clients // // Whether the gateway should push custom DNS servers to clients. This allows for instance hostname -> IP resolution. // PushDNSServer bool `json:"push_dns_server"` // DNSServersOverride: override the DNS server list pushed to DHCP clients, instead of the gateway itself DNSServersOverride []string `json:"dns_servers_override"` // DNSSearch: add search paths to the pushed DNS configuration DNSSearch []string `json:"dns_search"` // DNSLocalName: tLD given to hostnames in the Private Networks // // TLD given to hostnames in the Private Network. If an instance with hostname `foo` gets a lease, and this is set to `bar`, `foo.bar` will resolve. // DNSLocalName string `json:"dns_local_name"` // Zone: zone this configuration is available in Zone scw.Zone `json:"zone"` }
DHCP: dhcp
type DHCPEntry ¶
type DHCPEntry struct { // ID: entry ID ID string `json:"id"` // CreatedAt: configuration creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: configuration last modification date UpdatedAt *time.Time `json:"updated_at"` // GatewayNetworkID: owning GatewayNetwork GatewayNetworkID string `json:"gateway_network_id"` // MacAddress: mAC address of the client machine MacAddress string `json:"mac_address"` // IPAddress: assigned IP address IPAddress net.IP `json:"ip_address"` // Hostname: hostname of the client machine Hostname string `json:"hostname"` // Type: entry type, either static (DHCP reservation) or dynamic (DHCP lease) // // Default value: unknown Type DHCPEntryType `json:"type"` // Zone: zone this entry is available in Zone scw.Zone `json:"zone"` }
DHCPEntry: dhcp entry
type DHCPEntryType ¶
type DHCPEntryType string
func (DHCPEntryType) MarshalJSON ¶
func (enum DHCPEntryType) MarshalJSON() ([]byte, error)
func (DHCPEntryType) String ¶
func (enum DHCPEntryType) String() string
func (*DHCPEntryType) UnmarshalJSON ¶
func (enum *DHCPEntryType) UnmarshalJSON(data []byte) error
type DeleteDHCPEntryRequest ¶
type DeleteDHCPRequest ¶
type DeleteGatewayNetworkRequest ¶
type DeleteGatewayNetworkRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: gatewayNetwork to delete GatewayNetworkID string `json:"-"` // CleanupDHCP: whether to cleanup the attached DHCP configuration // // Whether to cleanup the attached DHCP configuration (if any, and if not attached to another gateway_network). // CleanupDHCP bool `json:"-"` }
type DeleteGatewayRequest ¶
type DeleteGatewayRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: ID of the gateway to delete GatewayID string `json:"-"` // CleanupDHCP: whether to cleanup attached DHCP configurations // // Whether to cleanup attached DHCP configurations (if any, and if not attached to another Gateway Network). // CleanupDHCP bool `json:"-"` }
type DeleteIPRequest ¶
type DeletePATRuleRequest ¶
type Gateway ¶
type Gateway struct { // ID: ID of the gateway ID string `json:"id"` // OrganizationID: owning organization OrganizationID string `json:"organization_id"` // ProjectID: owning project ProjectID string `json:"project_id"` // CreatedAt: gateway creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: gateway last modification date UpdatedAt *time.Time `json:"updated_at"` // Type: gateway type Type *GatewayType `json:"type"` // Status: gateway's current status // // Default value: unknown Status GatewayStatus `json:"status"` // Name: name of the gateway Name string `json:"name"` // Tags: tags of the gateway Tags []string `json:"tags"` // IP: public IP of the gateway IP *IP `json:"ip"` // GatewayNetworks: gatewayNetworks attached to the gateway GatewayNetworks []*GatewayNetwork `json:"gateway_networks"` // UpstreamDNSServers: override the gateway's default recursive DNS servers UpstreamDNSServers []string `json:"upstream_dns_servers"` // Version: version of the running gateway software Version *string `json:"version"` // CanUpgradeTo: newly available gateway software version that can be updated to CanUpgradeTo *string `json:"can_upgrade_to"` // BastionEnabled: whether SSH bastion is enabled on the gateway BastionEnabled bool `json:"bastion_enabled"` // BastionPort: port of the SSH bastion BastionPort uint32 `json:"bastion_port"` // SMTPEnabled: whether SMTP traffic is allowed to pass through the gateway SMTPEnabled bool `json:"smtp_enabled"` // Zone: zone the gateway is available in Zone scw.Zone `json:"zone"` }
Gateway: gateway
type GatewayNetwork ¶
type GatewayNetwork struct { // ID: ID of the connection ID string `json:"id"` // CreatedAt: connection creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: connection last modification date UpdatedAt *time.Time `json:"updated_at"` // GatewayID: ID of the connected gateway GatewayID string `json:"gateway_id"` // PrivateNetworkID: ID of the connected private network PrivateNetworkID string `json:"private_network_id"` // MacAddress: mAC address of the gateway in the network (if the gateway is up and running) MacAddress *string `json:"mac_address"` // EnableMasquerade: whether the gateway masquerades traffic for this network EnableMasquerade bool `json:"enable_masquerade"` // Status: current status of the gateway network connection // // Default value: unknown Status GatewayNetworkStatus `json:"status"` // DHCP: DHCP configuration for the connected private network DHCP *DHCP `json:"dhcp"` // EnableDHCP: whether DHCP is enabled on the connected Private Network EnableDHCP bool `json:"enable_dhcp"` // Address: address of the Gateway in CIDR form to use when DHCP is not used Address *scw.IPNet `json:"address"` // Zone: zone the connection lives in Zone scw.Zone `json:"zone"` }
GatewayNetwork: gateway network
type GatewayNetworkStatus ¶
type GatewayNetworkStatus string
func (GatewayNetworkStatus) MarshalJSON ¶
func (enum GatewayNetworkStatus) MarshalJSON() ([]byte, error)
func (GatewayNetworkStatus) String ¶
func (enum GatewayNetworkStatus) String() string
func (*GatewayNetworkStatus) UnmarshalJSON ¶
func (enum *GatewayNetworkStatus) UnmarshalJSON(data []byte) error
type GatewayStatus ¶
type GatewayStatus string
func (GatewayStatus) MarshalJSON ¶
func (enum GatewayStatus) MarshalJSON() ([]byte, error)
func (GatewayStatus) String ¶
func (enum GatewayStatus) String() string
func (*GatewayStatus) UnmarshalJSON ¶
func (enum *GatewayStatus) UnmarshalJSON(data []byte) error
type GatewayType ¶
type GatewayType struct { // Name: type name Name string `json:"name"` // Bandwidth: bandwidth, in bps, the gateway has // // Bandwidth, in bps, the gateway has. This is the public bandwidth to the outer internet, and the internal bandwidth to each connected Private Networks. // Bandwidth uint64 `json:"bandwidth"` // Zone: zone the type is available in Zone scw.Zone `json:"zone"` }
GatewayType: gateway type
type GetDHCPEntryRequest ¶
type GetDHCPRequest ¶
type GetGatewayRequest ¶
type GetIPRequest ¶
type GetPATRuleRequest ¶
type IP ¶
type IP struct { // ID: IP ID ID string `json:"id"` // OrganizationID: owning organization OrganizationID string `json:"organization_id"` // ProjectID: owning project ProjectID string `json:"project_id"` // CreatedAt: configuration creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: configuration last modification date UpdatedAt *time.Time `json:"updated_at"` // Tags: tags associated with the IP Tags []string `json:"tags"` // Address: the IP itself Address net.IP `json:"address"` // Reverse: reverse domain name for the IP address Reverse *string `json:"reverse"` // GatewayID: gateway associated to the IP GatewayID *string `json:"gateway_id"` // Zone: zone this IP is available in Zone scw.Zone `json:"zone"` }
IP: ip
type ListDHCPEntriesRequest ¶
type ListDHCPEntriesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // // Default value: created_at_asc OrderBy ListDHCPEntriesRequestOrderBy `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: DHCP entries per page PageSize *uint32 `json:"-"` // GatewayNetworkID: filter entries based on the gateway network they are on GatewayNetworkID *string `json:"-"` // MacAddress: filter entries on their MAC address MacAddress *string `json:"-"` // IPAddress: filter entries on their IP address IPAddress *net.IP `json:"-"` // Hostname: filter entries on their hostname substring Hostname *string `json:"-"` // Type: filter entries on their type // // Default value: unknown Type DHCPEntryType `json:"-"` }
type ListDHCPEntriesRequestOrderBy ¶
type ListDHCPEntriesRequestOrderBy string
func (ListDHCPEntriesRequestOrderBy) MarshalJSON ¶
func (enum ListDHCPEntriesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDHCPEntriesRequestOrderBy) String ¶
func (enum ListDHCPEntriesRequestOrderBy) String() string
func (*ListDHCPEntriesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDHCPEntriesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListDHCPEntriesResponse ¶
type ListDHCPEntriesResponse struct { // DHCPEntries: DHCP entries in this page DHCPEntries []*DHCPEntry `json:"dhcp_entries"` // TotalCount: total DHCP entries matching the filter TotalCount uint32 `json:"total_count"` }
ListDHCPEntriesResponse: list dhcp entries response
func (*ListDHCPEntriesResponse) UnsafeAppend ¶
func (r *ListDHCPEntriesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListDHCPEntriesResponse) UnsafeGetTotalCount ¶
func (r *ListDHCPEntriesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListDHCPsRequest ¶
type ListDHCPsRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // // Default value: created_at_asc OrderBy ListDHCPsRequestOrderBy `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: DHCP configurations per page PageSize *uint32 `json:"-"` // OrganizationID: include only DHCPs in this organization OrganizationID *string `json:"-"` // ProjectID: include only DHCPs in this project ProjectID *string `json:"-"` // Address: filter on gateway address Address *net.IP `json:"-"` // HasAddress: filter on subnets containing address HasAddress *net.IP `json:"-"` }
type ListDHCPsRequestOrderBy ¶
type ListDHCPsRequestOrderBy string
func (ListDHCPsRequestOrderBy) MarshalJSON ¶
func (enum ListDHCPsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDHCPsRequestOrderBy) String ¶
func (enum ListDHCPsRequestOrderBy) String() string
func (*ListDHCPsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDHCPsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListDHCPsResponse ¶
type ListDHCPsResponse struct { // Dhcps: first page of DHCP configs Dhcps []*DHCP `json:"dhcps"` // TotalCount: total DHCP configs matching the filter TotalCount uint32 `json:"total_count"` }
ListDHCPsResponse: list dhc ps response
func (*ListDHCPsResponse) UnsafeAppend ¶
func (r *ListDHCPsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListDHCPsResponse) UnsafeGetTotalCount ¶
func (r *ListDHCPsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListGatewayNetworksRequest ¶
type ListGatewayNetworksRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // // Default value: created_at_asc OrderBy ListGatewayNetworksRequestOrderBy `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: gatewayNetworks per page PageSize *uint32 `json:"-"` // GatewayID: filter by gateway GatewayID *string `json:"-"` // PrivateNetworkID: filter by private network PrivateNetworkID *string `json:"-"` // EnableMasquerade: filter by masquerade enablement EnableMasquerade *bool `json:"-"` // DHCPID: filter by DHCP configuration DHCPID *string `json:"-"` // Status: filter GatewayNetworks by this status (unknown for any) // // Default value: unknown Status GatewayNetworkStatus `json:"-"` }
type ListGatewayNetworksRequestOrderBy ¶
type ListGatewayNetworksRequestOrderBy string
func (ListGatewayNetworksRequestOrderBy) MarshalJSON ¶
func (enum ListGatewayNetworksRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListGatewayNetworksRequestOrderBy) String ¶
func (enum ListGatewayNetworksRequestOrderBy) String() string
func (*ListGatewayNetworksRequestOrderBy) UnmarshalJSON ¶
func (enum *ListGatewayNetworksRequestOrderBy) UnmarshalJSON(data []byte) error
type ListGatewayNetworksResponse ¶
type ListGatewayNetworksResponse struct { // GatewayNetworks: gatewayNetworks in this page GatewayNetworks []*GatewayNetwork `json:"gateway_networks"` // TotalCount: total GatewayNetworks count matching the filter TotalCount uint32 `json:"total_count"` }
ListGatewayNetworksResponse: list gateway networks response
func (*ListGatewayNetworksResponse) UnsafeAppend ¶
func (r *ListGatewayNetworksResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListGatewayNetworksResponse) UnsafeGetTotalCount ¶
func (r *ListGatewayNetworksResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListGatewayTypesRequest ¶
type ListGatewayTypesResponse ¶
type ListGatewayTypesResponse struct { // Types: available types of gateway Types []*GatewayType `json:"types"` }
ListGatewayTypesResponse: list gateway types response
type ListGatewaysRequest ¶
type ListGatewaysRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // // Default value: created_at_asc OrderBy ListGatewaysRequestOrderBy `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: gateways per page PageSize *uint32 `json:"-"` // OrganizationID: include only gateways in this organization OrganizationID *string `json:"-"` // ProjectID: include only gateways in this project ProjectID *string `json:"-"` // Name: filter gateways including this name Name *string `json:"-"` // Tags: filter gateways with these tags Tags []string `json:"-"` // Type: filter gateways of this type Type *string `json:"-"` // Status: filter gateways in this status (unknown for any) // // Default value: unknown Status GatewayStatus `json:"-"` // PrivateNetworkID: filter gateways attached to this private network PrivateNetworkID *string `json:"-"` }
type ListGatewaysRequestOrderBy ¶
type ListGatewaysRequestOrderBy string
func (ListGatewaysRequestOrderBy) MarshalJSON ¶
func (enum ListGatewaysRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListGatewaysRequestOrderBy) String ¶
func (enum ListGatewaysRequestOrderBy) String() string
func (*ListGatewaysRequestOrderBy) UnmarshalJSON ¶
func (enum *ListGatewaysRequestOrderBy) UnmarshalJSON(data []byte) error
type ListGatewaysResponse ¶
type ListGatewaysResponse struct { // Gateways: gateways in this page Gateways []*Gateway `json:"gateways"` // TotalCount: total count of gateways matching the filter TotalCount uint32 `json:"total_count"` }
ListGatewaysResponse: list gateways response
func (*ListGatewaysResponse) UnsafeAppend ¶
func (r *ListGatewaysResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListGatewaysResponse) UnsafeGetTotalCount ¶
func (r *ListGatewaysResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListIPsRequest ¶
type ListIPsRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // // Default value: created_at_asc OrderBy ListIPsRequestOrderBy `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: iPs per page PageSize *uint32 `json:"-"` // OrganizationID: include only IPs in this organization OrganizationID *string `json:"-"` // ProjectID: include only IPs in this project ProjectID *string `json:"-"` // Tags: filter IPs with these tags Tags []string `json:"-"` // Reverse: filter by reverse containing this string Reverse *string `json:"-"` // IsFree: filter whether the IP is attached to a gateway or not IsFree *bool `json:"-"` }
type ListIPsRequestOrderBy ¶
type ListIPsRequestOrderBy string
func (ListIPsRequestOrderBy) MarshalJSON ¶
func (enum ListIPsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListIPsRequestOrderBy) String ¶
func (enum ListIPsRequestOrderBy) String() string
func (*ListIPsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListIPsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListIPsResponse ¶
type ListIPsResponse struct { // IPs: iPs in this page IPs []*IP `json:"ips"` // TotalCount: total IP count matching the filter TotalCount uint32 `json:"total_count"` }
ListIPsResponse: list i ps response
func (*ListIPsResponse) UnsafeAppend ¶
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListIPsResponse) UnsafeGetTotalCount ¶
func (r *ListIPsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListPATRulesRequest ¶
type ListPATRulesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // OrderBy: order in which to return results // // Default value: created_at_asc OrderBy ListPATRulesRequestOrderBy `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: pAT rules per page PageSize *uint32 `json:"-"` // GatewayID: fetch rules for this gateway GatewayID *string `json:"-"` // PrivateIP: fetch rules targeting this private ip PrivateIP *net.IP `json:"-"` // Protocol: fetch rules for this protocol // // Default value: unknown Protocol PATRuleProtocol `json:"-"` }
type ListPATRulesRequestOrderBy ¶
type ListPATRulesRequestOrderBy string
func (ListPATRulesRequestOrderBy) MarshalJSON ¶
func (enum ListPATRulesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListPATRulesRequestOrderBy) String ¶
func (enum ListPATRulesRequestOrderBy) String() string
func (*ListPATRulesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListPATRulesRequestOrderBy) UnmarshalJSON(data []byte) error
type ListPATRulesResponse ¶
type ListPATRulesResponse struct { // PatRules: this page of PAT rules matching the filter PatRules []*PATRule `json:"pat_rules"` // TotalCount: total PAT rules matching the filter TotalCount uint32 `json:"total_count"` }
ListPATRulesResponse: list pat rules response
func (*ListPATRulesResponse) UnsafeAppend ¶
func (r *ListPATRulesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListPATRulesResponse) UnsafeGetTotalCount ¶
func (r *ListPATRulesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type PATRule ¶
type PATRule struct { // ID: rule ID ID string `json:"id"` // GatewayID: gateway the PAT rule applies to GatewayID string `json:"gateway_id"` // CreatedAt: rule creation date CreatedAt *time.Time `json:"created_at"` // UpdatedAt: rule last modification date UpdatedAt *time.Time `json:"updated_at"` // PublicPort: public port to listen on PublicPort uint32 `json:"public_port"` // PrivateIP: private IP to forward data to PrivateIP net.IP `json:"private_ip"` // PrivatePort: private port to translate to PrivatePort uint32 `json:"private_port"` // Protocol: protocol the rule applies to // // Default value: unknown Protocol PATRuleProtocol `json:"protocol"` // Zone: zone this rule is available in Zone scw.Zone `json:"zone"` }
PATRule: pat rule
type PATRuleProtocol ¶
type PATRuleProtocol string
func (PATRuleProtocol) MarshalJSON ¶
func (enum PATRuleProtocol) MarshalJSON() ([]byte, error)
func (PATRuleProtocol) String ¶
func (enum PATRuleProtocol) String() string
func (*PATRuleProtocol) UnmarshalJSON ¶
func (enum *PATRuleProtocol) UnmarshalJSON(data []byte) error
type RefreshSSHKeysRequest ¶
type SetDHCPEntriesRequest ¶
type SetDHCPEntriesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: gateway Network on which to set DHCP reservation list GatewayNetworkID string `json:"gateway_network_id"` // DHCPEntries: new list of DHCP reservations DHCPEntries []*SetDHCPEntriesRequestEntry `json:"dhcp_entries"` }
type SetDHCPEntriesRequestEntry ¶
type SetDHCPEntriesRequestEntry struct { // MacAddress: mAC address to give a static entry to // // MAC address to give a static entry to. A matching entry will be upgraded to a reservation, and a matching reservation will be updated. // MacAddress string `json:"mac_address"` // IPAddress: IP address to give to the machine IPAddress net.IP `json:"ip_address"` }
SetDHCPEntriesRequestEntry: set dhcp entries request. entry
type SetDHCPEntriesResponse ¶
type SetDHCPEntriesResponse struct { // DHCPEntries: list of DHCP entries DHCPEntries []*DHCPEntry `json:"dhcp_entries"` }
SetDHCPEntriesResponse: set dhcp entries response
type SetPATRulesRequest ¶
type SetPATRulesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: gateway on which to set the PAT rules GatewayID string `json:"gateway_id"` // PatRules: new list of PAT rules PatRules []*SetPATRulesRequestRule `json:"pat_rules"` }
type SetPATRulesRequestRule ¶
type SetPATRulesRequestRule struct { // PublicPort: public port to listen on // // Public port to listen on. Uniquely identifies the rule, and a matching rule will be updated with the new parameters. // PublicPort uint32 `json:"public_port"` // PrivateIP: private IP to forward data to PrivateIP net.IP `json:"private_ip"` // PrivatePort: private port to translate to PrivatePort uint32 `json:"private_port"` // Protocol: protocol the rule should apply to // // Default value: unknown Protocol PATRuleProtocol `json:"protocol"` }
SetPATRulesRequestRule: set pat rules request. rule
type SetPATRulesResponse ¶
type SetPATRulesResponse struct { // PatRules: list of PAT rules PatRules []*PATRule `json:"pat_rules"` }
SetPATRulesResponse: set pat rules response
type UpdateDHCPEntryRequest ¶
type UpdateDHCPEntryRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPEntryID: DHCP entry ID to update DHCPEntryID string `json:"-"` // IPAddress: new IP address to give to the machine IPAddress *net.IP `json:"ip_address"` }
type UpdateDHCPRequest ¶
type UpdateDHCPRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // DHCPID: DHCP config to update DHCPID string `json:"-"` // Subnet: subnet for the DHCP server Subnet *scw.IPNet `json:"subnet"` // Address: address of the DHCP server. This will be the gateway's address in the private network Address *net.IP `json:"address"` // PoolLow: low IP (included) of the dynamic address pool PoolLow *net.IP `json:"pool_low"` // PoolHigh: high IP (included) of the dynamic address pool PoolHigh *net.IP `json:"pool_high"` // EnableDynamic: whether to enable dynamic pooling of IPs // // Whether to enable dynamic pooling of IPs. By turning the dynamic pool off, only pre-existing DHCP reservations will be handed out. Defaults to true. // EnableDynamic *bool `json:"enable_dynamic"` // ValidLifetime: how long, in seconds, DHCP entries will be valid for ValidLifetime *scw.Duration `json:"valid_lifetime"` // RenewTimer: after how long a renew will be attempted // // After how long, in seconds, a renew will be attempted. Must be 30s lower than `rebind_timer`. RenewTimer *scw.Duration `json:"renew_timer"` // RebindTimer: after how long a DHCP client will query for a new lease if previous renews fail // // After how long, in seconds, a DHCP client will query for a new lease if previous renews fail. Must be 30s lower than `valid_lifetime`. // RebindTimer *scw.Duration `json:"rebind_timer"` // PushDefaultRoute: whether the gateway should push a default route to DHCP clients or only hand out IPs PushDefaultRoute *bool `json:"push_default_route"` // PushDNSServer: whether the gateway should push custom DNS servers to clients // // Whether the gateway should push custom DNS servers to clients. This allows for instance hostname -> IP resolution. // PushDNSServer *bool `json:"push_dns_server"` // DNSServersOverride: override the DNS server list pushed to DHCP clients, instead of the gateway itself DNSServersOverride *[]string `json:"dns_servers_override"` // DNSSearch: additional DNS search paths DNSSearch *[]string `json:"dns_search"` // DNSLocalName: tLD given to hosts in the Private Network // // TLD given to hostnames in the Private Network. Allowed characters are `a-z0-9-.`. DNSLocalName *string `json:"dns_local_name"` }
type UpdateGatewayNetworkRequest ¶
type UpdateGatewayNetworkRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayNetworkID: ID of the GatewayNetwork to update GatewayNetworkID string `json:"-"` // EnableMasquerade: new masquerade enablement EnableMasquerade *bool `json:"enable_masquerade"` // DHCPID: new DHCP configuration // Precisely one of Address, DHCPID must be set. DHCPID *string `json:"dhcp_id,omitempty"` // EnableDHCP: whether to enable DHCP on the connected Private Network EnableDHCP *bool `json:"enable_dhcp"` // Address: new static IP address // Precisely one of Address, DHCPID must be set. Address *scw.IPNet `json:"address,omitempty"` }
type UpdateGatewayRequest ¶
type UpdateGatewayRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // GatewayID: ID of the gateway to update GatewayID string `json:"-"` // Name: name fo the gateway Name *string `json:"name"` // Tags: tags for the gateway Tags *[]string `json:"tags"` // UpstreamDNSServers: override the gateway's default recursive DNS servers, if DNS features are enabled UpstreamDNSServers *[]string `json:"upstream_dns_servers"` // EnableBastion: enable SSH bastion on the gateway EnableBastion *bool `json:"enable_bastion"` // BastionPort: port of the SSH bastion BastionPort *uint32 `json:"bastion_port"` // EnableSMTP: allow SMTP traffic to pass through the gateway EnableSMTP *bool `json:"enable_smtp"` }
type UpdateIPRequest ¶
type UpdateIPRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // IPID: ID of the IP to update IPID string `json:"-"` // Tags: tags to give to the IP Tags *[]string `json:"tags"` // Reverse: reverse to set on the IP. Empty string to unset Reverse *string `json:"reverse"` // GatewayID: gateway to attach the IP to. Empty string to detach GatewayID *string `json:"gateway_id"` }
type UpdatePATRuleRequest ¶
type UpdatePATRuleRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PatRuleID: pAT rule to update PatRuleID string `json:"-"` // PublicPort: public port to listen on PublicPort *uint32 `json:"public_port"` // PrivateIP: private IP to forward data to PrivateIP *net.IP `json:"private_ip"` // PrivatePort: private port to translate to PrivatePort *uint32 `json:"private_port"` // Protocol: protocol the rule should apply to // // Default value: unknown Protocol PATRuleProtocol `json:"protocol"` }
type UpgradeGatewayRequest ¶
type WaitForDHCPEntriesRequest ¶
type WaitForDHCPEntriesRequest struct { GatewayNetworkID *string MacAddress string Zone scw.Zone Timeout *time.Duration RetryInterval *time.Duration }
WaitForDHCPEntriesRequest is used by WaitForDHCPEntries method