REST Resource: firewalls

Resource: Firewall

Represents a Firewall Rule resource.

Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.

JSON representation
{
  "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,
  "logConfig": {
    "enable": boolean,
    "metadata": enum
  },
  "disabled": boolean,
  "selfLink": string,
  "kind": string
}
Fields
id

string (uint64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

name

string

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 `a-z?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

description

string

An optional description of this resource. Provide this field when you create the resource.

network

string

URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:

global/networks/default
If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:

priority

integer

Priority for this rule. This is an integer between 0 and 65535, both inclusive. The default value is