---
title: "GET /v1/projects/{projectsId}/locations/{locationsId}/blueGreenDeployments"
method: GET
path: "/v1/projects/{projectsId}/locations/{locationsId}/blueGreenDeployments"
tags: ["blueGreenDeployments"]
---

# GET /v1/projects/{projectsId}/locations/{locationsId}/blueGreenDeployments

`GET /v1/projects/{projectsId}/locations/{locationsId}/blueGreenDeployments`

## Request

- Base URL: `https://sqladmin.googleapis.com`
- URL: `https://sqladmin.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/blueGreenDeployments`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/sqlservice.admin`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/sqlservice.admin`

Lists blue-green deployments under a given project.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `filter` string
- `orderBy` string
- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- ListBlueGreenDeploymentsResponse: The response message for listing blue-green deployment resources.
  - `blueGreenDeployments` BlueGreenDeployment[]: The list of blue-green deployment resources.
    - `createTime` string, google-datetime: Output only. The time when the deployment was created. Example: `2024-01-01T00:00:00Z`
    - `deploymentMappings` SourceTargetPairedNode[]: Output only. A list representing the pairs of source and target instances in the deployment.
      - `diffs` ConfigDiff[]: Output only. Describes the list of differences for the `SourceTargetPairedNode`.
        - `field` string: Output only. The name of the field that differs in the blue and green instances, fully-qualified. Example: `settings.tier`
        - `sourceValue` string: Output only. The value on the source instance.
        - `targetValue` string: Output only. The value on the target instance.
      - `source` NodeInfo: Details about an instance within the deployment.
        - `connection` string: Output only. The instance connection name.
        - `dns` string: Output only. The unique DNS name for this instance.
        - `instance` string: Output only. The full resource name of the instance. Format: projects/{project}/instances/{instance}
        - `ipMappings` IpMapping[]: Output only. The list of IP addresses for this instance.
          - `ipAddress` string: The IP address assigned.
          - `timeToRetire` string, google-datetime: The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.
          - `type` 'SQL_IP_ADDRESS_TYPE_UNSPECIFIED' | 'PRIMARY' | 'OUTGOING' | 'PRIVATE' | 'MIGRATED_1ST_GEN': The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.
      - `state` 'STATE_UNSPECIFIED' | 'PROVISIONING' | 'PROVISIONED' | 'UPGRADING' | 'UPGRADED' | 'UPGRADE_FAILED' | 'SWITCHOVER_IN_PROGRESS' | 'SWITCHOVER_FAILED' | 'SWITCHOVER_SUCCEEDED' | 'DELETING': Output only. Specifies the current state of this specific source-target pair.
      - `target` NodeInfo: Details about an instance within the deployment.
        - `connection` string: Output only. The instance connection name.
        - `dns` string: Output only. The unique DNS name for this instance.
        - `instance` string: Output only. The full resource name of the instance. Format: projects/{project}/instances/{instance}
        - `ipMappings` IpMapping[]: Output only. The list of IP addresses for this instance.
          - `ipAddress` string: The IP address assigned.
          - `timeToRetire` string, google-datetime: The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.
          - `type` 'SQL_IP_ADDRESS_TYPE_UNSPECIFIED' | 'PRIMARY' | 'OUTGOING' | 'PRIVATE' | 'MIGRATED_1ST_GEN': The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.
    - `deploymentTasks` DeploymentTasks: Combined list of tasks for all paired nodes in the deployment.
      - `task` DeploymentTask[]: Output only. Tasks performed or being performed on the paired nodes of the deployment at a consolidated level.
        - `endTime` string, google-datetime: Output only. Task end time (if completed).
        - `errorMessage` string: Output only. Optional error details if the task state is `FAILED`.
        - `startTime` string, google-datetime: Output only. Task start time.
        - `state` 'STATE_UNSPECIFIED' | 'PENDING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED': Output only. The current state of the task.
        - `type` 'TYPE_UNSPECIFIED' | 'PROVISION' | 'UPGRADE' | 'SWITCHOVER' | 'DELETE' | 'POST_SWITCHOVER_OPERATIONS': Output only. The type of the task.
    - `description` string: Optional. User-provided description for the deployment. The description can be up to 255 characters long.
    - `errorDetail` string: Output only. Provides details on why switchover is not possible. This field is empty unless a switchover attempt failed or the state is `SWITCHOVER_NOT_READY`. Example: "The target database version does not match the source instance database version."
    - `name` string: Output only. Identifier. The full resource name of the deployment. Format: projects/{project}/locations/{location}/blueGreenDeployments/{deployment_id}
    - `requestedConfig` RequestedConfig: Configuration specified by the user at creation time for the target (green) instance.
      - `databaseVersion` string: Optional. The target database major version for the upgrade. For example, `MYSQL_8_0` or `POSTGRES_15`.
    - `sourceInstance` string: Required. Immutable. Required on create, and immutable. The full resource name of the source instance (the "blue" instance). Format: projects/{project}/instances/{instance}
    - `state` 'STATE_UNSPECIFIED' | 'PROVISIONING' | 'SWITCHOVER_READY' | 'SWITCHOVER_NOT_READY' | 'SWITCHOVER_IN_PROGRESS' | 'SWITCHOVER_COMPLETED' | 'DELETING': Output only. The current state of the blue-green deployment.
    - `switchoverTargetInstance` string: Output only. The full resource name of the primary target instance (the "green" instance) that will be promoted during switchover. This field is always populated once the deployment is created. Format: projects/{project}/instances/{instance}
  - `nextPageToken` string: A token to retrieve the next page of results, or empty if there are no more results.

## Changes

- **2026-11-07** `73cd2149b2c6`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/sqlservice.admin` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/sqlservice.admin` was removed from the endpoint's security scheme `Oauth2c`
- **2026-10-30** `5fe024d916e4`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/sqlservice.admin` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/sqlservice.admin` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/sqladmin/changes/v1/projects/:projectsId/locations/:locationsId/blueGreenDeployments/get.md)

---

[API](https://skmtc.dev/google/apis/sqladmin.md) - [All operations](https://skmtc.dev/google/apis/sqladmin/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/sqladmin/revisions/73cd2149b2c6?raw)
