Skip to main content

ingress_rules

Creates, updates, deletes, gets or lists an ingress_rules resource.

Overview

Nameingress_rules
TypeResource
Idgoogle.appengine.ingress_rules

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
actionstringThe action to take on matched requests.
descriptionstringAn optional string description of this rule. This field has a maximum length of 400 characters.
priorityinteger (int32)
sourceRangestringIP address or range, defined using CIDR notation, of requests that this rule applies to. You can use the wildcard character "*" to match all IPs equivalent to "0/0" and "::/0" together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 or 2001:0db8:0000:0042:0000:8a2e:0370:7334. Truncation will be silently performed on addresses which are not properly truncated. For example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address as 2001:db8::/32.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectappsId, ingressRulesIdGets the specified firewall rule.
listselectappsIdpageSize, pageToken, matchingAddressLists the firewall rules of an application.
createinsertappsIdCreates a firewall rule for the application.
patchupdateappsId, ingressRulesIdupdateMaskUpdates the specified firewall rule.
batch_updateupdateappsIdReplaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an "allow all" rule is explicitly added to the end of the list.
deletedeleteappsId, ingressRulesIdDeletes the specified firewall rule.

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
appsIdstring
ingressRulesIdstring
matchingAddressstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets the specified firewall rule.

SELECT
action,
description,
priority,
sourceRange
FROM google.appengine.ingress_rules
WHERE appsId = '{{ appsId }}' -- required
AND ingressRulesId = '{{ ingressRulesId }}' -- required;

INSERT examples

Creates a firewall rule for the application.

INSERT INTO google.appengine.ingress_rules (
data__priority,
data__action,
data__sourceRange,
data__description,
appsId
)
SELECT
{{ priority }},
'{{ action }}',
'{{ sourceRange }}',
'{{ description }}',
'{{ appsId }}'
RETURNING
action,
description,
priority,
sourceRange
;

UPDATE examples

Updates the specified firewall rule.

UPDATE google.appengine.ingress_rules
SET
data__priority = {{ priority }},
data__action = '{{ action }}',
data__sourceRange = '{{ sourceRange }}',
data__description = '{{ description }}'
WHERE
appsId = '{{ appsId }}' --required
AND ingressRulesId = '{{ ingressRulesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
action,
description,
priority,
sourceRange;

DELETE examples

Deletes the specified firewall rule.

DELETE FROM google.appengine.ingress_rules
WHERE appsId = '{{ appsId }}' --required
AND ingressRulesId = '{{ ingressRulesId }}' --required;