Skip to main content

games

Creates, updates, deletes, gets or lists a games resource.

Overview​

Namegames
TypeResource
Idovh.ip.games

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
firewall_mode_enabledbooleanFirewall mode : in UDP, only allow traffic matching your rules (as well as established traffic). If not enabled, traffic to ports not defined in your rules will be permited. TCP traffic is unaffected by this. (wire: firewallModeEnabled)
ip_on_gamestring (ipv4)IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipOnGame)
max_rulesintegerMaximum number of rules for this IP (wire: maxRules)
statestringPossible values for udp mitigation rule state (cleanRulesPending, firewallModeDisablePending, firewallModeEnablePending, ok)
supported_protocolsarrayList of protocols available on this IP (wire: supportedProtocols)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, ip_on_gameGet an IP under protection. Returns the firewall mode, the supported game protocols, the maximum number of rules and the state of the Game DDoS protection.
listselectipx_pagination_modeList IPs under protection. Returns a list of all IP addresses from a given IP block object that are protected by Game DDoS protection.
updateupdateip, ip_on_gameUpdate the firewall mode. Enables or disables the firewall mode of the IP. When enabled, UDP traffic that matches no declared rule is dropped. TCP traffic is not affected.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
ipstring (ip-block)
ip_on_gamestring (ipv4) (wire: ipOnGame)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get an IP under protection. Returns the firewall mode, the supported game protocols, the maximum number of rules and the state of the Game DDoS protection.

SELECT
firewall_mode_enabled,
ip_on_game,
max_rules,
state,
supported_protocols
FROM ovh.ip.games
WHERE ip = '{{ ip }}' -- required
AND ip_on_game = '{{ ip_on_game }}' -- required
;

UPDATE examples​

Update the firewall mode. Enables or disables the firewall mode of the IP. When enabled, UDP traffic that matches no declared rule is dropped. TCP traffic is not affected.

UPDATE ovh.ip.games
SET
firewall_mode_enabled = {{ firewall_mode_enabled }}
WHERE
ip = '{{ ip }}' --required
AND ip_on_game = '{{ ip_on_game }}' --required;