Google Cloud Compute Engine Firewalls API

Manage firewall rules

OpenAPI Specification

google-cloud-compute-engine-firewalls-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Compute Engine Google Compute Engine Disks Firewalls API
  description: Creates and runs virtual machines on Google Cloud infrastructure, with support for managing disks, networks, and firewall rules.
  version: 1.0.0
  contact:
    name: Google Cloud
    url: https://cloud.google.com/compute
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://compute.googleapis.com/compute/v1
  description: Google Compute Engine API v1
security:
- oauth2:
  - https://www.googleapis.com/auth/compute
tags:
- name: Firewalls
  description: Manage firewall rules
paths:
  /projects/{project}/global/firewalls:
    get:
      operationId: listFirewalls
      summary: Google Cloud Compute Engine List Firewalls
      description: Retrieves the list of firewall rules available to the specified project.
      tags:
      - Firewalls
      parameters:
      - name: project
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Firewall'
                  nextPageToken:
                    type: string
components:
  schemas:
    Firewall:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        network:
          type: string
        direction:
          type: string
          enum:
          - INGRESS
          - EGRESS
        priority:
          type: integer
        allowed:
          type: array
          items:
            type: object
            properties:
              IPProtocol:
                type: string
              ports:
                type: array
                items:
                  type: string
        sourceRanges:
          type: array
          items:
            type: string
        selfLink:
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/compute: Full access to Compute Engine
            https://www.googleapis.com/auth/cloud-platform: Full access to Google Cloud Platform