Google Cloud AlloyDB for PostgreSQL V1 Client - Class BatchCreateInstanceStatus (0.7.1)

Reference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1 Client class BatchCreateInstanceStatus.

Message for current status of an instance in the BatchCreateInstances operation.

For example, lets say a BatchCreateInstances workflow has 4 instances, Instance1 through Instance4. Lets also assume that 2 instances succeeded but the third failed to create and the 4th was never picked up for creation because of failure of the previous one. Then, resulting states would look something like:

  1. Instance1 = ROLLED_BACK
  2. Instance2 = ROLLED_BACK
  3. Instance3 = FAILED
  4. Instance4 = FAILED However, while the operation is running, the instance might be in other states including PENDING_CREATE, ACTIVE, DELETING and CREATING. The states / do not get further updated once the operation is done.

Generated from protobuf message google.cloud.alloydb.v1.BatchCreateInstanceStatus

Namespace

Google \ Cloud \ AlloyDb \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ state int

The current state of an instance involved in the batch create operation. Once the operation is complete, the final state of the instances in the LRO can be one of: 1. ACTIVE, indicating that instances were created successfully 2. FAILED, indicating that a particular instance failed creation 3. ROLLED_BACK indicating that although the instance was created successfully, it had to be rolled back and deleted due to failure in other steps of the workflow.

↳ error_msg string

DEPRECATED - Use the error field instead. Error, if any error occurred and is available, during instance creation.

↳ error Google\Rpc\Status

The RPC status of the instance creation operation. This field will be present if an error happened during the instance creation.

↳ type int

getState

The current state of an instance involved in the batch create operation.

Once the operation is complete, the final state of the instances in the LRO can be one of:

  1. ACTIVE, indicating that instances were created successfully
  2. FAILED, indicating that a particular instance failed creation
  3. ROLLED_BACK indicating that although the instance was created successfully, it had to be rolled back and deleted due to failure in other steps of the workflow.
Returns
TypeDescription
int

setState

The current state of an instance involved in the batch create operation.

Once the operation is complete, the final state of the instances in the LRO can be one of:

  1. ACTIVE, indicating that instances were created successfully
  2. FAILED, indicating that a particular instance failed creation
  3. ROLLED_BACK indicating that although the instance was created successfully, it had to be rolled back and deleted due to failure in other steps of the workflow.
Parameter
NameDescription
var int
Returns
TypeDescription
$this

getErrorMsg

DEPRECATED - Use the error field instead.

Error, if any error occurred and is available, during instance creation.

Returns
TypeDescription
string

setErrorMsg

DEPRECATED - Use the error field instead.

Error, if any error occurred and is available, during instance creation.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getError

The RPC status of the instance creation operation. This field will be present if an error happened during the instance creation.

Returns
TypeDescription
Google\Rpc\Status|null

hasError

clearError

setError

The RPC status of the instance creation operation. This field will be present if an error happened during the instance creation.

Parameter
NameDescription
var Google\Rpc\Status
Returns
TypeDescription
$this

getType

Generated from protobuf field .google.cloud.alloydb.v1.Instance.InstanceType type = 3;

Returns
TypeDescription
int

setType

Generated from protobuf field .google.cloud.alloydb.v1.Instance.InstanceType type = 3;

Parameter
NameDescription
var int
Returns
TypeDescription
$this