- Resource: BlueGreenDeployment
- State
- SourceTargetPairedNode
- NodeInfo
- State
- ConfigDiff
- DeploymentTasks
- DeploymentTask
- Type
- State
- RequestedConfig
- Methods
Resource: BlueGreenDeployment
A BlueGreenDeployment resource represents a Cloud SQL blue-green deployment setup.
| JSON representation |
|---|
{ "name": string, "description": string, "createTime": string, "state": enum ( |
| Fields | |
|---|---|
name |
Output only. Identifier. The full resource name of the deployment. Format: projects/{project}/locations/{location}/blueGreenDeployments/{deploymentId} |
description |
Optional. User-provided description for the deployment. The description can be up to 255 characters long. |
createTime |
Output only. The time when the deployment was created. Example: Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
state |
Output only. The current state of the blue-green deployment. |
sourceInstance |
Required. Immutable. Required on create, and immutable. The full resource name of the source instance (the "blue" instance). Format: projects/{project}/instances/{instance} |
switchoverTargetInstance |
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} |
errorDetail |
Output only. Provides details on why switchover is not possible. This field is empty unless a switchover attempt failed or the state is |
deploymentMappings[] |
Output only. A list representing the pairs of source and target instances in the deployment. |
deploymentTasks |
Output only. Combined list of tasks for all paired nodes. |
requestedConfig |
Optional. Immutable. Optional on create, and immutable. The configuration intended for the target instance(s) when the deployment was created. |
State
The state of the blue-green deployment.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
The default value. This value is used if the state is omitted or unknown. |
PROVISIONING |
The deployment is being provisioned. |
SWITCHOVER_READY |
The deployment is ready for switchover. |
SWITCHOVER_NOT_READY |
The deployment is not ready for switchover. |
SWITCHOVER_IN_PROGRESS |
The deployment is in the process of switching over. |
SWITCHOVER_COMPLETED |
The deployment has completed switchover. |
DELETING |
The deployment is being deleted. |
SourceTargetPairedNode
Represents a pairing of a source instance node and a target instance node.
| JSON representation |
|---|
{ "source": { object ( |
| Fields | |
|---|---|
source |
Output only. Specifies the resource name of the source instance in this pair. |
target |
Output only. Specifies details of the corresponding target instance in this pair. |
state |
Output only. Specifies the current state of this specific source-target pair. |
diffs[] |
Output only. Describes the list of differences for the |
NodeInfo
Details about an instance within the deployment.
| JSON representation |
|---|
{
"instance": string,
"connection": string,
"dns": string,
"ipMappings": [
{
object ( |
| Fields | |
|---|---|
instance |
Output only. The full resource name of the instance. Format: projects/{project}/instances/{instance} |
connection |
Output only. The instance connection name. |
dns |
Output only. The unique DNS name for this instance. |
ipMappings[] |
Output only. The list of IP addresses for this instance. |
State
The state of a pair of source and target instances in deployment (paired node).
| Enums | |
|---|---|
STATE_UNSPECIFIED |
The state of the paired node is unknown. |
PROVISIONING |
The paired node is being provisioned. |
PROVISIONED |
The paired node is provisioned. |
UPGRADING |
The paired node is upgrading. |
UPGRADED |
The paired node is upgraded. |
UPGRADE_FAILED |
Upgrade failed on the paired node. |
SWITCHOVER_IN_PROGRESS |
Switchover is in progress. |
SWITCHOVER_FAILED |
Switchover failed on the paired node. |
SWITCHOVER_SUCCEEDED |
Switchover completed successfully. |
DELETING |
The paired node is being deleted. |
ConfigDiff
Represents a specific configuration difference between blue and green instances.
| JSON representation |
|---|
{ "field": string, "sourceValue": string, "targetValue": string } |
| Fields | |
|---|---|
field |
Output only. The name of the field that differs in the blue and green instances, fully-qualified. Example: |
sourceValue |
Output only. The value on the source instance. |
targetValue |
Output only. The value on the target instance. |
DeploymentTasks
Combined list of tasks for all paired nodes in the deployment.
| JSON representation |
|---|
{
"task": [
{
object ( |
| Fields | |
|---|---|
task[] |
Output only. Tasks performed or being performed on the paired nodes of the deployment at a consolidated level. |
DeploymentTask
Represents a task executed as part of the deployment on a target instance.
| JSON representation |
|---|
{ "type": enum ( |
| Fields | |
|---|---|
type |
Output only. The type of the task. |
state |
Output only. The current state of the task. |
startTime |
Output only. Task start time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Output only. Task end time (if completed). Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
errorMessage |
Output only. Optional error details if the task state is |
Type
The type of the task. This enum type Type is prone to change, and new values may be added in the future.
| Enums | |
|---|---|
TYPE_UNSPECIFIED |
The default value. This value is used if the type is omitted. |
PROVISION |
Provisions the green environment, which includes creating the target instance. |
UPGRADE |
Upgrades the green environment, for example, performing a major version upgrade on the target instance. |
SWITCHOVER |
Promotes the target instance and then demotes the source instance for this pair. |
DELETE |
Deletes the blue-green deployment, including underlying resources. |
POST_SWITCHOVER_OPERATIONS |
Post-switchover operations, including cleaning up resources of the old instance, taking final backups, and updating metadata. |
State
The state of the task. This enum is not frozen, and new values may be added in the future.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
The state of the task is unknown. |
PENDING |
The task is pending. |
RUNNING |
The task is running. |
SUCCEEDED |
The task has succeeded. |
FAILED |
The task has failed. |
RequestedConfig
Configuration specified by the user at creation time for the target (green) instance.
| JSON representation |
|---|
{ "databaseVersion": string } |
| Fields | |
|---|---|
databaseVersion |
Optional. The target database major version for the upgrade. For example, |
Methods |
|
|---|---|
|
Creates a blue-green deployment under a given project and location. |
|
Deletes a blue-green deployment. |
|
Retrieves a blue-green deployment resource under a given project and location. |
|
Lists blue-green deployments under a given project. |
|
Switches over to green instance for a blue-green deployment. |