Google Cloud Run Projects API

The Projects API from Google Cloud Run — 2 operation(s) for projects.

OpenAPI Specification

google-cloud-run-projects-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Run Admin Jobs Projects API
  description: The Cloud Run Admin API deploys and manages user-provided container images as serverless services. It supports creating, updating, and deleting services, managing revisions and traffic splitting, executing jobs, and configuring domain mappings.
  version: v2
  contact:
    name: Google Cloud
    url: https://cloud.google.com/run
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://run.googleapis.com/v2
  description: Google Cloud Run Admin API v2
security:
- oauth2: []
tags:
- name: Projects
paths:
  /projects/{projectId}/locations/{location}/services:
    get:
      operationId: listServices
      summary: Google Cloud Run List services
      description: Lists services in the given project and location.
      tags:
      - Projects
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: pageSize
        in: query
        schema:
          type: integer
      - name: pageToken
        in: query
        schema:
          type: string
      - name: showDeleted
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServicesResponse'
    post:
      operationId: createService
      summary: Google Cloud Run Create a service
      description: Creates a new service in the given project and location.
      tags:
      - Projects
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: serviceId
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Service'
      responses:
        '200':
          description: Successful response with long-running operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
  /projects/{projectId}/locations/{location}/services/{serviceId}:
    get:
      operationId: getService
      summary: Google Cloud Run Get a service
      description: Gets information about a service.
      tags:
      - Projects
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: serviceId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Service'
    patch:
      operationId: updateService
      summary: Google Cloud Run Update a service
      description: Updates a service.
      tags:
      - Projects
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: serviceId
        in: path
        required: true
        schema:
          type: string
      - name: updateMask
        in: query
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Service'
      responses:
        '200':
          description: Successful response with long-running operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
    delete:
      operationId: deleteService
      summary: Google Cloud Run Delete a service
      description: Deletes a service.
      tags:
      - Projects
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
      - name: location
        in: path
        required: true
        schema:
          type: string
      - name: serviceId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response with long-running operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
components:
  schemas:
    Operation:
      type: object
      properties:
        name:
          type: string
        metadata:
          type: object
        done:
          type: boolean
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
        response:
          type: object
    RevisionTemplate:
      type: object
      properties:
        revision:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        scaling:
          type: object
          properties:
            minInstanceCount:
              type: integer
            maxInstanceCount:
              type: integer
        vpcAccess:
          type: object
          properties:
            connector:
              type: string
            egress:
              type: string
        timeout:
          type: string
        serviceAccount:
          type: string
        containers:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              image:
                type: string
              command:
                type: array
                items:
                  type: string
              args:
                type: array
                items:
                  type: string
              env:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    value:
                      type: string
              resources:
                type: object
                properties:
                  limits:
                    type: object
                    additionalProperties:
                      type: string
                  cpuIdle:
                    type: boolean
                  startupCpuBoost:
                    type: boolean
              ports:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    containerPort:
                      type: integer
              volumeMounts:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    mountPath:
                      type: string
        volumes:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              secret:
                type: object
                properties:
                  secret:
                    type: string
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        version:
                          type: string
        maxInstanceRequestConcurrency:
          type: integer
        executionEnvironment:
          type: string
          enum:
          - EXECUTION_ENVIRONMENT_UNSPECIFIED
          - EXECUTION_ENVIRONMENT_GEN1
          - EXECUTION_ENVIRONMENT_GEN2
    ListServicesResponse:
      type: object
      properties:
        services:
          type: array
          items:
            $ref: '#/components/schemas/Service'
        nextPageToken:
          type: string
    Service:
      type: object
      properties:
        name:
          type: string
          description: The fully qualified name of the service.
        description:
          type: string
        uid:
          type: string
          description: Output only. Server-assigned unique identifier.
        generation:
          type: string
          description: Output only. A number that monotonically increases every time the user modifies the service.
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        createTime:
          type: string
          format: date-time
        updateTime:
          type: string
          format: date-time
        deleteTime:
          type: string
          format: date-time
        expireTime:
          type: string
          format: date-time
        creator:
          type: string
        lastModifier:
          type: string
        ingress:
          type: string
          enum:
          - INGRESS_TRAFFIC_UNSPECIFIED
          - INGRESS_TRAFFIC_ALL
          - INGRESS_TRAFFIC_INTERNAL_ONLY
          - INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER
        launchStage:
          type: string
          enum:
          - LAUNCH_STAGE_UNSPECIFIED
          - UNIMPLEMENTED
          - PRELAUNCH
          - EARLY_ACCESS
          - ALPHA
          - BETA
          - GA
          - DEPRECATED
        template:
          $ref: '#/components/schemas/RevisionTemplate'
        traffic:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                - TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED
                - TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST
                - TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION
              revision:
                type: string
              percent:
                type: integer
              tag:
                type: string
        uri:
          type: string
          description: Output only. The main URI where the service is serving traffic.
        reconciling:
          type: boolean
        conditions:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              state:
                type: string
              message:
                type: string
              lastTransitionTime:
                type: string
                format: date-time
              severity:
                type: string
        latestReadyRevision:
          type: string
        latestCreatedRevision:
          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/cloud-platform: Full access to Google Cloud Platform
            https://www.googleapis.com/auth/run: View and manage Cloud Run services
externalDocs:
  description: Google Cloud Run Documentation
  url: https://cloud.google.com/run/docs/reference/rest