Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class BlueGreenDeployment.
A BlueGreenDeployment resource represents a Cloud SQL blue-green deployment
setup.
Generated from protobuf message google.cloud.sql.v1.BlueGreenDeployment
Namespace
Google \ Cloud \ Sql \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Output only. Identifier. The full resource name of the deployment. Format: projects/{project}/locations/{location}/blueGreenDeployments/{deployment_id} |
↳ description |
string
Optional. User-provided description for the deployment. The description can be up to 255 characters long. |
↳ create_time |
Google\Protobuf\Timestamp
Output only. The time when the deployment was created. Example: |
↳ state |
int
Output only. The current state of the blue-green deployment. |
↳ source_instance |
string
Required. Immutable. Required on create, and immutable. The full resource name of the source instance (the "blue" instance). Format: projects/{project}/instances/{instance} |
↳ switchover_target_instance |
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} |
↳ error_detail |
string
Output only. Provides details on why switchover is not possible. This field is empty unless a switchover attempt failed or the state is |
↳ deployment_mappings |
array<BlueGreenDeployment\SourceTargetPairedNode>
Output only. A list representing the pairs of source and target instances in the deployment. |
↳ deployment_tasks |
BlueGreenDeployment\DeploymentTasks
Output only. Combined list of tasks for all paired nodes. |
↳ requested_config |
BlueGreenDeployment\RequestedConfig
Optional. Immutable. Optional on create, and immutable. The configuration intended for the target instance(s) when the deployment was created. |
getName
Output only. Identifier. The full resource name of the deployment.
Format: projects/{project}/locations/{location}/blueGreenDeployments/{deployment_id}
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Output only. Identifier. The full resource name of the deployment.
Format: projects/{project}/locations/{location}/blueGreenDeployments/{deployment_id}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDescription
Optional. User-provided description for the deployment.
The description can be up to 255 characters long.
| Returns | |
|---|---|
| Type | Description |
string |
|
setDescription
Optional. User-provided description for the deployment.
The description can be up to 255 characters long.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCreateTime
Output only. The time when the deployment was created.
Example: 2024-01-01T00:00:00Z
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time when the deployment was created.
Example: 2024-01-01T00:00:00Z
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getState
Output only. The current state of the blue-green deployment.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type State. |
setState
Output only. The current state of the blue-green deployment.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type State. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSourceInstance
Required. Immutable. Required on create, and immutable. The full resource name of the source instance (the "blue" instance). Format: projects/{project}/instances/{instance}
| Returns | |
|---|---|
| Type | Description |
string |
|
setSourceInstance
Required. Immutable. Required on create, and immutable. The full resource name of the source instance (the "blue" instance). Format: projects/{project}/instances/{instance}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSwitchoverTargetInstance
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}
| Returns | |
|---|---|
| Type | Description |
string |
|
setSwitchoverTargetInstance
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}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getErrorDetail
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."
| Returns | |
|---|---|
| Type | Description |
string |
|
setErrorDetail
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."
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDeploymentMappings
Output only. A list representing the pairs of source and target instances in the deployment.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<BlueGreenDeployment\SourceTargetPairedNode> |
|
setDeploymentMappings
Output only. A list representing the pairs of source and target instances in the deployment.
| Parameter | |
|---|---|
| Name | Description |
var |
array<BlueGreenDeployment\SourceTargetPairedNode>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDeploymentTasks
Output only. Combined list of tasks for all paired nodes.
| Returns | |
|---|---|
| Type | Description |
BlueGreenDeployment\DeploymentTasks|null |
|
hasDeploymentTasks
clearDeploymentTasks
setDeploymentTasks
Output only. Combined list of tasks for all paired nodes.
| Parameter | |
|---|---|
| Name | Description |
var |
BlueGreenDeployment\DeploymentTasks
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRequestedConfig
Optional. Immutable. Optional on create, and immutable. The configuration intended for the target instance(s) when the deployment was created.
| Returns | |
|---|---|
| Type | Description |
BlueGreenDeployment\RequestedConfig|null |
|
hasRequestedConfig
clearRequestedConfig
setRequestedConfig
Optional. Immutable. Optional on create, and immutable. The configuration intended for the target instance(s) when the deployment was created.
| Parameter | |
|---|---|
| Name | Description |
var |
BlueGreenDeployment\RequestedConfig
|
| Returns | |
|---|---|
| Type | Description |
$this |
|