games
Creates, updates, deletes, gets or lists a games resource.
Overview​
| Name | games |
| Type | Resource |
| Id | ovh.ip.games |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
firewall_mode_enabled | boolean | Firewall 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_game | string (ipv4) | IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipOnGame) |
max_rules | integer | Maximum number of rules for this IP (wire: maxRules) |
state | string | Possible values for udp mitigation rule state (cleanRulesPending, firewallModeDisablePending, firewallModeEnablePending, ok) |
supported_protocols | array | List of protocols available on this IP (wire: supportedProtocols) |
GAME Anti-DDoS
| Name | Datatype | Description |
|---|---|---|
firewall_mode_enabled | boolean | Firewall 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_game | string (ipv4) | IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipOnGame) |
max_rules | integer | Maximum number of rules for this IP (wire: maxRules) |
state | string | Possible values for udp mitigation rule state (cleanRulesPending, firewallModeDisablePending, firewallModeEnablePending, ok) |
supported_protocols | array | List of protocols available on this IP (wire: supportedProtocols) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip, ip_on_game | 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. | |
list | select | ip | x_pagination_mode | List IPs under protection. Returns a list of all IP addresses from a given IP block object that are protected by Game DDoS protection. |
update | update | ip, ip_on_game | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
ip | string (ip-block) | |
ip_on_game | string (ipv4) | (wire: ipOnGame) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
List IPs under protection. Returns a list of all IP addresses from a given IP block object that are protected by Game DDoS protection.
SELECT
firewall_mode_enabled,
ip_on_game,
max_rules,
state,
supported_protocols
FROM ovh.ip.games
WHERE ip = '{{ ip }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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;