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) EnableIPMobility(req *EnableIPMobilityRequest, 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 CreateGatewayNetworkRequestIpamConfig
- 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 EnableIPMobilityRequest
- 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 IpamConfig
- type ListDHCPEntriesRequest
- type ListDHCPEntriesRequestOrderBy
- type ListDHCPEntriesResponse
- type ListDHCPsRequest
- type ListDHCPsRequestOrderBy
- type ListDHCPsResponse
- type ListGatewayNetworksRequest
- type ListGatewayNetworksRequestOrderBy
- func (enum ListGatewayNetworksRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListGatewayNetworksRequestOrderBy) String() string
- func (enum *ListGatewayNetworksRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListGatewayNetworksRequestOrderBy) Values() []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 UpdateGatewayNetworkRequestIpamConfig
- type UpdateGatewayRequest
- type UpdateIPRequest
- type UpdatePATRuleRequest
- type UpgradeGatewayRequest
- type WaitForDHCPEntriesRequest
- type WaitForGatewayNetworkRequest
- type WaitForGatewayRequest
Constants ¶
const ( DHCPEntryTypeUnknown = DHCPEntryType("unknown") DHCPEntryTypeReservation = DHCPEntryType("reservation") DHCPEntryTypeLease = DHCPEntryType("lease") )
const ( GatewayNetworkStatusUnknown = GatewayNetworkStatus("unknown") GatewayNetworkStatusCreated = GatewayNetworkStatus("created") GatewayNetworkStatusAttaching = GatewayNetworkStatus("attaching") GatewayNetworkStatusConfiguring = GatewayNetworkStatus("configuring") GatewayNetworkStatusReady = GatewayNetworkStatus("ready") GatewayNetworkStatusDetaching = GatewayNetworkStatus("detaching") GatewayNetworkStatusDeleted = GatewayNetworkStatus("deleted") )
const ( GatewayStatusUnknown = GatewayStatus("unknown") GatewayStatusStopped = GatewayStatus("stopped") GatewayStatusAllocating = GatewayStatus("allocating") GatewayStatusConfiguring = GatewayStatus("configuring") GatewayStatusRunning = GatewayStatus("running") GatewayStatusStopping = GatewayStatus("stopping") GatewayStatusFailed = GatewayStatus("failed") GatewayStatusDeleting = GatewayStatus("deleting") GatewayStatusDeleted = GatewayStatus("deleted") GatewayStatusLocked = GatewayStatus("locked") )
const ( ListDHCPEntriesRequestOrderByCreatedAtAsc = ListDHCPEntriesRequestOrderBy("created_at_asc") ListDHCPEntriesRequestOrderByCreatedAtDesc = ListDHCPEntriesRequestOrderBy("created_at_desc") ListDHCPEntriesRequestOrderByIPAddressAsc = ListDHCPEntriesRequestOrderBy("ip_address_asc") ListDHCPEntriesRequestOrderByIPAddressDesc = ListDHCPEntriesRequestOrderBy("ip_address_desc") ListDHCPEntriesRequestOrderByHostnameAsc = ListDHCPEntriesRequestOrderBy("hostname_asc") ListDHCPEntriesRequestOrderByHostnameDesc = ListDHCPEntriesRequestOrderBy("hostname_desc") )
const ( ListDHCPsRequestOrderByCreatedAtAsc = ListDHCPsRequestOrderBy("created_at_asc") ListDHCPsRequestOrderByCreatedAtDesc = ListDHCPsRequestOrderBy("created_at_desc") ListDHCPsRequestOrderBySubnetAsc = ListDHCPsRequestOrderBy("subnet_asc") ListDHCPsRequestOrderBySubnetDesc = ListDHCPsRequestOrderBy("subnet_desc") )
const ( ListGatewayNetworksRequestOrderByCreatedAtAsc = ListGatewayNetworksRequestOrderBy("created_at_asc") ListGatewayNetworksRequestOrderByCreatedAtDesc = ListGatewayNetworksRequestOrderBy("created_at_desc") ListGatewayNetworksRequestOrderByStatusAsc = ListGatewayNetworksRequestOrderBy("status_asc") ListGatewayNetworksRequestOrderByStatusDesc = ListGatewayNetworksRequestOrderBy("status_desc") )
const ( ListGatewaysRequestOrderByCreatedAtAsc = ListGatewaysRequestOrderBy("created_at_asc") ListGatewaysRequestOrderByCreatedAtDesc = ListGatewaysRequestOrderBy("created_at_desc") ListGatewaysRequestOrderByNameAsc = ListGatewaysRequestOrderBy("name_asc") ListGatewaysRequestOrderByNameDesc = ListGatewaysRequestOrderBy("name_desc") ListGatewaysRequestOrderByTypeAsc = ListGatewaysRequestOrderBy("type_asc") ListGatewaysRequestOrderByTypeDesc = ListGatewaysRequestOrderBy("type_desc") ListGatewaysRequestOrderByStatusAsc = ListGatewaysRequestOrderBy("status_asc") ListGatewaysRequestOrderByStatusDesc = ListGatewaysRequestOrderBy("status_desc") )
const ( ListIPsRequestOrderByCreatedAtAsc = ListIPsRequestOrderBy("created_at_asc") ListIPsRequestOrderByCreatedAtDesc = ListIPsRequestOrderBy("created_at_desc") ListIPsRequestOrderByIPAsc = ListIPsRequestOrderBy("ip_asc") ListIPsRequestOrderByIPDesc = ListIPsRequestOrderBy("ip_desc") ListIPsRequestOrderByReverseAsc = ListIPsRequestOrderBy("reverse_asc") ListIPsRequestOrderByReverseDesc = ListIPsRequestOrderBy("reverse_desc") )
const ( ListPATRulesRequestOrderByCreatedAtAsc = ListPATRulesRequestOrderBy("created_at_asc") ListPATRulesRequestOrderByCreatedAtDesc = ListPATRulesRequestOrderBy("created_at_desc") ListPATRulesRequestOrderByPublicPortAsc = ListPATRulesRequestOrderBy("public_port_asc") ListPATRulesRequestOrderByPublicPortDesc = ListPATRulesRequestOrderBy("public_port_desc") )
const ( PATRuleProtocolUnknown = PATRuleProtocol("unknown") PATRuleProtocolBoth = PATRuleProtocol("both") PATRuleProtocolTCP = PATRuleProtocol("tcp") PATRuleProtocolUDP = PATRuleProtocol("udp") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
This API allows you to manage your Public Gateways.
func (*API) CreateDHCP ¶
func (s *API) CreateDHCP(req *CreateDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
CreateDHCP: Create a new DHCP configuration object, containing settings for the assignment of IP addresses to devices on a Private Network attached to a Public Gateway. The response object includes the ID of the DHCP configuration object. You can use this ID as part of a call to `Create a Public Gateway connection to a Private Network` or `Update a Public Gateway connection to a Private Network` to directly apply this DHCP configuration.
func (*API) CreateDHCPEntry ¶
func (s *API) CreateDHCPEntry(req *CreateDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
CreateDHCPEntry: Create a static DHCP reservation, specifying the Gateway Network for the reservation, the MAC address of the target device and the IP address to assign this device. The response is a DHCP entry object, confirming the ID and configuration details of the static DHCP reservation.
func (*API) CreateGateway ¶
func (s *API) CreateGateway(req *CreateGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
CreateGateway: Create a new Public Gateway in the specified Scaleway Project, defining its **name**, **type** and other configuration details such as whether to enable SSH bastion.
func (*API) CreateGatewayNetwork ¶
func (s *API) CreateGatewayNetwork(req *CreateGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
CreateGatewayNetwork: Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including DHCP settings, whether to enable masquerade (dynamic NAT), and more.
func (*API) CreateIP ¶
func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*IP, error)
CreateIP: Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project.
func (*API) CreatePATRule ¶
func (s *API) CreatePATRule(req *CreatePATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
CreatePATRule: Create a new PAT rule on a specified Public Gateway, defining the protocol to use, public port to listen on, and private port / IP address to map to.
func (*API) DeleteDHCP ¶
func (s *API) DeleteDHCP(req *DeleteDHCPRequest, opts ...scw.RequestOption) error
DeleteDHCP: Delete a DHCP configuration object, identified by its DHCP ID. Note that you cannot delete a DHCP configuration object that is currently being used by a Gateway Network.
func (*API) DeleteDHCPEntry ¶
func (s *API) DeleteDHCPEntry(req *DeleteDHCPEntryRequest, opts ...scw.RequestOption) error
DeleteDHCPEntry: Delete a static DHCP reservation, identified by its DHCP entry ID. Note that you cannot delete DHCP entries of type `lease`, these are deleted automatically when their time-to-live expires.
func (*API) DeleteGateway ¶
func (s *API) DeleteGateway(req *DeleteGatewayRequest, opts ...scw.RequestOption) error
DeleteGateway: Delete an existing Public Gateway, specified by its gateway ID. This action is irreversible.
func (*API) DeleteGatewayNetwork ¶
func (s *API) DeleteGatewayNetwork(req *DeleteGatewayNetworkRequest, opts ...scw.RequestOption) error
DeleteGatewayNetwork: Detach a given Public Gateway from a given Private Network, i.e. delete a GatewayNetwork specified by a gateway_network_id.
func (*API) DeleteIP ¶
func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error
DeleteIP: Delete a flexible IP address from your account. This action is irreversible.
func (*API) DeletePATRule ¶
func (s *API) DeletePATRule(req *DeletePATRuleRequest, opts ...scw.RequestOption) error
DeletePATRule: Delete a PAT rule, identified by its PAT rule ID. This action is irreversible.
func (*API) EnableIPMobility ¶
func (s *API) EnableIPMobility(req *EnableIPMobilityRequest, opts ...scw.RequestOption) error
EnableIPMobility: Upgrade a Public Gateway to IP mobility (move from NAT IP to routed IP). This is idempotent: repeated calls after the first will return no error but have no effect.
func (*API) GetDHCP ¶
func (s *API) GetDHCP(req *GetDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
GetDHCP: Get a DHCP configuration object, identified by its DHCP ID. The response object contains configuration settings for the assignment of IP addresses to devices on a Private Network attached to a Public Gateway. Note that the response does not contain the IDs of any Private Network / Public Gateway the configuration is attached to. Use the `List Public Gateway connections to Private Networks` method for that purpose, filtering on DHCP ID.
func (*API) GetDHCPEntry ¶
func (s *API) GetDHCPEntry(req *GetDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
GetDHCPEntry: Get a DHCP entry, specified by its DHCP entry ID.
func (*API) GetGateway ¶
func (s *API) GetGateway(req *GetGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
GetGateway: Get details of a Public Gateway, specified by its gateway ID. The response object contains full details of the gateway, including its **name**, **type**, **status** and more.
func (*API) GetGatewayNetwork ¶
func (s *API) GetGatewayNetwork(req *GetGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
GetGatewayNetwork: Get details of a given connection between a Public Gateway and a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`. The response object contains details of the connection including the IDs of the Public Gateway and Private Network, the dates the connection was created/updated and its configuration settings.
func (*API) GetIP ¶
func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*IP, error)
GetIP: Get details of a Public Gateway flexible IP address, identified by its IP ID. The response object contains information including which (if any) Public Gateway using this IP address, the reverse and various other metadata.
func (*API) GetPATRule ¶
func (s *API) GetPATRule(req *GetPATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
GetPATRule: Get a PAT rule, specified by its PAT rule ID. The response object gives full details of the PAT rule, including the Public Gateway it belongs to and the configuration settings in terms of public / private ports, private IP and protocol.
func (*API) ListDHCPEntries ¶
func (s *API) ListDHCPEntries(req *ListDHCPEntriesRequest, opts ...scw.RequestOption) (*ListDHCPEntriesResponse, error)
ListDHCPEntries: List DHCP entries, whether dynamically assigned and/or statically reserved. DHCP entries can be filtered by the Gateway Network they are on, their MAC address, IP address, type or hostname.
func (*API) ListDHCPs ¶
func (s *API) ListDHCPs(req *ListDHCPsRequest, opts ...scw.RequestOption) (*ListDHCPsResponse, error)
ListDHCPs: List DHCP configurations, optionally filtering by Organization, Project, Public Gateway IP address or more. The response is an array of DHCP configuration objects, each identified by a DHCP ID and containing configuration settings for the assignment of IP addresses to devices on a Private Network attached to a Public Gateway. Note that the response does not contain the IDs of any Private Network / Public Gateway the configuration is attached to. Use the `List Public Gateway connections to Private Networks` method for that purpose, filtering on DHCP ID.
func (*API) ListGatewayNetworks ¶
func (s *API) ListGatewayNetworks(req *ListGatewayNetworksRequest, opts ...scw.RequestOption) (*ListGatewayNetworksResponse, error)
ListGatewayNetworks: List the connections between Public Gateways and Private Networks (a connection = a GatewayNetwork). You can choose to filter by `gateway-id` to list all Private Networks attached to the specified Public Gateway, or by `private_network_id` to list all Public Gateways attached to the specified Private Network. Other query parameters are also available. The result is an array of GatewayNetwork objects, each giving details of the connection between a given Public Gateway and a given Private Network.
func (*API) ListGatewayTypes ¶
func (s *API) ListGatewayTypes(req *ListGatewayTypesRequest, opts ...scw.RequestOption) (*ListGatewayTypesResponse, error)
ListGatewayTypes: List the different Public Gateway commercial offer types available at Scaleway. The response is an array of objects describing the name and technical details of each available gateway type.
func (*API) ListGateways ¶
func (s *API) ListGateways(req *ListGatewaysRequest, opts ...scw.RequestOption) (*ListGatewaysResponse, error)
ListGateways: List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.
func (*API) ListIPs ¶
func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)
ListIPs: List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response.
func (*API) ListPATRules ¶
func (s *API) ListPATRules(req *ListPATRulesRequest, opts ...scw.RequestOption) (*ListPATRulesResponse, error)
ListPATRules: List PAT rules. You can filter by gateway ID to list all PAT rules for a particular gateway, or filter for PAT rules targeting a specific IP address or using a specific protocol.
func (*API) RefreshSSHKeys ¶
func (s *API) RefreshSSHKeys(req *RefreshSSHKeysRequest, opts ...scw.RequestOption) (*Gateway, error)
RefreshSSHKeys: Refresh the SSH keys of a given Public Gateway, specified by its gateway ID. This adds any new SSH keys in the gateway's Scaleway Project to the gateway itself.
func (*API) SetDHCPEntries ¶
func (s *API) SetDHCPEntries(req *SetDHCPEntriesRequest, opts ...scw.RequestOption) (*SetDHCPEntriesResponse, error)
SetDHCPEntries: 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 accordingly.
func (*API) SetPATRules ¶
func (s *API) SetPATRules(req *SetPATRulesRequest, opts ...scw.RequestOption) (*SetPATRulesResponse, error)
SetPATRules: Set a definitive list of PAT rules attached to a Public Gateway. Each rule is identified by its public port and protocol. This will sync the current PAT rule list on the gateway with the new list, creating, updating or deleting PAT rules accordingly.
func (*API) UpdateDHCP ¶
func (s *API) UpdateDHCP(req *UpdateDHCPRequest, opts ...scw.RequestOption) (*DHCP, error)
UpdateDHCP: Update a DHCP configuration object, identified by its DHCP ID.
func (*API) UpdateDHCPEntry ¶
func (s *API) UpdateDHCPEntry(req *UpdateDHCPEntryRequest, opts ...scw.RequestOption) (*DHCPEntry, error)
UpdateDHCPEntry: Update the IP address for a DHCP entry, specified by its DHCP entry ID. You can update an existing DHCP entry of any type (`reservation` (static), `lease` (dynamic) or `unknown`), but in manually updating the IP address the entry will necessarily be of type `reservation` after the update.
func (*API) UpdateGateway ¶
func (s *API) UpdateGateway(req *UpdateGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
UpdateGateway: Update the parameters of an existing Public Gateway, for example, its **name**, **tags**, **SSH bastion configuration**, and **DNS servers**.
func (*API) UpdateGatewayNetwork ¶
func (s *API) UpdateGatewayNetwork(req *UpdateGatewayNetworkRequest, opts ...scw.RequestOption) (*GatewayNetwork, error)
UpdateGatewayNetwork: Update the configuration parameters of a connection between a given Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable parameters include DHCP settings and whether to enable traffic masquerade (dynamic NAT).
func (*API) UpdateIP ¶
func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, error)
UpdateIP: Update details of an existing flexible IP address, including its tags, reverse and the Public Gateway it is assigned to.
func (*API) UpdatePATRule ¶
func (s *API) UpdatePATRule(req *UpdatePATRuleRequest, opts ...scw.RequestOption) (*PATRule, error)
UpdatePATRule: Update a PAT rule, specified by its PAT rule ID. Configuration settings including private/public port, private IP address and protocol can all be updated.
func (*API) UpgradeGateway ¶
func (s *API) UpgradeGateway(req *UpgradeGatewayRequest, opts ...scw.RequestOption) (*Gateway, error)
UpgradeGateway: Upgrade a given Public Gateway to the newest software version or to a different commercial offer type. This applies the latest bugfixes and features to your Public Gateway. Note that gateway service will be interrupted during the update.
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 device. IPAddress net.IP `json:"ip_address"` }
CreateDHCPEntryRequest: create dhcp entry request.
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: IP 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,omitempty"` // PoolLow: low IP (inclusive) of the dynamic address pool. Must be in the config's subnet. Defaults to the second address of the subnet. PoolLow *net.IP `json:"pool_low,omitempty"` // PoolHigh: high IP (inclusive) of the dynamic address pool. Must be in the config's subnet. Defaults to the last address of the subnet. PoolHigh *net.IP `json:"pool_high,omitempty"` // EnableDynamic: defines whether to enable dynamic pooling of IPs. When false, only pre-existing DHCP reservations will be handed out. Defaults to true. EnableDynamic *bool `json:"enable_dynamic,omitempty"` // ValidLifetime: how long DHCP entries will be valid for. Defaults to 1h (3600s). ValidLifetime *scw.Duration `json:"valid_lifetime,omitempty"` // RenewTimer: after how long a renew will be attempted. Must be 30s lower than `rebind_timer`. Defaults to 50m (3000s). RenewTimer *scw.Duration `json:"renew_timer,omitempty"` // RebindTimer: after how long 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,omitempty"` // PushDefaultRoute: defines 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,omitempty"` // PushDNSServer: defines 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,omitempty"` // DNSServersOverride: array of DNS server IP addresses used to override the DNS server list pushed to DHCP clients, instead of the gateway itself. DNSServersOverride *[]string `json:"dns_servers_override,omitempty"` // DNSSearch: array of search paths in addition to the pushed DNS configuration. DNSSearch *[]string `json:"dns_search,omitempty"` // DNSLocalName: 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,omitempty"` }
CreateDHCPRequest: create dhcp request.
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: public Gateway to connect. GatewayID string `json:"gateway_id"` // PrivateNetworkID: private Network to connect. PrivateNetworkID string `json:"private_network_id"` // EnableMasquerade: note: this setting is ignored when passing `ipam_config`. EnableMasquerade bool `json:"enable_masquerade"` // EnableDHCP: defaults to `true` if either `dhcp_id` or `dhcp` are present. If set to `true`, either `dhcp_id` or `dhcp` must be present. // Note: this setting is ignored when passing `ipam_config`. EnableDHCP *bool `json:"enable_dhcp,omitempty"` // DHCPID: ID of an existing DHCP configuration object to use for this GatewayNetwork. // Precisely one of DHCPID, DHCP, Address, IpamConfig must be set. DHCPID *string `json:"dhcp_id,omitempty"` // DHCP: new DHCP configuration object to use for this GatewayNetwork. // Precisely one of DHCPID, DHCP, Address, IpamConfig must be set. DHCP *CreateDHCPRequest `json:"dhcp,omitempty"` // Address: static IP address in CIDR format to to use without DHCP. // Precisely one of DHCPID, DHCP, Address, IpamConfig must be set. Address *scw.IPNet `json:"address,omitempty"` // IpamConfig: note: all or none of the GatewayNetworks for a single gateway can use the IPAM. DHCP and IPAM configurations cannot be mixed. Some products may require that the Public Gateway uses the IPAM, to ensure correct functionality. // Precisely one of DHCPID, DHCP, Address, IpamConfig must be set. IpamConfig *CreateGatewayNetworkRequestIpamConfig `json:"ipam_config,omitempty"` }
CreateGatewayNetworkRequest: create gateway network request.
type CreateGatewayNetworkRequestIpamConfig ¶
type CreateGatewayNetworkRequestIpamConfig struct { // PushDefaultRoute: enabling the default route also enables masquerading. PushDefaultRoute bool `json:"push_default_route"` // IpamIPID: use this IPAM-booked IP ID as the Gateway's IP in this Private Network. IpamIPID *string `json:"ipam_ip_id"` }
CreateGatewayNetworkRequestIpamConfig: create gateway network request ipam config.
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: scaleway Project to create the gateway in. ProjectID string `json:"project_id"` // Name: name for the gateway. Name string `json:"name"` // Tags: tags for the gateway. Tags []string `json:"tags"` // Type: gateway type (commercial offer type). Type string `json:"type"` // UpstreamDNSServers: array of DNS server IP addresses to override the gateway's default recursive DNS servers. UpstreamDNSServers []string `json:"upstream_dns_servers"` // IPID: existing IP address to attach to the gateway. IPID *string `json:"ip_id,omitempty"` // EnableSMTP: defines whether SMTP traffic should be allowed pass through the gateway. EnableSMTP bool `json:"enable_smtp"` // EnableBastion: defines whether SSH bastion should be enabled the gateway. EnableBastion bool `json:"enable_bastion"` // BastionPort: port of the SSH bastion. BastionPort *uint32 `json:"bastion_port,omitempty"` }
CreateGatewayRequest: create gateway request.
type CreateIPRequest ¶
type CreateIPRequest 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 IP address in. ProjectID string `json:"project_id"` // Tags: tags to give to the IP address. Tags []string `json:"tags"` }
CreateIPRequest: create ip request.
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: ID of the Gateway on which to create the rule. 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"` }
CreatePATRuleRequest: create pat rule request.
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: date the DHCP configuration was created. 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: IP address of the DHCP server. This will be the Public Gateway's address in the Private Network. It must be part of config's subnet. Address net.IP `json:"address"` // PoolLow: low IP (inclusive) of the dynamic address pool. Must be in the config's subnet. PoolLow net.IP `json:"pool_low"` // PoolHigh: high IP (inclusive) of the dynamic address pool. Must be in the config's subnet. PoolHigh net.IP `json:"pool_high"` // EnableDynamic: defines whether to enable dynamic pooling of IPs. When false, only pre-existing DHCP reservations will be handed out. EnableDynamic bool `json:"enable_dynamic"` // ValidLifetime: how long DHCP entries will be valid for. ValidLifetime *scw.Duration `json:"valid_lifetime"` // RenewTimer: after how long 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. Must be 30s lower than `valid_lifetime`. RebindTimer *scw.Duration `json:"rebind_timer"` // PushDefaultRoute: defines whether the gateway should push a default route to DHCP clients, or only hand out IPs. PushDefaultRoute bool `json:"push_default_route"` // PushDNSServer: defines whether the gateway should push custom DNS servers to clients. This allows for instance hostname -> IP resolution. PushDNSServer bool `json:"push_dns_server"` // DNSServersOverride: array of DNS server IP addresses used to override the DNS server list pushed to DHCP clients, instead of the gateway itself. DNSServersOverride []string `json:"dns_servers_override"` // DNSSearch: array of search paths in addition to the pushed DNS configuration. DNSSearch []string `json:"dns_search"` // DNSLocalName: tLD given to hostnames in the Private Networks. 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 of this DHCP configuration. Zone scw.Zone `json:"zone"` }
DHCP: dhcp.
type DHCPEntry ¶
type DHCPEntry struct { // ID: DHCP entry ID. ID string `json:"id"` // CreatedAt: DHCP entry creation date. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: DHCP entry last modification date. UpdatedAt *time.Time `json:"updated_at"` // GatewayNetworkID: owning GatewayNetwork. GatewayNetworkID string `json:"gateway_network_id"` // MacAddress: mAC address of the client device. MacAddress string `json:"mac_address"` // IPAddress: assigned IP address. IPAddress net.IP `json:"ip_address"` // Hostname: hostname of the client device. Hostname string `json:"hostname"` // Type: entry type, either static (DHCP reservation) or dynamic (DHCP lease). // Default value: unknown Type DHCPEntryType `json:"type"` // Zone: zone of this DHCP entry. 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
func (DHCPEntryType) Values ¶
func (enum DHCPEntryType) Values() []DHCPEntryType
type DeleteDHCPEntryRequest ¶
type DeleteDHCPEntryRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // DHCPEntryID: ID of the DHCP entry to delete. DHCPEntryID string `json:"-"` }
DeleteDHCPEntryRequest: delete dhcp entry request.
type DeleteDHCPRequest ¶
type DeleteDHCPRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // DHCPID: DHCP configuration ID to delete. DHCPID string `json:"-"` }
DeleteDHCPRequest: delete dhcp request.
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: ID of the GatewayNetwork to delete. GatewayNetworkID string `json:"-"` // CleanupDHCP: defines whether to clean up attached DHCP configurations (if any, and if not attached to another Gateway Network). CleanupDHCP bool `json:"cleanup_dhcp"` }
DeleteGatewayNetworkRequest: delete gateway network request.
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: defines whether to clean up attached DHCP configurations (if any, and if not attached to another Gateway Network). CleanupDHCP bool `json:"cleanup_dhcp"` }
DeleteGatewayRequest: delete gateway request.
type DeleteIPRequest ¶
type DeleteIPRequest 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 address to delete. IPID string `json:"-"` }
DeleteIPRequest: delete ip request.
type DeletePATRuleRequest ¶
type DeletePATRuleRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // PatRuleID: ID of the PAT rule to delete. PatRuleID string `json:"-"` }
DeletePATRuleRequest: delete pat rule request.
type EnableIPMobilityRequest ¶
type EnableIPMobilityRequest 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 upgrade to IP mobility. GatewayID string `json:"-"` }
EnableIPMobilityRequest: enable ip mobility request.
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 (commercial offer). Type *GatewayType `json:"type"` // Status: current status of the gateway. // Default value: unknown Status GatewayStatus `json:"status"` // Name: name of the gateway. Name string `json:"name"` // Tags: tags associated with the gateway. Tags []string `json:"tags"` // IP: public IP address of the gateway. IP *IP `json:"ip"` // GatewayNetworks: gatewayNetwork objects attached to the gateway (each one represents a connection to a Private Network). GatewayNetworks []*GatewayNetwork `json:"gateway_networks"` // UpstreamDNSServers: array of DNS server IP addresses to 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: defines 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: defines whether SMTP traffic is allowed to pass through the gateway. SMTPEnabled bool `json:"smtp_enabled"` // IsLegacy: defines whether the gateway uses non-IPAM IP configurations. IsLegacy bool `json:"is_legacy"` // IPMobilityEnabled: defines whether the gateway uses routed IPs (IP mobility) instead of NAT IPs. IPMobilityEnabled bool `json:"ip_mobility_enabled"` // Zone: zone of the gateway. Zone scw.Zone `json:"zone"` }
Gateway: gateway.
type GatewayNetwork ¶
type GatewayNetwork struct { // ID: ID of the Public Gateway-Private Network 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 Public 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 Private Network (if the gateway is up and running). MacAddress *string `json:"mac_address"` // EnableMasquerade: defines whether the gateway masquerades traffic for this Private Network (Dynamic NAT). EnableMasquerade bool `json:"enable_masquerade"` // Status: current status of the Public Gateway's connection to the Private Network. // Default value: unknown Status GatewayNetworkStatus `json:"status"` // DHCP: DHCP configuration for the connected Private Network. DHCP *DHCP `json:"dhcp"` // EnableDHCP: defines 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"` // IpamConfig: iPAM IP configuration used. IpamConfig *IpamConfig `json:"ipam_config"` // Zone: zone of the GatewayNetwork connection. 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
func (GatewayNetworkStatus) Values ¶
func (enum GatewayNetworkStatus) Values() []GatewayNetworkStatus
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
func (GatewayStatus) Values ¶
func (enum GatewayStatus) Values() []GatewayStatus
type GatewayType ¶
type GatewayType struct { // Name: public Gateway type name. Name string `json:"name"` // Bandwidth: bandwidth, in bps, of the Public Gateway. 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 Public Gateway type is available in. Zone scw.Zone `json:"zone"` }
GatewayType: gateway type.
type GetDHCPEntryRequest ¶
type GetDHCPEntryRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // DHCPEntryID: ID of the DHCP entry to fetch. DHCPEntryID string `json:"-"` }
GetDHCPEntryRequest: get dhcp entry request.
type GetDHCPRequest ¶
type GetDHCPRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // DHCPID: ID of the DHCP configuration to fetch. DHCPID string `json:"-"` }
GetDHCPRequest: get dhcp request.
type GetGatewayNetworkRequest ¶
type GetGatewayNetworkRequest 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 fetch. GatewayNetworkID string `json:"-"` }
GetGatewayNetworkRequest: get gateway network request.
type GetGatewayRequest ¶
type GetGatewayRequest 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 fetch. GatewayID string `json:"-"` }
GetGatewayRequest: get gateway request.
type GetIPRequest ¶
type GetIPRequest 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 address to get. IPID string `json:"-"` }
GetIPRequest: get ip request.
type GetPATRuleRequest ¶
type GetPATRuleRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` // PatRuleID: ID of the PAT rule to get. PatRuleID string `json:"-"` }
GetPATRuleRequest: get pat rule request.
type IP ¶
type IP struct { // ID: IP address ID. ID string `json:"id"` // OrganizationID: owning Organization. OrganizationID string `json:"organization_id"` // ProjectID: owning Project. ProjectID string `json:"project_id"` // CreatedAt: IP address creation date. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: IP address last modification date. UpdatedAt *time.Time `json:"updated_at"` // Tags: tags associated with the IP address. Tags []string `json:"tags"` // Address: the IP address itself. Address net.IP `json:"address"` // Reverse: reverse domain name for the IP address. Reverse *string `json:"reverse"` // GatewayID: public Gateway associated with the IP address. GatewayID *string `json:"gateway_id"` // Zone: zone of the IP address. Zone scw.Zone `json:"zone"` }
IP: ip.
type IpamConfig ¶
type IpamConfig struct { // PushDefaultRoute: defines whether the default route is enabled on that Gateway Network. PushDefaultRoute bool `json:"push_default_route"` // IpamIPID: iPAM-booked IP ID as the Gateway's IP in this Private Network. IpamIPID string `json:"ipam_ip_id"` }
IpamConfig: ipam config.
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 for entries on this GatewayNetwork. GatewayNetworkID *string `json:"-"` // MacAddress: filter for entries with this MAC address. MacAddress *string `json:"-"` // IPAddress: filter for entries with this IP address. IPAddress *net.IP `json:"-"` // Hostname: filter for entries with this hostname substring. Hostname *string `json:"-"` // Type: filter for entries of this type. // Default value: unknown Type DHCPEntryType `json:"-"` }
ListDHCPEntriesRequest: list dhcp entries request.
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
func (ListDHCPEntriesRequestOrderBy) Values ¶
func (enum ListDHCPEntriesRequestOrderBy) Values() []ListDHCPEntriesRequestOrderBy
type ListDHCPEntriesResponse ¶
type ListDHCPEntriesResponse struct { // DHCPEntries: DHCP entries in this page. DHCPEntries []*DHCPEntry `json:"dhcp_entries"` // TotalCount: total count of 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 DHCP configuration objects in this Organization. OrganizationID *string `json:"-"` // ProjectID: include only DHCP configuration objects in this Project. ProjectID *string `json:"-"` // Address: filter for DHCP configuration objects with this DHCP server IP address (the gateway's address in the Private Network). Address *net.IP `json:"-"` // HasAddress: filter for DHCP configuration objects with subnets containing this IP address. HasAddress *net.IP `json:"-"` }
ListDHCPsRequest: list dhc ps request.
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
func (ListDHCPsRequestOrderBy) Values ¶
func (enum ListDHCPsRequestOrderBy) Values() []ListDHCPsRequestOrderBy
type ListDHCPsResponse ¶
type ListDHCPsResponse struct { // Dhcps: first page of DHCP configuration objects. Dhcps []*DHCP `json:"dhcps"` // TotalCount: total count of DHCP configuration objects 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 for GatewayNetworks connected to this gateway. GatewayID *string `json:"-"` // PrivateNetworkID: filter for GatewayNetworks connected to this Private Network. PrivateNetworkID *string `json:"-"` // EnableMasquerade: filter for GatewayNetworks with this `enable_masquerade` setting. EnableMasquerade *bool `json:"-"` // DHCPID: filter for GatewayNetworks using this DHCP configuration. DHCPID *string `json:"-"` // Status: filter for GatewayNetworks with this current status this status. Use `unknown` to include all statuses. // Default value: unknown Status GatewayNetworkStatus `json:"-"` }
ListGatewayNetworksRequest: list gateway networks request.
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
func (ListGatewayNetworksRequestOrderBy) Values ¶
func (enum ListGatewayNetworksRequestOrderBy) Values() []ListGatewayNetworksRequestOrderBy
type ListGatewayNetworksResponse ¶
type ListGatewayNetworksResponse struct { // GatewayNetworks: gatewayNetworks on 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 ListGatewayTypesRequest struct { // Zone: zone to target. If none is passed will use default zone from the config. Zone scw.Zone `json:"-"` }
ListGatewayTypesRequest: list gateway types request.
type ListGatewayTypesResponse ¶
type ListGatewayTypesResponse struct { // Types: available types of Public 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 to return. 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 for gateways which have this search term in their name. Name *string `json:"-"` // Tags: filter for gateways with these tags. Tags []string `json:"-"` // Type: filter for gateways of this type. Type *string `json:"-"` // Status: filter for gateways with this current status. Use `unknown` to include all statuses. // Default value: unknown Status GatewayStatus `json:"-"` // PrivateNetworkID: filter for gateways attached to this Private nNetwork. PrivateNetworkID *string `json:"-"` }
ListGatewaysRequest: list gateways request.
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
func (ListGatewaysRequestOrderBy) Values ¶
func (enum ListGatewaysRequestOrderBy) Values() []ListGatewaysRequestOrderBy
type ListGatewaysResponse ¶
type ListGatewaysResponse struct { // Gateways: gateways on 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: IP addresses per page. PageSize *uint32 `json:"-"` // OrganizationID: filter for IP addresses in this Organization. OrganizationID *string `json:"-"` // ProjectID: filter for IP addresses in this Project. ProjectID *string `json:"-"` // Tags: filter for IP addresses with these tags. Tags []string `json:"-"` // Reverse: filter for IP addresses that have a reverse containing this string. Reverse *string `json:"-"` // IsFree: filter based on whether the IP is attached to a gateway or not. IsFree *bool `json:"-"` }
ListIPsRequest: list i ps request.
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
func (ListIPsRequestOrderBy) Values ¶
func (enum ListIPsRequestOrderBy) Values() []ListIPsRequestOrderBy
type ListIPsResponse ¶
type ListIPsResponse struct { // IPs: IP addresses on this page. IPs []*IP `json:"ips"` // TotalCount: total count of IP addresses 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: filter for PAT rules on this Gateway. GatewayID *string `json:"-"` // PrivateIP: filter for PAT rules targeting this private ip. PrivateIP *net.IP `json:"-"` // Protocol: filter for PAT rules with this protocol. // Default value: unknown Protocol PATRuleProtocol `json:"-"` }
ListPATRulesRequest: list pat rules request.
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
func (ListPATRulesRequestOrderBy) Values ¶
func (enum ListPATRulesRequestOrderBy) Values() []ListPATRulesRequestOrderBy
type ListPATRulesResponse ¶
type ListPATRulesResponse struct { // PatRules: array of PAT rules matching the filter. PatRules []*PATRule `json:"pat_rules"` // TotalCount: total count of 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: pAT rule ID. ID string `json:"id"` // GatewayID: gateway the PAT rule applies to. GatewayID string `json:"gateway_id"` // CreatedAt: pAT rule creation date. CreatedAt *time.Time `json:"created_at"` // UpdatedAt: pAT rule last modification date. UpdatedAt *time.Time `json:"updated_at"` // PublicPort: public port to listen on. PublicPort uint32 `json:"public_port"` // PrivateIP: private IP address 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 of the PAT rule. 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
func (PATRuleProtocol) Values ¶
func (enum PATRuleProtocol) Values() []PATRuleProtocol
type RefreshSSHKeysRequest ¶
type RefreshSSHKeysRequest 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 refresh SSH keys on. GatewayID string `json:"-"` }
RefreshSSHKeysRequest: refresh ssh keys request.
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: ID of the 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"` }
SetDHCPEntriesRequest: set dhcp entries request.
type SetDHCPEntriesRequestEntry ¶
type SetDHCPEntriesRequestEntry struct { // MacAddress: 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 device. 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: ID of the gateway on which to set the PAT rules. GatewayID string `json:"gateway_id"` // PatRules: new list of PAT rules. PatRules []*SetPATRulesRequestRule `json:"pat_rules"` }
SetPATRulesRequest: set pat rules request.
type SetPATRulesRequestRule ¶
type SetPATRulesRequestRule struct { // PublicPort: 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: ID of the DHCP entry to update. DHCPEntryID string `json:"-"` // IPAddress: new IP address to give to the device. IPAddress *net.IP `json:"ip_address,omitempty"` }
UpdateDHCPEntryRequest: update dhcp entry request.
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 configuration to update. DHCPID string `json:"-"` // Subnet: subnet for the DHCP server. Subnet *scw.IPNet `json:"subnet,omitempty"` // Address: IP address of the DHCP server. This will be the Public Gateway's address in the Private Network. It must be part of config's subnet. Address *net.IP `json:"address,omitempty"` // PoolLow: low IP (inclusive) of the dynamic address pool. Must be in the config's subnet. PoolLow *net.IP `json:"pool_low,omitempty"` // PoolHigh: high IP (inclusive) of the dynamic address pool. Must be in the config's subnet. PoolHigh *net.IP `json:"pool_high,omitempty"` // EnableDynamic: defines whether to enable dynamic pooling of IPs. When false, only pre-existing DHCP reservations will be handed out. Defaults to true. EnableDynamic *bool `json:"enable_dynamic,omitempty"` // ValidLifetime: how long DHCP entries will be valid for. ValidLifetime *scw.Duration `json:"valid_lifetime,omitempty"` // RenewTimer: after how long a renew will be attempted. Must be 30s lower than `rebind_timer`. RenewTimer *scw.Duration `json:"renew_timer,omitempty"` // RebindTimer: after how long 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,omitempty"` // PushDefaultRoute: defines whether the gateway should push a default route to DHCP clients, or only hand out IPs. PushDefaultRoute *bool `json:"push_default_route,omitempty"` // PushDNSServer: defines whether the gateway should push custom DNS servers to clients. This allows for instance hostname -> IP resolution. PushDNSServer *bool `json:"push_dns_server,omitempty"` // DNSServersOverride: array of DNS server IP addresses used to override the DNS server list pushed to DHCP clients, instead of the gateway itself. DNSServersOverride *[]string `json:"dns_servers_override,omitempty"` // DNSSearch: array of search paths in addition to the pushed DNS configuration. DNSSearch *[]string `json:"dns_search,omitempty"` // DNSLocalName: tLD given to hostnames in the Private Networks. If an instance with hostname `foo` gets a lease, and this is set to `bar`, `foo.bar` will resolve. Allowed characters are `a-z0-9-.`. DNSLocalName *string `json:"dns_local_name,omitempty"` }
UpdateDHCPRequest: update dhcp request.
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: note: this setting is ignored when passing `ipam_config`. EnableMasquerade *bool `json:"enable_masquerade,omitempty"` // EnableDHCP: defaults to `true` if `dhcp_id` is present. If set to `true`, `dhcp_id` must be present. // Note: this setting is ignored when passing `ipam_config`. EnableDHCP *bool `json:"enable_dhcp,omitempty"` // DHCPID: ID of the new DHCP configuration object to use with this GatewayNetwork. // Precisely one of DHCPID, Address, IpamConfig must be set. DHCPID *string `json:"dhcp_id,omitempty"` // Address: new static IP address. // Precisely one of DHCPID, Address, IpamConfig must be set. Address *scw.IPNet `json:"address,omitempty"` // IpamConfig: note: all or none of the GatewayNetworks for a single gateway can use the IPAM. DHCP and IPAM configurations cannot be mixed. Some products may require that the Public Gateway uses the IPAM, to ensure correct functionality. // Precisely one of DHCPID, Address, IpamConfig must be set. IpamConfig *UpdateGatewayNetworkRequestIpamConfig `json:"ipam_config,omitempty"` }
UpdateGatewayNetworkRequest: update gateway network request.
type UpdateGatewayNetworkRequestIpamConfig ¶
type UpdateGatewayNetworkRequestIpamConfig struct { // PushDefaultRoute: enabling the default route also enables masquerading. PushDefaultRoute *bool `json:"push_default_route"` // IpamIPID: use this IPAM-booked IP ID as the Gateway's IP in this Private Network. IpamIPID *string `json:"ipam_ip_id"` }
UpdateGatewayNetworkRequestIpamConfig: update gateway network request ipam config.
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 for the gateway. Name *string `json:"name,omitempty"` // Tags: tags for the gateway. Tags *[]string `json:"tags,omitempty"` // UpstreamDNSServers: array of DNS server IP addresses to override the gateway's default recursive DNS servers. UpstreamDNSServers *[]string `json:"upstream_dns_servers,omitempty"` // EnableBastion: defines whether SSH bastion should be enabled the gateway. EnableBastion *bool `json:"enable_bastion,omitempty"` // BastionPort: port of the SSH bastion. BastionPort *uint32 `json:"bastion_port,omitempty"` // EnableSMTP: defines whether SMTP traffic should be allowed to pass through the gateway. EnableSMTP *bool `json:"enable_smtp,omitempty"` }
UpdateGatewayRequest: update gateway request.
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 address to update. IPID string `json:"-"` // Tags: tags to give to the IP address. Tags *[]string `json:"tags,omitempty"` // Reverse: reverse to set on the address. Empty string to unset. Reverse *string `json:"reverse,omitempty"` // GatewayID: gateway to attach the IP address to. Empty string to detach. GatewayID *string `json:"gateway_id,omitempty"` }
UpdateIPRequest: update ip request.
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: ID of the PAT rule to update. PatRuleID string `json:"-"` // PublicPort: public port to listen on. PublicPort *uint32 `json:"public_port,omitempty"` // PrivateIP: private IP to forward data to. PrivateIP *net.IP `json:"private_ip,omitempty"` // PrivatePort: private port to translate to. PrivatePort *uint32 `json:"private_port,omitempty"` // Protocol: protocol the rule should apply to. // Default value: unknown Protocol PATRuleProtocol `json:"protocol"` }
UpdatePATRuleRequest: update pat rule request.
type UpgradeGatewayRequest ¶
type UpgradeGatewayRequest 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 upgrade. GatewayID string `json:"-"` // Type: gateway type (commercial offer). Type *string `json:"type,omitempty"` }
UpgradeGatewayRequest: upgrade gateway request.
type WaitForDHCPEntriesRequest ¶
type WaitForDHCPEntriesRequest struct { GatewayNetworkID *string MacAddress string Zone scw.Zone Timeout *time.Duration RetryInterval *time.Duration }
WaitForDHCPEntriesRequest is used by WaitForDHCPEntries method