- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Returns the effective firewalls on a given network.
HTTP request
GET https://compute.googleapis.com/compute/beta/projects/{project}/regions/{region}/firewallPolicies/getEffectiveFirewalls
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
region |
Name of the region scoping this request. |
Query parameters
Parameters | |
---|---|
network |
Network reference Authorization requires the following IAM permission on the specified resource
|
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "firewalls": [ { "kind": string, "id": string, "creationTimestamp": string, "name": string, "description": string, "network": string, "priority": integer, "sourceRanges": [ string ], "destinationRanges": [ string ], "sourceTags": [ string ], "targetTags": [ string ], "sourceServiceAccounts": [ string ], "targetServiceAccounts": [ string ], "allowed": [ { "IPProtocol": string, "ports": [ string ] } ], "denied": [ { "IPProtocol": string, "ports": [ string ] } ], "direction": enum, "enableLogging": boolean, "logConfig": { "enable": boolean, "metadata": enum }, "disabled": boolean, "selfLink": string } ], "firewallPolicys": [ { "name": string, "type": enum, "displayName": string, "rules": [ { "kind": string, "ruleName": string, "description": string, "priority": integer, "match": { "srcIpRanges": [ string ], "destIpRanges": [ string ], "layer4Configs": [ { "ipProtocol": string, "ports": [ string ] } ], "srcSecureTags": [ { "name": string, "state": enum } ], "destAddressGroups": [ string ], "srcAddressGroups": [ string ], "srcFqdns": [ string ], "destFqdns": [ string ], "srcRegionCodes": [ string ], "destRegionCodes": [ string ], "destThreatIntelligences": [ string ], "srcThreatIntelligences": [ string ], "srcNetworkScope": enum, "srcNetworks": [ string ], "destNetworkScope": enum }, "action": string, "securityProfileGroup": string, "tlsInspect": boolean, "direction": enum, "targetResources": [ string ], "enableLogging": boolean, "ruleTupleCount": integer, "targetServiceAccounts": [ string ], "targetSecureTags": [ { "name": string, "state": enum } ], "disabled": boolean } ], "packetMirroringRules": [ { "kind": string, "ruleName": string, "description": string, "priority": integer, "match": { "srcIpRanges": [ string ], "destIpRanges": [ string ], "layer4Configs": [ { "ipProtocol": string, "ports": [ string ] } ], "srcSecureTags": [ { "name": string, "state": enum } ], "destAddressGroups": [ string ], "srcAddressGroups": [ string ], "srcFqdns": [ string ], "destFqdns": [ string ], "srcRegionCodes": [ string ], "destRegionCodes": [ string ], "destThreatIntelligences": [ string ], "srcThreatIntelligences": [ string ], "srcNetworkScope": enum, "srcNetworks": [ string ], "destNetworkScope": enum }, "action": string, "securityProfileGroup": string, "tlsInspect": boolean, "direction": enum, "targetResources": [ string ], "enableLogging": boolean, "ruleTupleCount": integer, "targetServiceAccounts": [ string ], "targetSecureTags": [ { "name": string, "state": enum } ], "disabled": boolean } ], "priority": integer } ] } |
Fields | |
---|---|
firewalls[] |
Effective firewalls on the network. |
firewalls[]. |
[Output Only] Type of the resource. Always |
firewalls[]. |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
firewalls[]. |
[Output Only] Creation timestamp in RFC3339 text format. |
firewalls[]. |
Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
firewalls[]. |
An optional description of this resource. Provide this field when you create the resource. |
firewalls[]. |
URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the global/networks/default
|
firewalls[]. |
Priority for this rule. This is an integer between |
firewalls[]. |
If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of |
firewalls[]. |
If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Both IPv4 and IPv6 are supported. |
firewalls[]. |
If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of |
firewalls[]. |
A list of tags that controls which instances the firewall rule applies to. If |
firewalls[]. |
If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. |
firewalls[]. |
A list of service accounts indicating sets of instances located in the network that may make network connections as specified in |
firewalls[]. |
The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. |
firewalls[]. |
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings ( |
firewalls[]. |
An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: |
firewalls[]. |
The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. |
firewalls[]. |
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings ( |
firewalls[]. |
An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: |
firewalls[]. |
Direction of traffic to which this firewall applies, either |
firewalls[].enableLogging |
Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging. |
firewalls[]. |
This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. |
firewalls[]. |
This field denotes whether to enable logging for a particular firewall rule. |
firewalls[]. |
This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs. |
firewalls[]. |
Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. |
firewalls[]. |
[Output Only] Server-defined URL for the resource. |
firewall |
[Output only] Effective firewalls from firewall policy. It applies to Regional Network Firewall Policies in the specified region, Global Network Firewall Policies and Hierachial Firewall Policies which are associated with the network. |
firewall |
[Output Only] The name of the firewall policy. |
firewall |
[Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. |
firewall |
[Output Only] The display name of the firewall policy. |
firewall |
[Output only] The rules that apply to the network. |
firewall |
[Output only] Type of the resource. Returns |
firewall |
An optional name for the rule. This field is not a unique identifier and can be updated. |
firewall |
An optional description for this resource. |
firewall |
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority. |
firewall |
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. |
firewall |
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. |
firewall |
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. |
firewall |
Pairs of IP protocols and ports that the rule should match. |
firewall |
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings ( |
firewall |
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: |
firewall |
regionNetworkFirewallPolicies.list of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the |
firewall |
Name of the secure tag, created with TagManager's TagValue API. |
firewall |
[Output Only] State of the secure tag, either |
firewall |
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. |
firewall |
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. |
firewall |
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100. |
firewall |
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100. |
firewall |
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000. |
firewall |
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000. |
firewall |
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination. |
firewall |
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source. |
firewall |
Network scope of the traffic source. |
firewall |
Networks of the traffic source. It can be either a full or partial url. |
firewall |
Network scope of the traffic destination. |
firewall |
The Action to perform when the client connection triggers the rule. Valid actions for firewall rules are: "allow", "deny", "apply_security_profile_group" and "goto_next". Valid actions for packet mirroring rules are: "mirror", "do_not_mirror" and "goto_next". |
firewall |
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action is one of 'apply_security_profile_group' or 'mirror'. Cannot be specified for other actions. |
firewall |
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions. |
firewall |
The direction in which this rule applies. |
firewall |
A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. |
firewall |
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. |
firewall |
[Output Only] Calculation of the complexity of a single firewall policy rule. |
firewall |
A list of service accounts indicating the sets of instances that are applied with this rule. |
firewall |
A list of secure tags that controls which instances the firewall rule applies to. If |
firewall |
Name of the secure tag, created with TagManager's TagValue API. |
firewall |
[Output Only] State of the secure tag, either |
firewall |
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. |
firewall |
[Output only] The packet mirroring rules that apply to the network. |
firewall |
[Output only] Type of the resource. Returns |
firewall |
An optional name for the rule. This field is not a unique identifier and can be updated. |
firewall |
An optional description for this resource. |
firewall |
An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority. |
firewall |
A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. |
firewall |
CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. |
firewall |
CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. |
firewall |
Pairs of IP protocols and ports that the rule should match. |
firewall |
The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings ( |
firewall |
An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: |
firewall |
regionNetworkFirewallPolicies.list of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the |
firewall |
Name of the secure tag, created with TagManager's TagValue API. |
firewall |
[Output Only] State of the secure tag, either |
firewall |
Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. |
firewall |
Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. |
firewall |
Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100. |
firewall |
Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100. |
firewall |
Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000. |
firewall |
Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000. |
firewall |
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination. |
firewall |
Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source. |
firewall |
Network scope of the traffic source. |
firewall |
Networks of the traffic source. It can be either a full or partial url. |
firewall |
Network scope of the traffic destination. |
firewall |
The Action to perform when the client connection triggers the rule. Valid actions for firewall rules are: "allow", "deny", "apply_security_profile_group" and "goto_next". Valid actions for packet mirroring rules are: "mirror", "do_not_mirror" and "goto_next". |
firewall |
A fully-qualified URL of a SecurityProfile resource instance. Example: https://networksecurity.googleapis.com/v1/projects/{project}/locations/{location}/securityProfileGroups/my-security-profile-group Must be specified if action is one of 'apply_security_profile_group' or 'mirror'. Cannot be specified for other actions. |
firewall |
Boolean flag indicating if the traffic should be TLS decrypted. Can be set only if action = 'apply_security_profile_group' and cannot be set for other actions. |
firewall |
The direction in which this rule applies. |
firewall |
A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. |
firewall |
Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. |
firewall |
[Output Only] Calculation of the complexity of a single firewall policy rule. |
firewall |
A list of service accounts indicating the sets of instances that are applied with this rule. |
firewall |
A list of secure tags that controls which instances the firewall rule applies to. If |
firewall |
Name of the secure tag, created with TagManager's TagValue API. |
firewall |
[Output Only] State of the secure tag, either |
firewall |
Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. |
firewall |
[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/compute.readonly
https://www.googleapis.com/auth/compute
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.