scaleway.vpcgw.v2 package
Submodules
scaleway.vpcgw.v2.api module
- class scaleway.vpcgw.v2.api.VpcgwV2API(client: Client, *, bypass_validation: bool = False)
Bases:
API
This API allows you to manage your Public Gateways.
- create_gateway(*, type_: str, enable_smtp: bool, enable_bastion: bool, zone: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, ip_id: Optional[str] = None, bastion_port: Optional[int] = None) Gateway
Create a Public Gateway. 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. :param type_: Gateway type (commercial offer type). :param enable_smtp: Defines whether SMTP traffic should be allowed pass through the gateway. :param enable_bastion: Defines whether SSH bastion should be enabled the gateway. :param zone: Zone to target. If none is passed will use default zone from the config. :param project_id: Scaleway Project to create the gateway in. :param name: Name for the gateway. :param tags: Tags for the gateway. :param ip_id: Existing IP address to attach to the gateway. :param bastion_port: Port of the SSH bastion. :return:
Gateway
Usage:
result = api.create_gateway( type="example", enable_smtp=False, enable_bastion=False, )
- create_gateway_network(*, gateway_id: str, private_network_id: str, enable_masquerade: bool, push_default_route: bool, zone: Optional[str] = None, ipam_ip_id: Optional[str] = None) GatewayNetwork
Attach a Public Gateway to a Private Network. Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including whether to enable masquerade (dynamic NAT), and more. :param gateway_id: Public Gateway to connect. :param private_network_id: Private Network to connect. :param enable_masquerade: Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. :param push_default_route: Enabling the default route also enables masquerading. :param zone: Zone to target. If none is passed will use default zone from the config. :param ipam_ip_id: Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network. :return:
GatewayNetwork
Usage:
result = api.create_gateway_network( gateway_id="example", private_network_id="example", enable_masquerade=False, push_default_route=False, )
- create_ip(*, zone: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None) IP
Reserve an IP. Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project. :param zone: Zone to target. If none is passed will use default zone from the config. :param project_id: Project to create the IP address in. :param tags: Tags to give to the IP address. :return:
IP
Usage:
result = api.create_ip()
- create_pat_rule(*, gateway_id: str, public_port: int, private_ip: str, private_port: int, zone: Optional[str] = None, protocol: Optional[PatRuleProtocol] = None) PatRule
Create a PAT rule. 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. :param gateway_id: ID of the Gateway on which to create the rule. :param public_port: Public port to listen on. :param private_ip: Private IP to forward data to. :param private_port: Private port to translate to. :param zone: Zone to target. If none is passed will use default zone from the config. :param protocol: Protocol the rule should apply to. :return:
PatRule
Usage:
result = api.create_pat_rule( gateway_id="example", public_port=1, private_ip="example", private_port=1, )
- delete_gateway(*, gateway_id: str, delete_ip: bool, zone: Optional[str] = None) Gateway
Delete a Public Gateway. Delete an existing Public Gateway, specified by its gateway ID. This action is irreversible. :param gateway_id: ID of the gateway to delete. :param delete_ip: Defines whether the PGW’s IP should be deleted. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.delete_gateway( gateway_id="example", delete_ip=False, )
- delete_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None) GatewayNetwork
Detach a Public Gateway from a Private Network. Detach a given Public Gateway from a given Private Network, i.e. delete a GatewayNetwork specified by a gateway_network_id. :param gateway_network_id: ID of the GatewayNetwork to delete. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
GatewayNetwork
Usage:
result = api.delete_gateway_network( gateway_network_id="example", )
- delete_ip(*, ip_id: str, zone: Optional[str] = None) None
Delete an IP. Delete a flexible IP address from your account. This action is irreversible. :param ip_id: ID of the IP address to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = api.delete_ip( ip_id="example", )
- delete_pat_rule(*, pat_rule_id: str, zone: Optional[str] = None) None
Delete a PAT rule. Delete a PAT rule, identified by its PAT rule ID. This action is irreversible. :param pat_rule_id: ID of the PAT rule to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = api.delete_pat_rule( pat_rule_id="example", )
- get_gateway(*, gateway_id: str, zone: Optional[str] = None) Gateway
Get a Public Gateway. 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. :param gateway_id: ID of the gateway to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.get_gateway( gateway_id="example", )
- get_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None) GatewayNetwork
Get a Public Gateway connection to a Private Network. 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. :param gateway_network_id: ID of the GatewayNetwork to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
GatewayNetwork
Usage:
result = api.get_gateway_network( gateway_network_id="example", )
- get_ip(*, ip_id: str, zone: Optional[str] = None) IP
Get an IP. 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. :param ip_id: ID of the IP address to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
IP
Usage:
result = api.get_ip( ip_id="example", )
- get_pat_rule(*, pat_rule_id: str, zone: Optional[str] = None) PatRule
Get a PAT rule. 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. :param pat_rule_id: ID of the PAT rule to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
PatRule
Usage:
result = api.get_pat_rule( pat_rule_id="example", )
- list_gateway_networks(*, zone: Optional[str] = None, order_by: Optional[ListGatewayNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[GatewayNetworkStatus]] = None, gateway_ids: Optional[List[str]] = None, private_network_ids: Optional[List[str]] = None, masquerade_enabled: Optional[bool] = None) ListGatewayNetworksResponse
List Public Gateway connections to Private Networks. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: GatewayNetworks per page. :param status: Filter for GatewayNetworks with these status. Use unknown to include all statuses. :param gateway_ids: Filter for GatewayNetworks connected to these gateways. :param private_network_ids: Filter for GatewayNetworks connected to these Private Networks. :param masquerade_enabled: Filter for GatewayNetworks with this enable_masquerade setting. :return:
ListGatewayNetworksResponse
Usage:
result = api.list_gateway_networks()
- list_gateway_networks_all(*, zone: Optional[str] = None, order_by: Optional[ListGatewayNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[GatewayNetworkStatus]] = None, gateway_ids: Optional[List[str]] = None, private_network_ids: Optional[List[str]] = None, masquerade_enabled: Optional[bool] = None) List[GatewayNetwork]
List Public Gateway connections to Private Networks. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: GatewayNetworks per page. :param status: Filter for GatewayNetworks with these status. Use unknown to include all statuses. :param gateway_ids: Filter for GatewayNetworks connected to these gateways. :param private_network_ids: Filter for GatewayNetworks connected to these Private Networks. :param masquerade_enabled: Filter for GatewayNetworks with this enable_masquerade setting. :return:
List[GatewayNetwork]
Usage:
result = api.list_gateway_networks_all()
- list_gateway_types(*, zone: Optional[str] = None) ListGatewayTypesResponse
List Public Gateway types. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
ListGatewayTypesResponse
Usage:
result = api.list_gateway_types()
- list_gateways(*, zone: Optional[str] = None, order_by: Optional[ListGatewaysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, types: Optional[List[str]] = None, status: Optional[List[GatewayStatus]] = None, private_network_ids: Optional[List[str]] = None, include_legacy: Optional[bool] = None) ListGatewaysResponse
List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number to return. :param page_size: Gateways per page. :param organization_id: Include only gateways in this Organization. :param project_id: Include only gateways in this Project. :param name: Filter for gateways which have this search term in their name. :param tags: Filter for gateways with these tags. :param types: Filter for gateways of these types. :param status: Filter for gateways with these status. Use unknown to include all statuses. :param private_network_ids: Filter for gateways attached to these Private Networks. :param include_legacy: Include also legacy gateways. :return:
ListGatewaysResponse
Usage:
result = api.list_gateways()
- list_gateways_all(*, zone: Optional[str] = None, order_by: Optional[ListGatewaysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, types: Optional[List[str]] = None, status: Optional[List[GatewayStatus]] = None, private_network_ids: Optional[List[str]] = None, include_legacy: Optional[bool] = None) List[Gateway]
List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number to return. :param page_size: Gateways per page. :param organization_id: Include only gateways in this Organization. :param project_id: Include only gateways in this Project. :param name: Filter for gateways which have this search term in their name. :param tags: Filter for gateways with these tags. :param types: Filter for gateways of these types. :param status: Filter for gateways with these status. Use unknown to include all statuses. :param private_network_ids: Filter for gateways attached to these Private Networks. :param include_legacy: Include also legacy gateways. :return:
List[Gateway]
Usage:
result = api.list_gateways_all()
- list_i_ps(*, zone: Optional[str] = None, order_by: Optional[ListIPsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None, reverse: Optional[str] = None, is_free: Optional[bool] = None) ListIPsResponse
List IPs. List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: IP addresses per page. :param organization_id: Include only gateways in this Organization. :param project_id: Filter for IP addresses in this Project. :param tags: Filter for IP addresses with these tags. :param reverse: Filter for IP addresses that have a reverse containing this string. :param is_free: Filter based on whether the IP is attached to a gateway or not. :return:
ListIPsResponse
Usage:
result = api.list_i_ps()
- list_i_ps_all(*, zone: Optional[str] = None, order_by: Optional[ListIPsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None, reverse: Optional[str] = None, is_free: Optional[bool] = None) List[IP]
List IPs. List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: IP addresses per page. :param organization_id: Include only gateways in this Organization. :param project_id: Filter for IP addresses in this Project. :param tags: Filter for IP addresses with these tags. :param reverse: Filter for IP addresses that have a reverse containing this string. :param is_free: Filter based on whether the IP is attached to a gateway or not. :return:
List[IP]
Usage:
result = api.list_i_ps_all()
- list_pat_rules(*, zone: Optional[str] = None, order_by: Optional[ListPatRulesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, gateway_ids: Optional[List[str]] = None, private_ips: Optional[List[str]] = None, protocol: Optional[PatRuleProtocol] = None) ListPatRulesResponse
List PAT rules. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: PAT rules per page. :param gateway_ids: Filter for PAT rules on these gateways. :param private_ips: Filter for PAT rules targeting these private ips. :param protocol: Filter for PAT rules with this protocol. :return:
ListPatRulesResponse
Usage:
result = api.list_pat_rules()
- list_pat_rules_all(*, zone: Optional[str] = None, order_by: Optional[ListPatRulesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, gateway_ids: Optional[List[str]] = None, private_ips: Optional[List[str]] = None, protocol: Optional[PatRuleProtocol] = None) List[PatRule]
List PAT rules. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: PAT rules per page. :param gateway_ids: Filter for PAT rules on these gateways. :param private_ips: Filter for PAT rules targeting these private ips. :param protocol: Filter for PAT rules with this protocol. :return:
List[PatRule]
Usage:
result = api.list_pat_rules_all()
- refresh_ssh_keys(*, gateway_id: str, zone: Optional[str] = None) Gateway
Refresh a Public Gateway’s SSH keys. 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. :param gateway_id: ID of the gateway to refresh SSH keys on. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.refresh_ssh_keys( gateway_id="example", )
- set_pat_rules(*, gateway_id: str, pat_rules: List[SetPatRulesRequestRule], zone: Optional[str] = None) SetPatRulesResponse
Set all PAT rules. 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. :param gateway_id: ID of the gateway on which to set the PAT rules. :param pat_rules: New list of PAT rules. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
SetPatRulesResponse
Usage:
result = api.set_pat_rules( gateway_id="example", pat_rules=[], )
- update_gateway(*, gateway_id: str, zone: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, enable_bastion: Optional[bool] = None, bastion_port: Optional[int] = None, enable_smtp: Optional[bool] = None) Gateway
Update a Public Gateway. Update the parameters of an existing Public Gateway, for example, its name, tags, SSH bastion configuration, and DNS servers. :param gateway_id: ID of the gateway to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name for the gateway. :param tags: Tags for the gateway. :param enable_bastion: Defines whether SSH bastion should be enabled the gateway. :param bastion_port: Port of the SSH bastion. :param enable_smtp: Defines whether SMTP traffic should be allowed to pass through the gateway. :return:
Gateway
Usage:
result = api.update_gateway( gateway_id="example", )
- update_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None, enable_masquerade: Optional[bool] = None, push_default_route: Optional[bool] = None, ipam_ip_id: Optional[str] = None) GatewayNetwork
Update a Public Gateway’s connection to a Private Network. Update the configuration parameters of a connection between a given Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable parameters include whether to enable traffic masquerade (dynamic NAT). :param gateway_network_id: ID of the GatewayNetwork to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param enable_masquerade: Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. :param push_default_route: Enabling the default route also enables masquerading. :param ipam_ip_id: Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network. :return:
GatewayNetwork
Usage:
result = api.update_gateway_network( gateway_network_id="example", )
- update_ip(*, ip_id: str, zone: Optional[str] = None, tags: Optional[List[str]] = None, reverse: Optional[str] = None, gateway_id: Optional[str] = None) IP
Update an IP. Update details of an existing flexible IP address, including its tags, reverse and the Public Gateway it is assigned to. :param ip_id: ID of the IP address to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Tags to give to the IP address. :param reverse: Reverse to set on the address. Empty string to unset. :param gateway_id: Gateway to attach the IP address to. Empty string to detach. :return:
IP
Usage:
result = api.update_ip( ip_id="example", )
- update_pat_rule(*, pat_rule_id: str, zone: Optional[str] = None, public_port: Optional[int] = None, private_ip: Optional[str] = None, private_port: Optional[int] = None, protocol: Optional[PatRuleProtocol] = None) PatRule
Update a PAT rule. 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. :param pat_rule_id: ID of the PAT rule to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param public_port: Public port to listen on. :param private_ip: Private IP to forward data to. :param private_port: Private port to translate to. :param protocol: Protocol the rule should apply to. :return:
PatRule
Usage:
result = api.update_pat_rule( pat_rule_id="example", )
- upgrade_gateway(*, gateway_id: str, zone: Optional[str] = None, type_: Optional[str] = None) Gateway
Upgrade a Public Gateway to the latest version and/or to a different commercial offer type. 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. :param gateway_id: ID of the gateway to upgrade. :param zone: Zone to target. If none is passed will use default zone from the config. :param type_: Gateway type (commercial offer). :return:
Gateway
Usage:
result = api.upgrade_gateway( gateway_id="example", )
- wait_for_gateway(*, gateway_id: str, zone: Optional[str] = None, options: Optional[WaitForOptions[Gateway, bool]] = None) Gateway
Get a Public Gateway. 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. :param gateway_id: ID of the gateway to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.get_gateway( gateway_id="example", )
- wait_for_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None, options: Optional[WaitForOptions[GatewayNetwork, bool]] = None) GatewayNetwork
Get a Public Gateway connection to a Private Network. 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. :param gateway_network_id: ID of the GatewayNetwork to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
GatewayNetwork
Usage:
result = api.get_gateway_network( gateway_network_id="example", )
scaleway.vpcgw.v2.content module
- scaleway.vpcgw.v2.content.GATEWAY_NETWORK_TRANSIENT_STATUSES: List[GatewayNetworkStatus] = [<GatewayNetworkStatus.ATTACHING: 'attaching'>, <GatewayNetworkStatus.CONFIGURING: 'configuring'>, <GatewayNetworkStatus.DETACHING: 'detaching'>]
Lists transient statutes of the enum
GatewayNetworkStatus
.
- scaleway.vpcgw.v2.content.GATEWAY_TRANSIENT_STATUSES: List[GatewayStatus] = [<GatewayStatus.ALLOCATING: 'allocating'>, <GatewayStatus.CONFIGURING: 'configuring'>, <GatewayStatus.STOPPING: 'stopping'>, <GatewayStatus.DELETING: 'deleting'>]
Lists transient statutes of the enum
GatewayStatus
.
scaleway.vpcgw.v2.marshalling module
- scaleway.vpcgw.v2.marshalling.marshal_CreateGatewayNetworkRequest(request: CreateGatewayNetworkRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_CreateGatewayRequest(request: CreateGatewayRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_CreateIPRequest(request: CreateIPRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_CreatePatRuleRequest(request: CreatePatRuleRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_SetPatRulesRequest(request: SetPatRulesRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_SetPatRulesRequestRule(request: SetPatRulesRequestRule, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_UpdateGatewayNetworkRequest(request: UpdateGatewayNetworkRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_UpdateGatewayRequest(request: UpdateGatewayRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_UpdateIPRequest(request: UpdateIPRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_UpdatePatRuleRequest(request: UpdatePatRuleRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.marshal_UpgradeGatewayRequest(request: UpgradeGatewayRequest, defaults: ProfileDefaults) Dict[str, Any]
- scaleway.vpcgw.v2.marshalling.unmarshal_GatewayNetwork(data: Any) GatewayNetwork
- scaleway.vpcgw.v2.marshalling.unmarshal_GatewayType(data: Any) GatewayType
- scaleway.vpcgw.v2.marshalling.unmarshal_ListGatewayNetworksResponse(data: Any) ListGatewayNetworksResponse
- scaleway.vpcgw.v2.marshalling.unmarshal_ListGatewayTypesResponse(data: Any) ListGatewayTypesResponse
- scaleway.vpcgw.v2.marshalling.unmarshal_ListGatewaysResponse(data: Any) ListGatewaysResponse
- scaleway.vpcgw.v2.marshalling.unmarshal_ListIPsResponse(data: Any) ListIPsResponse
- scaleway.vpcgw.v2.marshalling.unmarshal_ListPatRulesResponse(data: Any) ListPatRulesResponse
- scaleway.vpcgw.v2.marshalling.unmarshal_SetPatRulesResponse(data: Any) SetPatRulesResponse
scaleway.vpcgw.v2.types module
- class scaleway.vpcgw.v2.types.CreateGatewayNetworkRequest(gateway_id: 'str', private_network_id: 'str', enable_masquerade: 'bool', push_default_route: 'bool', zone: 'Optional[Zone]', ipam_ip_id: 'Optional[str]')
Bases:
object
- enable_masquerade: bool
Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
- gateway_id: str
Public Gateway to connect.
- ipam_ip_id: Optional[str]
Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network.
- private_network_id: str
Private Network to connect.
- push_default_route: bool
Enabling the default route also enables masquerading.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.CreateGatewayRequest(type_: 'str', enable_smtp: 'bool', enable_bastion: 'bool', zone: 'Optional[Zone]', project_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]', ip_id: 'Optional[str]', bastion_port: 'Optional[int]')
Bases:
object
- bastion_port: Optional[int]
Port of the SSH bastion.
- enable_bastion: bool
Defines whether SSH bastion should be enabled the gateway.
- enable_smtp: bool
Defines whether SMTP traffic should be allowed pass through the gateway.
- ip_id: Optional[str]
Existing IP address to attach to the gateway.
- name: Optional[str]
Name for the gateway.
- project_id: Optional[str]
Scaleway Project to create the gateway in.
- tags: Optional[List[str]]
Tags for the gateway.
- type_: str
Gateway type (commercial offer type).
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.CreateIPRequest(zone: 'Optional[Zone]', project_id: 'Optional[str]', tags: 'Optional[List[str]]')
Bases:
object
- project_id: Optional[str]
Project to create the IP address in.
- tags: Optional[List[str]]
Tags to give to the IP address.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.CreatePatRuleRequest(gateway_id: 'str', public_port: 'int', private_ip: 'str', private_port: 'int', zone: 'Optional[Zone]', protocol: 'Optional[PatRuleProtocol]')
Bases:
object
- gateway_id: str
ID of the Gateway on which to create the rule.
- private_ip: str
Private IP to forward data to.
- private_port: int
Private port to translate to.
- protocol: Optional[PatRuleProtocol]
Protocol the rule should apply to.
- public_port: int
Public port to listen on.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.DeleteGatewayNetworkRequest(gateway_network_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_network_id: str
ID of the GatewayNetwork to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.DeleteGatewayRequest(gateway_id: 'str', delete_ip: 'bool', zone: 'Optional[Zone]')
Bases:
object
- delete_ip: bool
Defines whether the PGW’s IP should be deleted.
- gateway_id: str
ID of the gateway to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.DeleteIPRequest(ip_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- ip_id: str
ID of the IP address to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.DeletePatRuleRequest(pat_rule_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- pat_rule_id: str
ID of the PAT rule to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.Gateway(id: 'str', organization_id: 'str', project_id: 'str', type_: 'str', bandwidth: 'int', status: 'GatewayStatus', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', name: 'str', tags: 'List[str]', gateway_networks: 'List[GatewayNetwork]', bastion_enabled: 'bool', bastion_port: 'int', smtp_enabled: 'bool', is_legacy: 'bool', zone: 'Zone', ipv4: 'Optional[IP]', version: 'Optional[str]', can_upgrade_to: 'Optional[str]')
Bases:
object
- bandwidth: int
Bandwidth available of the gateway.
- bastion_enabled: bool
Defines whether SSH bastion is enabled on the gateway.
- bastion_port: int
Port of the SSH bastion.
- can_upgrade_to: Optional[str]
Newly available gateway software version that can be updated to.
- created_at: Optional[datetime]
Gateway creation date.
- gateway_networks: List[GatewayNetwork]
GatewayNetwork objects attached to the gateway (each one represents a connection to a Private Network).
- id: str
ID of the gateway.
- is_legacy: bool
Defines whether the gateway uses non-IPAM IP configurations.
- name: str
Name of the gateway.
- organization_id: str
Owning Organization.
- project_id: str
Owning Project.
- smtp_enabled: bool
Defines whether SMTP traffic is allowed to pass through the gateway.
- status: GatewayStatus
Current status of the gateway.
- tags: List[str]
Tags associated with the gateway.
- type_: str
Gateway type name (commercial offer).
- updated_at: Optional[datetime]
Gateway last modification date.
- version: Optional[str]
Version of the running gateway software.
- zone: str
Zone of the gateway.
- class scaleway.vpcgw.v2.types.GatewayNetwork(id: 'str', gateway_id: 'str', private_network_id: 'str', masquerade_enabled: 'bool', status: 'GatewayNetworkStatus', push_default_route: 'bool', ipam_ip_id: 'str', zone: 'Zone', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', mac_address: 'Optional[str]')
Bases:
object
- created_at: Optional[datetime]
Connection creation date.
- gateway_id: str
ID of the connected Public Gateway.
- id: str
ID of the Public Gateway-Private Network connection.
- ipam_ip_id: str
Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network.
- mac_address: Optional[str]
MAC address of the gateway in the Private Network (if the gateway is up and running).
- masquerade_enabled: bool
Defines whether the gateway masquerades traffic for this Private Network (Dynamic NAT).
- private_network_id: str
ID of the connected Private Network.
- push_default_route: bool
Enabling the default route also enables masquerading.
- status: GatewayNetworkStatus
Current status of the Public Gateway’s connection to the Private Network.
- updated_at: Optional[datetime]
Connection last modification date.
- zone: str
Zone of the GatewayNetwork connection.
- class scaleway.vpcgw.v2.types.GatewayNetworkStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ATTACHING = 'attaching'
- CONFIGURING = 'configuring'
- CREATED = 'created'
- DETACHING = 'detaching'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.vpcgw.v2.types.GatewayStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ALLOCATING = 'allocating'
- CONFIGURING = 'configuring'
- DELETING = 'deleting'
- FAILED = 'failed'
- LOCKED = 'locked'
- RUNNING = 'running'
- STOPPED = 'stopped'
- STOPPING = 'stopping'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.vpcgw.v2.types.GatewayType(name: 'str', bandwidth: 'int', zone: 'Zone')
Bases:
object
- bandwidth: int
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.
- name: str
Public Gateway type name.
- zone: str
Zone the Public Gateway type is available in.
- class scaleway.vpcgw.v2.types.GetGatewayNetworkRequest(gateway_network_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_network_id: str
ID of the GatewayNetwork to fetch.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.GetGatewayRequest(gateway_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_id: str
ID of the gateway to fetch.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.GetIPRequest(ip_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- ip_id: str
ID of the IP address to get.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.GetPatRuleRequest(pat_rule_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- pat_rule_id: str
ID of the PAT rule to get.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.IP(id: 'str', organization_id: 'str', project_id: 'str', tags: 'List[str]', address: 'str', zone: 'Zone', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', reverse: 'Optional[str]', gateway_id: 'Optional[str]')
Bases:
object
- address: str
The IP address itself.
- created_at: Optional[datetime]
IP address creation date.
- gateway_id: Optional[str]
Public Gateway associated with the IP address.
- id: str
IP address ID.
- organization_id: str
Owning Organization.
- project_id: str
Owning Project.
- reverse: Optional[str]
Reverse domain name for the IP address.
- tags: List[str]
Tags associated with the IP address.
- updated_at: Optional[datetime]
IP address last modification date.
- zone: str
Zone of the IP address.
- class scaleway.vpcgw.v2.types.ListGatewayNetworksRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListGatewayNetworksRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', status: 'Optional[List[GatewayNetworkStatus]]', gateway_ids: 'Optional[List[str]]', private_network_ids: 'Optional[List[str]]', masquerade_enabled: 'Optional[bool]')
Bases:
object
- gateway_ids: Optional[List[str]]
Filter for GatewayNetworks connected to these gateways.
- masquerade_enabled: Optional[bool]
Filter for GatewayNetworks with this enable_masquerade setting.
- order_by: Optional[ListGatewayNetworksRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number.
- page_size: Optional[int]
GatewayNetworks per page.
- private_network_ids: Optional[List[str]]
Filter for GatewayNetworks connected to these Private Networks.
- status: Optional[List[GatewayNetworkStatus]]
Filter for GatewayNetworks with these status. Use unknown to include all statuses.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.ListGatewayNetworksRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- STATUS_ASC = 'status_asc'
- STATUS_DESC = 'status_desc'
- class scaleway.vpcgw.v2.types.ListGatewayNetworksResponse(gateway_networks: 'List[GatewayNetwork]', total_count: 'int')
Bases:
object
- gateway_networks: List[GatewayNetwork]
GatewayNetworks on this page.
- total_count: int
Total GatewayNetworks count matching the filter.
- class scaleway.vpcgw.v2.types.ListGatewayTypesRequest(zone: 'Optional[Zone]')
Bases:
object
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.ListGatewayTypesResponse(types: 'List[GatewayType]')
Bases:
object
- types: List[GatewayType]
Available types of Public Gateway.
- class scaleway.vpcgw.v2.types.ListGatewaysRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListGatewaysRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', project_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]', types: 'Optional[List[str]]', status: 'Optional[List[GatewayStatus]]', private_network_ids: 'Optional[List[str]]', include_legacy: 'Optional[bool]')
Bases:
object
- include_legacy: Optional[bool]
Include also legacy gateways.
- name: Optional[str]
Filter for gateways which have this search term in their name.
- order_by: Optional[ListGatewaysRequestOrderBy]
Order in which to return results.
- organization_id: Optional[str]
Include only gateways in this Organization.
- page: Optional[int]
Page number to return.
- page_size: Optional[int]
Gateways per page.
- private_network_ids: Optional[List[str]]
Filter for gateways attached to these Private Networks.
- project_id: Optional[str]
Include only gateways in this Project.
- status: Optional[List[GatewayStatus]]
Filter for gateways with these status. Use unknown to include all statuses.
- tags: Optional[List[str]]
Filter for gateways with these tags.
- types: Optional[List[str]]
Filter for gateways of these types.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.ListGatewaysRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- STATUS_ASC = 'status_asc'
- STATUS_DESC = 'status_desc'
- TYPE_ASC = 'type_asc'
- TYPE_DESC = 'type_desc'
- class scaleway.vpcgw.v2.types.ListGatewaysResponse(gateways: 'List[Gateway]', total_count: 'int')
Bases:
object
- total_count: int
Total count of gateways matching the filter.
- class scaleway.vpcgw.v2.types.ListIPsRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListIPsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', project_id: 'Optional[str]', tags: 'Optional[List[str]]', reverse: 'Optional[str]', is_free: 'Optional[bool]')
Bases:
object
- is_free: Optional[bool]
Filter based on whether the IP is attached to a gateway or not.
- order_by: Optional[ListIPsRequestOrderBy]
Order in which to return results.
- organization_id: Optional[str]
Include only gateways in this Organization.
- page: Optional[int]
Page number.
- page_size: Optional[int]
IP addresses per page.
- project_id: Optional[str]
Filter for IP addresses in this Project.
- reverse: Optional[str]
Filter for IP addresses that have a reverse containing this string.
- tags: Optional[List[str]]
Filter for IP addresses with these tags.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.ListIPsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ADDRESS_ASC = 'address_asc'
- ADDRESS_DESC = 'address_desc'
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- REVERSE_ASC = 'reverse_asc'
- REVERSE_DESC = 'reverse_desc'
- class scaleway.vpcgw.v2.types.ListIPsResponse(ips: 'List[IP]', total_count: 'int')
Bases:
object
- total_count: int
Total count of IP addresses matching the filter.
- class scaleway.vpcgw.v2.types.ListPatRulesRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListPatRulesRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', gateway_ids: 'Optional[List[str]]', private_ips: 'Optional[List[str]]', protocol: 'Optional[PatRuleProtocol]')
Bases:
object
- gateway_ids: Optional[List[str]]
Filter for PAT rules on these gateways.
- order_by: Optional[ListPatRulesRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number.
- page_size: Optional[int]
PAT rules per page.
- private_ips: Optional[List[str]]
Filter for PAT rules targeting these private ips.
- protocol: Optional[PatRuleProtocol]
Filter for PAT rules with this protocol.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.ListPatRulesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- PUBLIC_PORT_ASC = 'public_port_asc'
- PUBLIC_PORT_DESC = 'public_port_desc'
- class scaleway.vpcgw.v2.types.ListPatRulesResponse(pat_rules: 'List[PatRule]', total_count: 'int')
Bases:
object
- total_count: int
Total count of PAT rules matching the filter.
- class scaleway.vpcgw.v2.types.PatRule(id: 'str', gateway_id: 'str', public_port: 'int', private_ip: 'str', private_port: 'int', protocol: 'PatRuleProtocol', zone: 'Zone', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')
Bases:
object
- created_at: Optional[datetime]
PAT rule creation date.
- gateway_id: str
Gateway the PAT rule applies to.
- id: str
PAT rule ID.
- private_ip: str
Private IP address to forward data to.
- private_port: int
Private port to translate to.
- protocol: PatRuleProtocol
Protocol the rule applies to.
- public_port: int
Public port to listen on.
- updated_at: Optional[datetime]
PAT rule last modification date.
- zone: str
Zone of the PAT rule.
- class scaleway.vpcgw.v2.types.PatRuleProtocol(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- BOTH = 'both'
- TCP = 'tcp'
- UDP = 'udp'
- UNKNOWN_PROTOCOL = 'unknown_protocol'
- class scaleway.vpcgw.v2.types.RefreshSSHKeysRequest(gateway_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_id: str
ID of the gateway to refresh SSH keys on.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.SetPatRulesRequest(gateway_id: 'str', pat_rules: 'List[SetPatRulesRequestRule]', zone: 'Optional[Zone]')
Bases:
object
- gateway_id: str
ID of the gateway on which to set the PAT rules.
- pat_rules: List[SetPatRulesRequestRule]
New list of PAT rules.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.SetPatRulesRequestRule(public_port: 'int', private_ip: 'str', private_port: 'int', protocol: 'PatRuleProtocol')
Bases:
object
- private_ip: str
Private IP to forward data to.
- private_port: int
Private port to translate to.
- protocol: PatRuleProtocol
Protocol the rule should apply to.
- public_port: int
Public port to listen on. Uniquely identifies the rule, and a matching rule will be updated with the new parameters.
- class scaleway.vpcgw.v2.types.SetPatRulesResponse(pat_rules: 'List[PatRule]')
Bases:
object
- class scaleway.vpcgw.v2.types.UpdateGatewayNetworkRequest(gateway_network_id: 'str', zone: 'Optional[Zone]', enable_masquerade: 'Optional[bool]', push_default_route: 'Optional[bool]', ipam_ip_id: 'Optional[str]')
Bases:
object
- enable_masquerade: Optional[bool]
Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
- gateway_network_id: str
ID of the GatewayNetwork to update.
- ipam_ip_id: Optional[str]
Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network.
- push_default_route: Optional[bool]
Enabling the default route also enables masquerading.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.UpdateGatewayRequest(gateway_id: 'str', zone: 'Optional[Zone]', name: 'Optional[str]', tags: 'Optional[List[str]]', enable_bastion: 'Optional[bool]', bastion_port: 'Optional[int]', enable_smtp: 'Optional[bool]')
Bases:
object
- bastion_port: Optional[int]
Port of the SSH bastion.
- enable_bastion: Optional[bool]
Defines whether SSH bastion should be enabled the gateway.
- enable_smtp: Optional[bool]
Defines whether SMTP traffic should be allowed to pass through the gateway.
- gateway_id: str
ID of the gateway to update.
- name: Optional[str]
Name for the gateway.
- tags: Optional[List[str]]
Tags for the gateway.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.UpdateIPRequest(ip_id: 'str', zone: 'Optional[Zone]', tags: 'Optional[List[str]]', reverse: 'Optional[str]', gateway_id: 'Optional[str]')
Bases:
object
- gateway_id: Optional[str]
Gateway to attach the IP address to. Empty string to detach.
- ip_id: str
ID of the IP address to update.
- reverse: Optional[str]
Reverse to set on the address. Empty string to unset.
- tags: Optional[List[str]]
Tags to give to the IP address.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.UpdatePatRuleRequest(pat_rule_id: 'str', zone: 'Optional[Zone]', public_port: 'Optional[int]', private_ip: 'Optional[str]', private_port: 'Optional[int]', protocol: 'Optional[PatRuleProtocol]')
Bases:
object
- pat_rule_id: str
ID of the PAT rule to update.
- private_ip: Optional[str]
Private IP to forward data to.
- private_port: Optional[int]
Private port to translate to.
- protocol: Optional[PatRuleProtocol]
Protocol the rule should apply to.
- public_port: Optional[int]
Public port to listen on.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.types.UpgradeGatewayRequest(gateway_id: 'str', zone: 'Optional[Zone]', type_: 'Optional[str]')
Bases:
object
- gateway_id: str
ID of the gateway to upgrade.
- type_: Optional[str]
Gateway type (commercial offer).
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
Module contents
- class scaleway.vpcgw.v2.CreateGatewayNetworkRequest(gateway_id: 'str', private_network_id: 'str', enable_masquerade: 'bool', push_default_route: 'bool', zone: 'Optional[Zone]', ipam_ip_id: 'Optional[str]')
Bases:
object
- enable_masquerade: bool
Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
- gateway_id: str
Public Gateway to connect.
- ipam_ip_id: Optional[str]
Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network.
- private_network_id: str
Private Network to connect.
- push_default_route: bool
Enabling the default route also enables masquerading.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.CreateGatewayRequest(type_: 'str', enable_smtp: 'bool', enable_bastion: 'bool', zone: 'Optional[Zone]', project_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]', ip_id: 'Optional[str]', bastion_port: 'Optional[int]')
Bases:
object
- bastion_port: Optional[int]
Port of the SSH bastion.
- enable_bastion: bool
Defines whether SSH bastion should be enabled the gateway.
- enable_smtp: bool
Defines whether SMTP traffic should be allowed pass through the gateway.
- ip_id: Optional[str]
Existing IP address to attach to the gateway.
- name: Optional[str]
Name for the gateway.
- project_id: Optional[str]
Scaleway Project to create the gateway in.
- tags: Optional[List[str]]
Tags for the gateway.
- type_: str
Gateway type (commercial offer type).
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.CreateIPRequest(zone: 'Optional[Zone]', project_id: 'Optional[str]', tags: 'Optional[List[str]]')
Bases:
object
- project_id: Optional[str]
Project to create the IP address in.
- tags: Optional[List[str]]
Tags to give to the IP address.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.CreatePatRuleRequest(gateway_id: 'str', public_port: 'int', private_ip: 'str', private_port: 'int', zone: 'Optional[Zone]', protocol: 'Optional[PatRuleProtocol]')
Bases:
object
- gateway_id: str
ID of the Gateway on which to create the rule.
- private_ip: str
Private IP to forward data to.
- private_port: int
Private port to translate to.
- protocol: Optional[PatRuleProtocol]
Protocol the rule should apply to.
- public_port: int
Public port to listen on.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.DeleteGatewayNetworkRequest(gateway_network_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_network_id: str
ID of the GatewayNetwork to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.DeleteGatewayRequest(gateway_id: 'str', delete_ip: 'bool', zone: 'Optional[Zone]')
Bases:
object
- delete_ip: bool
Defines whether the PGW’s IP should be deleted.
- gateway_id: str
ID of the gateway to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.DeleteIPRequest(ip_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- ip_id: str
ID of the IP address to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.DeletePatRuleRequest(pat_rule_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- pat_rule_id: str
ID of the PAT rule to delete.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.Gateway(id: 'str', organization_id: 'str', project_id: 'str', type_: 'str', bandwidth: 'int', status: 'GatewayStatus', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', name: 'str', tags: 'List[str]', gateway_networks: 'List[GatewayNetwork]', bastion_enabled: 'bool', bastion_port: 'int', smtp_enabled: 'bool', is_legacy: 'bool', zone: 'Zone', ipv4: 'Optional[IP]', version: 'Optional[str]', can_upgrade_to: 'Optional[str]')
Bases:
object
- bandwidth: int
Bandwidth available of the gateway.
- bastion_enabled: bool
Defines whether SSH bastion is enabled on the gateway.
- bastion_port: int
Port of the SSH bastion.
- can_upgrade_to: Optional[str]
Newly available gateway software version that can be updated to.
- created_at: Optional[datetime]
Gateway creation date.
- gateway_networks: List[GatewayNetwork]
GatewayNetwork objects attached to the gateway (each one represents a connection to a Private Network).
- id: str
ID of the gateway.
- is_legacy: bool
Defines whether the gateway uses non-IPAM IP configurations.
- name: str
Name of the gateway.
- organization_id: str
Owning Organization.
- project_id: str
Owning Project.
- smtp_enabled: bool
Defines whether SMTP traffic is allowed to pass through the gateway.
- status: GatewayStatus
Current status of the gateway.
- tags: List[str]
Tags associated with the gateway.
- type_: str
Gateway type name (commercial offer).
- updated_at: Optional[datetime]
Gateway last modification date.
- version: Optional[str]
Version of the running gateway software.
- zone: str
Zone of the gateway.
- class scaleway.vpcgw.v2.GatewayNetwork(id: 'str', gateway_id: 'str', private_network_id: 'str', masquerade_enabled: 'bool', status: 'GatewayNetworkStatus', push_default_route: 'bool', ipam_ip_id: 'str', zone: 'Zone', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', mac_address: 'Optional[str]')
Bases:
object
- created_at: Optional[datetime]
Connection creation date.
- gateway_id: str
ID of the connected Public Gateway.
- id: str
ID of the Public Gateway-Private Network connection.
- ipam_ip_id: str
Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network.
- mac_address: Optional[str]
MAC address of the gateway in the Private Network (if the gateway is up and running).
- masquerade_enabled: bool
Defines whether the gateway masquerades traffic for this Private Network (Dynamic NAT).
- private_network_id: str
ID of the connected Private Network.
- push_default_route: bool
Enabling the default route also enables masquerading.
- status: GatewayNetworkStatus
Current status of the Public Gateway’s connection to the Private Network.
- updated_at: Optional[datetime]
Connection last modification date.
- zone: str
Zone of the GatewayNetwork connection.
- class scaleway.vpcgw.v2.GatewayNetworkStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ATTACHING = 'attaching'
- CONFIGURING = 'configuring'
- CREATED = 'created'
- DETACHING = 'detaching'
- READY = 'ready'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.vpcgw.v2.GatewayStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ALLOCATING = 'allocating'
- CONFIGURING = 'configuring'
- DELETING = 'deleting'
- FAILED = 'failed'
- LOCKED = 'locked'
- RUNNING = 'running'
- STOPPED = 'stopped'
- STOPPING = 'stopping'
- UNKNOWN_STATUS = 'unknown_status'
- class scaleway.vpcgw.v2.GatewayType(name: 'str', bandwidth: 'int', zone: 'Zone')
Bases:
object
- bandwidth: int
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.
- name: str
Public Gateway type name.
- zone: str
Zone the Public Gateway type is available in.
- class scaleway.vpcgw.v2.GetGatewayNetworkRequest(gateway_network_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_network_id: str
ID of the GatewayNetwork to fetch.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.GetGatewayRequest(gateway_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_id: str
ID of the gateway to fetch.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.GetIPRequest(ip_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- ip_id: str
ID of the IP address to get.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.GetPatRuleRequest(pat_rule_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- pat_rule_id: str
ID of the PAT rule to get.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.IP(id: 'str', organization_id: 'str', project_id: 'str', tags: 'List[str]', address: 'str', zone: 'Zone', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', reverse: 'Optional[str]', gateway_id: 'Optional[str]')
Bases:
object
- address: str
The IP address itself.
- created_at: Optional[datetime]
IP address creation date.
- gateway_id: Optional[str]
Public Gateway associated with the IP address.
- id: str
IP address ID.
- organization_id: str
Owning Organization.
- project_id: str
Owning Project.
- reverse: Optional[str]
Reverse domain name for the IP address.
- tags: List[str]
Tags associated with the IP address.
- updated_at: Optional[datetime]
IP address last modification date.
- zone: str
Zone of the IP address.
- class scaleway.vpcgw.v2.ListGatewayNetworksRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListGatewayNetworksRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', status: 'Optional[List[GatewayNetworkStatus]]', gateway_ids: 'Optional[List[str]]', private_network_ids: 'Optional[List[str]]', masquerade_enabled: 'Optional[bool]')
Bases:
object
- gateway_ids: Optional[List[str]]
Filter for GatewayNetworks connected to these gateways.
- masquerade_enabled: Optional[bool]
Filter for GatewayNetworks with this enable_masquerade setting.
- order_by: Optional[ListGatewayNetworksRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number.
- page_size: Optional[int]
GatewayNetworks per page.
- private_network_ids: Optional[List[str]]
Filter for GatewayNetworks connected to these Private Networks.
- status: Optional[List[GatewayNetworkStatus]]
Filter for GatewayNetworks with these status. Use unknown to include all statuses.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.ListGatewayNetworksRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- STATUS_ASC = 'status_asc'
- STATUS_DESC = 'status_desc'
- class scaleway.vpcgw.v2.ListGatewayNetworksResponse(gateway_networks: 'List[GatewayNetwork]', total_count: 'int')
Bases:
object
- gateway_networks: List[GatewayNetwork]
GatewayNetworks on this page.
- total_count: int
Total GatewayNetworks count matching the filter.
- class scaleway.vpcgw.v2.ListGatewayTypesRequest(zone: 'Optional[Zone]')
Bases:
object
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.ListGatewayTypesResponse(types: 'List[GatewayType]')
Bases:
object
- types: List[GatewayType]
Available types of Public Gateway.
- class scaleway.vpcgw.v2.ListGatewaysRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListGatewaysRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', project_id: 'Optional[str]', name: 'Optional[str]', tags: 'Optional[List[str]]', types: 'Optional[List[str]]', status: 'Optional[List[GatewayStatus]]', private_network_ids: 'Optional[List[str]]', include_legacy: 'Optional[bool]')
Bases:
object
- include_legacy: Optional[bool]
Include also legacy gateways.
- name: Optional[str]
Filter for gateways which have this search term in their name.
- order_by: Optional[ListGatewaysRequestOrderBy]
Order in which to return results.
- organization_id: Optional[str]
Include only gateways in this Organization.
- page: Optional[int]
Page number to return.
- page_size: Optional[int]
Gateways per page.
- private_network_ids: Optional[List[str]]
Filter for gateways attached to these Private Networks.
- project_id: Optional[str]
Include only gateways in this Project.
- status: Optional[List[GatewayStatus]]
Filter for gateways with these status. Use unknown to include all statuses.
- tags: Optional[List[str]]
Filter for gateways with these tags.
- types: Optional[List[str]]
Filter for gateways of these types.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.ListGatewaysRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- NAME_ASC = 'name_asc'
- NAME_DESC = 'name_desc'
- STATUS_ASC = 'status_asc'
- STATUS_DESC = 'status_desc'
- TYPE_ASC = 'type_asc'
- TYPE_DESC = 'type_desc'
- class scaleway.vpcgw.v2.ListGatewaysResponse(gateways: 'List[Gateway]', total_count: 'int')
Bases:
object
- total_count: int
Total count of gateways matching the filter.
- class scaleway.vpcgw.v2.ListIPsRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListIPsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', organization_id: 'Optional[str]', project_id: 'Optional[str]', tags: 'Optional[List[str]]', reverse: 'Optional[str]', is_free: 'Optional[bool]')
Bases:
object
- is_free: Optional[bool]
Filter based on whether the IP is attached to a gateway or not.
- order_by: Optional[ListIPsRequestOrderBy]
Order in which to return results.
- organization_id: Optional[str]
Include only gateways in this Organization.
- page: Optional[int]
Page number.
- page_size: Optional[int]
IP addresses per page.
- project_id: Optional[str]
Filter for IP addresses in this Project.
- reverse: Optional[str]
Filter for IP addresses that have a reverse containing this string.
- tags: Optional[List[str]]
Filter for IP addresses with these tags.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.ListIPsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- ADDRESS_ASC = 'address_asc'
- ADDRESS_DESC = 'address_desc'
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- REVERSE_ASC = 'reverse_asc'
- REVERSE_DESC = 'reverse_desc'
- class scaleway.vpcgw.v2.ListIPsResponse(ips: 'List[IP]', total_count: 'int')
Bases:
object
- total_count: int
Total count of IP addresses matching the filter.
- class scaleway.vpcgw.v2.ListPatRulesRequest(zone: 'Optional[Zone]', order_by: 'Optional[ListPatRulesRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', gateway_ids: 'Optional[List[str]]', private_ips: 'Optional[List[str]]', protocol: 'Optional[PatRuleProtocol]')
Bases:
object
- gateway_ids: Optional[List[str]]
Filter for PAT rules on these gateways.
- order_by: Optional[ListPatRulesRequestOrderBy]
Order in which to return results.
- page: Optional[int]
Page number.
- page_size: Optional[int]
PAT rules per page.
- private_ips: Optional[List[str]]
Filter for PAT rules targeting these private ips.
- protocol: Optional[PatRuleProtocol]
Filter for PAT rules with this protocol.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.ListPatRulesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- CREATED_AT_ASC = 'created_at_asc'
- CREATED_AT_DESC = 'created_at_desc'
- PUBLIC_PORT_ASC = 'public_port_asc'
- PUBLIC_PORT_DESC = 'public_port_desc'
- class scaleway.vpcgw.v2.ListPatRulesResponse(pat_rules: 'List[PatRule]', total_count: 'int')
Bases:
object
- total_count: int
Total count of PAT rules matching the filter.
- class scaleway.vpcgw.v2.PatRule(id: 'str', gateway_id: 'str', public_port: 'int', private_ip: 'str', private_port: 'int', protocol: 'PatRuleProtocol', zone: 'Zone', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')
Bases:
object
- created_at: Optional[datetime]
PAT rule creation date.
- gateway_id: str
Gateway the PAT rule applies to.
- id: str
PAT rule ID.
- private_ip: str
Private IP address to forward data to.
- private_port: int
Private port to translate to.
- protocol: PatRuleProtocol
Protocol the rule applies to.
- public_port: int
Public port to listen on.
- updated_at: Optional[datetime]
PAT rule last modification date.
- zone: str
Zone of the PAT rule.
- class scaleway.vpcgw.v2.PatRuleProtocol(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- BOTH = 'both'
- TCP = 'tcp'
- UDP = 'udp'
- UNKNOWN_PROTOCOL = 'unknown_protocol'
- class scaleway.vpcgw.v2.RefreshSSHKeysRequest(gateway_id: 'str', zone: 'Optional[Zone]')
Bases:
object
- gateway_id: str
ID of the gateway to refresh SSH keys on.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.SetPatRulesRequest(gateway_id: 'str', pat_rules: 'List[SetPatRulesRequestRule]', zone: 'Optional[Zone]')
Bases:
object
- gateway_id: str
ID of the gateway on which to set the PAT rules.
- pat_rules: List[SetPatRulesRequestRule]
New list of PAT rules.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.SetPatRulesRequestRule(public_port: 'int', private_ip: 'str', private_port: 'int', protocol: 'PatRuleProtocol')
Bases:
object
- private_ip: str
Private IP to forward data to.
- private_port: int
Private port to translate to.
- protocol: PatRuleProtocol
Protocol the rule should apply to.
- public_port: int
Public port to listen on. Uniquely identifies the rule, and a matching rule will be updated with the new parameters.
- class scaleway.vpcgw.v2.SetPatRulesResponse(pat_rules: 'List[PatRule]')
Bases:
object
- class scaleway.vpcgw.v2.UpdateGatewayNetworkRequest(gateway_network_id: 'str', zone: 'Optional[Zone]', enable_masquerade: 'Optional[bool]', push_default_route: 'Optional[bool]', ipam_ip_id: 'Optional[str]')
Bases:
object
- enable_masquerade: Optional[bool]
Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
- gateway_network_id: str
ID of the GatewayNetwork to update.
- ipam_ip_id: Optional[str]
Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network.
- push_default_route: Optional[bool]
Enabling the default route also enables masquerading.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.UpdateGatewayRequest(gateway_id: 'str', zone: 'Optional[Zone]', name: 'Optional[str]', tags: 'Optional[List[str]]', enable_bastion: 'Optional[bool]', bastion_port: 'Optional[int]', enable_smtp: 'Optional[bool]')
Bases:
object
- bastion_port: Optional[int]
Port of the SSH bastion.
- enable_bastion: Optional[bool]
Defines whether SSH bastion should be enabled the gateway.
- enable_smtp: Optional[bool]
Defines whether SMTP traffic should be allowed to pass through the gateway.
- gateway_id: str
ID of the gateway to update.
- name: Optional[str]
Name for the gateway.
- tags: Optional[List[str]]
Tags for the gateway.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.UpdateIPRequest(ip_id: 'str', zone: 'Optional[Zone]', tags: 'Optional[List[str]]', reverse: 'Optional[str]', gateway_id: 'Optional[str]')
Bases:
object
- gateway_id: Optional[str]
Gateway to attach the IP address to. Empty string to detach.
- ip_id: str
ID of the IP address to update.
- reverse: Optional[str]
Reverse to set on the address. Empty string to unset.
- tags: Optional[List[str]]
Tags to give to the IP address.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.UpdatePatRuleRequest(pat_rule_id: 'str', zone: 'Optional[Zone]', public_port: 'Optional[int]', private_ip: 'Optional[str]', private_port: 'Optional[int]', protocol: 'Optional[PatRuleProtocol]')
Bases:
object
- pat_rule_id: str
ID of the PAT rule to update.
- private_ip: Optional[str]
Private IP to forward data to.
- private_port: Optional[int]
Private port to translate to.
- protocol: Optional[PatRuleProtocol]
Protocol the rule should apply to.
- public_port: Optional[int]
Public port to listen on.
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.UpgradeGatewayRequest(gateway_id: 'str', zone: 'Optional[Zone]', type_: 'Optional[str]')
Bases:
object
- gateway_id: str
ID of the gateway to upgrade.
- type_: Optional[str]
Gateway type (commercial offer).
- zone: Optional[str]
Zone to target. If none is passed will use default zone from the config.
- class scaleway.vpcgw.v2.VpcgwV2API(client: Client, *, bypass_validation: bool = False)
Bases:
API
This API allows you to manage your Public Gateways.
- create_gateway(*, type_: str, enable_smtp: bool, enable_bastion: bool, zone: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, ip_id: Optional[str] = None, bastion_port: Optional[int] = None) Gateway
Create a Public Gateway. 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. :param type_: Gateway type (commercial offer type). :param enable_smtp: Defines whether SMTP traffic should be allowed pass through the gateway. :param enable_bastion: Defines whether SSH bastion should be enabled the gateway. :param zone: Zone to target. If none is passed will use default zone from the config. :param project_id: Scaleway Project to create the gateway in. :param name: Name for the gateway. :param tags: Tags for the gateway. :param ip_id: Existing IP address to attach to the gateway. :param bastion_port: Port of the SSH bastion. :return:
Gateway
Usage:
result = api.create_gateway( type="example", enable_smtp=False, enable_bastion=False, )
- create_gateway_network(*, gateway_id: str, private_network_id: str, enable_masquerade: bool, push_default_route: bool, zone: Optional[str] = None, ipam_ip_id: Optional[str] = None) GatewayNetwork
Attach a Public Gateway to a Private Network. Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including whether to enable masquerade (dynamic NAT), and more. :param gateway_id: Public Gateway to connect. :param private_network_id: Private Network to connect. :param enable_masquerade: Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. :param push_default_route: Enabling the default route also enables masquerading. :param zone: Zone to target. If none is passed will use default zone from the config. :param ipam_ip_id: Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network. :return:
GatewayNetwork
Usage:
result = api.create_gateway_network( gateway_id="example", private_network_id="example", enable_masquerade=False, push_default_route=False, )
- create_ip(*, zone: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None) IP
Reserve an IP. Create (reserve) a new flexible IP address that can be used for a Public Gateway in a specified Scaleway Project. :param zone: Zone to target. If none is passed will use default zone from the config. :param project_id: Project to create the IP address in. :param tags: Tags to give to the IP address. :return:
IP
Usage:
result = api.create_ip()
- create_pat_rule(*, gateway_id: str, public_port: int, private_ip: str, private_port: int, zone: Optional[str] = None, protocol: Optional[PatRuleProtocol] = None) PatRule
Create a PAT rule. 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. :param gateway_id: ID of the Gateway on which to create the rule. :param public_port: Public port to listen on. :param private_ip: Private IP to forward data to. :param private_port: Private port to translate to. :param zone: Zone to target. If none is passed will use default zone from the config. :param protocol: Protocol the rule should apply to. :return:
PatRule
Usage:
result = api.create_pat_rule( gateway_id="example", public_port=1, private_ip="example", private_port=1, )
- delete_gateway(*, gateway_id: str, delete_ip: bool, zone: Optional[str] = None) Gateway
Delete a Public Gateway. Delete an existing Public Gateway, specified by its gateway ID. This action is irreversible. :param gateway_id: ID of the gateway to delete. :param delete_ip: Defines whether the PGW’s IP should be deleted. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.delete_gateway( gateway_id="example", delete_ip=False, )
- delete_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None) GatewayNetwork
Detach a Public Gateway from a Private Network. Detach a given Public Gateway from a given Private Network, i.e. delete a GatewayNetwork specified by a gateway_network_id. :param gateway_network_id: ID of the GatewayNetwork to delete. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
GatewayNetwork
Usage:
result = api.delete_gateway_network( gateway_network_id="example", )
- delete_ip(*, ip_id: str, zone: Optional[str] = None) None
Delete an IP. Delete a flexible IP address from your account. This action is irreversible. :param ip_id: ID of the IP address to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = api.delete_ip( ip_id="example", )
- delete_pat_rule(*, pat_rule_id: str, zone: Optional[str] = None) None
Delete a PAT rule. Delete a PAT rule, identified by its PAT rule ID. This action is irreversible. :param pat_rule_id: ID of the PAT rule to delete. :param zone: Zone to target. If none is passed will use default zone from the config.
Usage:
result = api.delete_pat_rule( pat_rule_id="example", )
- get_gateway(*, gateway_id: str, zone: Optional[str] = None) Gateway
Get a Public Gateway. 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. :param gateway_id: ID of the gateway to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.get_gateway( gateway_id="example", )
- get_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None) GatewayNetwork
Get a Public Gateway connection to a Private Network. 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. :param gateway_network_id: ID of the GatewayNetwork to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
GatewayNetwork
Usage:
result = api.get_gateway_network( gateway_network_id="example", )
- get_ip(*, ip_id: str, zone: Optional[str] = None) IP
Get an IP. 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. :param ip_id: ID of the IP address to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
IP
Usage:
result = api.get_ip( ip_id="example", )
- get_pat_rule(*, pat_rule_id: str, zone: Optional[str] = None) PatRule
Get a PAT rule. 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. :param pat_rule_id: ID of the PAT rule to get. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
PatRule
Usage:
result = api.get_pat_rule( pat_rule_id="example", )
- list_gateway_networks(*, zone: Optional[str] = None, order_by: Optional[ListGatewayNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[GatewayNetworkStatus]] = None, gateway_ids: Optional[List[str]] = None, private_network_ids: Optional[List[str]] = None, masquerade_enabled: Optional[bool] = None) ListGatewayNetworksResponse
List Public Gateway connections to Private Networks. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: GatewayNetworks per page. :param status: Filter for GatewayNetworks with these status. Use unknown to include all statuses. :param gateway_ids: Filter for GatewayNetworks connected to these gateways. :param private_network_ids: Filter for GatewayNetworks connected to these Private Networks. :param masquerade_enabled: Filter for GatewayNetworks with this enable_masquerade setting. :return:
ListGatewayNetworksResponse
Usage:
result = api.list_gateway_networks()
- list_gateway_networks_all(*, zone: Optional[str] = None, order_by: Optional[ListGatewayNetworksRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, status: Optional[List[GatewayNetworkStatus]] = None, gateway_ids: Optional[List[str]] = None, private_network_ids: Optional[List[str]] = None, masquerade_enabled: Optional[bool] = None) List[GatewayNetwork]
List Public Gateway connections to Private Networks. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: GatewayNetworks per page. :param status: Filter for GatewayNetworks with these status. Use unknown to include all statuses. :param gateway_ids: Filter for GatewayNetworks connected to these gateways. :param private_network_ids: Filter for GatewayNetworks connected to these Private Networks. :param masquerade_enabled: Filter for GatewayNetworks with this enable_masquerade setting. :return:
List[GatewayNetwork]
Usage:
result = api.list_gateway_networks_all()
- list_gateway_types(*, zone: Optional[str] = None) ListGatewayTypesResponse
List Public Gateway types. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
ListGatewayTypesResponse
Usage:
result = api.list_gateway_types()
- list_gateways(*, zone: Optional[str] = None, order_by: Optional[ListGatewaysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, types: Optional[List[str]] = None, status: Optional[List[GatewayStatus]] = None, private_network_ids: Optional[List[str]] = None, include_legacy: Optional[bool] = None) ListGatewaysResponse
List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number to return. :param page_size: Gateways per page. :param organization_id: Include only gateways in this Organization. :param project_id: Include only gateways in this Project. :param name: Filter for gateways which have this search term in their name. :param tags: Filter for gateways with these tags. :param types: Filter for gateways of these types. :param status: Filter for gateways with these status. Use unknown to include all statuses. :param private_network_ids: Filter for gateways attached to these Private Networks. :param include_legacy: Include also legacy gateways. :return:
ListGatewaysResponse
Usage:
result = api.list_gateways()
- list_gateways_all(*, zone: Optional[str] = None, order_by: Optional[ListGatewaysRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, types: Optional[List[str]] = None, status: Optional[List[GatewayStatus]] = None, private_network_ids: Optional[List[str]] = None, include_legacy: Optional[bool] = None) List[Gateway]
List Public Gateways. List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number to return. :param page_size: Gateways per page. :param organization_id: Include only gateways in this Organization. :param project_id: Include only gateways in this Project. :param name: Filter for gateways which have this search term in their name. :param tags: Filter for gateways with these tags. :param types: Filter for gateways of these types. :param status: Filter for gateways with these status. Use unknown to include all statuses. :param private_network_ids: Filter for gateways attached to these Private Networks. :param include_legacy: Include also legacy gateways. :return:
List[Gateway]
Usage:
result = api.list_gateways_all()
- list_i_ps(*, zone: Optional[str] = None, order_by: Optional[ListIPsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None, reverse: Optional[str] = None, is_free: Optional[bool] = None) ListIPsResponse
List IPs. List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: IP addresses per page. :param organization_id: Include only gateways in this Organization. :param project_id: Filter for IP addresses in this Project. :param tags: Filter for IP addresses with these tags. :param reverse: Filter for IP addresses that have a reverse containing this string. :param is_free: Filter based on whether the IP is attached to a gateway or not. :return:
ListIPsResponse
Usage:
result = api.list_i_ps()
- list_i_ps_all(*, zone: Optional[str] = None, order_by: Optional[ListIPsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, tags: Optional[List[str]] = None, reverse: Optional[str] = None, is_free: Optional[bool] = None) List[IP]
List IPs. List Public Gateway flexible IP addresses. A number of filter options are available for limiting results in the response. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: IP addresses per page. :param organization_id: Include only gateways in this Organization. :param project_id: Filter for IP addresses in this Project. :param tags: Filter for IP addresses with these tags. :param reverse: Filter for IP addresses that have a reverse containing this string. :param is_free: Filter based on whether the IP is attached to a gateway or not. :return:
List[IP]
Usage:
result = api.list_i_ps_all()
- list_pat_rules(*, zone: Optional[str] = None, order_by: Optional[ListPatRulesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, gateway_ids: Optional[List[str]] = None, private_ips: Optional[List[str]] = None, protocol: Optional[PatRuleProtocol] = None) ListPatRulesResponse
List PAT rules. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: PAT rules per page. :param gateway_ids: Filter for PAT rules on these gateways. :param private_ips: Filter for PAT rules targeting these private ips. :param protocol: Filter for PAT rules with this protocol. :return:
ListPatRulesResponse
Usage:
result = api.list_pat_rules()
- list_pat_rules_all(*, zone: Optional[str] = None, order_by: Optional[ListPatRulesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, gateway_ids: Optional[List[str]] = None, private_ips: Optional[List[str]] = None, protocol: Optional[PatRuleProtocol] = None) List[PatRule]
List PAT rules. 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. :param zone: Zone to target. If none is passed will use default zone from the config. :param order_by: Order in which to return results. :param page: Page number. :param page_size: PAT rules per page. :param gateway_ids: Filter for PAT rules on these gateways. :param private_ips: Filter for PAT rules targeting these private ips. :param protocol: Filter for PAT rules with this protocol. :return:
List[PatRule]
Usage:
result = api.list_pat_rules_all()
- refresh_ssh_keys(*, gateway_id: str, zone: Optional[str] = None) Gateway
Refresh a Public Gateway’s SSH keys. 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. :param gateway_id: ID of the gateway to refresh SSH keys on. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.refresh_ssh_keys( gateway_id="example", )
- set_pat_rules(*, gateway_id: str, pat_rules: List[SetPatRulesRequestRule], zone: Optional[str] = None) SetPatRulesResponse
Set all PAT rules. 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. :param gateway_id: ID of the gateway on which to set the PAT rules. :param pat_rules: New list of PAT rules. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
SetPatRulesResponse
Usage:
result = api.set_pat_rules( gateway_id="example", pat_rules=[], )
- update_gateway(*, gateway_id: str, zone: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, enable_bastion: Optional[bool] = None, bastion_port: Optional[int] = None, enable_smtp: Optional[bool] = None) Gateway
Update a Public Gateway. Update the parameters of an existing Public Gateway, for example, its name, tags, SSH bastion configuration, and DNS servers. :param gateway_id: ID of the gateway to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param name: Name for the gateway. :param tags: Tags for the gateway. :param enable_bastion: Defines whether SSH bastion should be enabled the gateway. :param bastion_port: Port of the SSH bastion. :param enable_smtp: Defines whether SMTP traffic should be allowed to pass through the gateway. :return:
Gateway
Usage:
result = api.update_gateway( gateway_id="example", )
- update_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None, enable_masquerade: Optional[bool] = None, push_default_route: Optional[bool] = None, ipam_ip_id: Optional[str] = None) GatewayNetwork
Update a Public Gateway’s connection to a Private Network. Update the configuration parameters of a connection between a given Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable parameters include whether to enable traffic masquerade (dynamic NAT). :param gateway_network_id: ID of the GatewayNetwork to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param enable_masquerade: Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork. :param push_default_route: Enabling the default route also enables masquerading. :param ipam_ip_id: Use this IPAM-booked IP ID as the Gateway’s IP in this Private Network. :return:
GatewayNetwork
Usage:
result = api.update_gateway_network( gateway_network_id="example", )
- update_ip(*, ip_id: str, zone: Optional[str] = None, tags: Optional[List[str]] = None, reverse: Optional[str] = None, gateway_id: Optional[str] = None) IP
Update an IP. Update details of an existing flexible IP address, including its tags, reverse and the Public Gateway it is assigned to. :param ip_id: ID of the IP address to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Tags to give to the IP address. :param reverse: Reverse to set on the address. Empty string to unset. :param gateway_id: Gateway to attach the IP address to. Empty string to detach. :return:
IP
Usage:
result = api.update_ip( ip_id="example", )
- update_pat_rule(*, pat_rule_id: str, zone: Optional[str] = None, public_port: Optional[int] = None, private_ip: Optional[str] = None, private_port: Optional[int] = None, protocol: Optional[PatRuleProtocol] = None) PatRule
Update a PAT rule. 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. :param pat_rule_id: ID of the PAT rule to update. :param zone: Zone to target. If none is passed will use default zone from the config. :param public_port: Public port to listen on. :param private_ip: Private IP to forward data to. :param private_port: Private port to translate to. :param protocol: Protocol the rule should apply to. :return:
PatRule
Usage:
result = api.update_pat_rule( pat_rule_id="example", )
- upgrade_gateway(*, gateway_id: str, zone: Optional[str] = None, type_: Optional[str] = None) Gateway
Upgrade a Public Gateway to the latest version and/or to a different commercial offer type. 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. :param gateway_id: ID of the gateway to upgrade. :param zone: Zone to target. If none is passed will use default zone from the config. :param type_: Gateway type (commercial offer). :return:
Gateway
Usage:
result = api.upgrade_gateway( gateway_id="example", )
- wait_for_gateway(*, gateway_id: str, zone: Optional[str] = None, options: Optional[WaitForOptions[Gateway, bool]] = None) Gateway
Get a Public Gateway. 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. :param gateway_id: ID of the gateway to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
Gateway
Usage:
result = api.get_gateway( gateway_id="example", )
- wait_for_gateway_network(*, gateway_network_id: str, zone: Optional[str] = None, options: Optional[WaitForOptions[GatewayNetwork, bool]] = None) GatewayNetwork
Get a Public Gateway connection to a Private Network. 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. :param gateway_network_id: ID of the GatewayNetwork to fetch. :param zone: Zone to target. If none is passed will use default zone from the config. :return:
GatewayNetwork
Usage:
result = api.get_gateway_network( gateway_network_id="example", )