Reference documentation and code samples for the Compute V1 Client class Operation.
Represents an Operation resource. Google Compute Engine has three Operation resources: * Global
* Regional
* Zonal
You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the globalOperations
resource. - For regional operations, use the regionOperations
resource. - For zonal operations, use the zoneOperations
resource. For more information, read Global, Regional, and Zonal Resources. Note that completed Operation resources have a limited retention period.
Generated from protobuf message google.cloud.compute.v1.Operation
Namespace
Google \ Cloud \ Compute \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ client_operation_id
string
[Output Only] The value of requestId
if you provided it in the request. Not present otherwise.
↳ creation_timestamp
string
[Deprecated] This field is deprecated.
↳ description
string
[Output Only] A textual description of the operation, which is set when the operation is created.
↳ end_time
string
[Output Only] The time that this operation was completed. This value is in RFC3339 text format.
↳ error
Error
[Output Only] If errors are generated during processing of the operation, this field will be populated.
↳ http_error_message
string
[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND
.
↳ http_error_status_code
int
[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404
means the resource was not found.
↳ id
int|string
[Output Only] The unique identifier for the operation. This identifier is defined by the server.
↳ insert_time
string
[Output Only] The time that this operation was requested. This value is in RFC3339 text format.
↳ instances_bulk_insert_operation_metadata
↳ kind
string
[Output Only] Type of the resource. Always compute#operation
for Operation resources.
↳ name
string
[Output Only] Name of the operation.
↳ operation_group_id
string
[Output Only] An ID that represents a group of operations, such as when a group of operations results from a bulkInsert
API request.
↳ operation_type
string
[Output Only] The type of operation, such as insert
, update
, or delete
, and so on.
↳ progress
int
[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
↳ region
string
[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
↳ self_link
string
[Output Only] Server-defined URL for the resource.
↳ set_common_instance_metadata_operation_metadata
SetCommonInstanceMetadataOperationMetadata
[Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state.
↳ start_time
string
[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
↳ status
int
[Output Only] The status of the operation, which can be one of the following: PENDING
, RUNNING
, or DONE
.
↳ status_message
string
[Output Only] An optional textual description of the current status of the operation.
↳ target_id
int|string
[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
↳ target_link
string
[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from.
↳ user
string
[Output Only] User who requested the operation, for example: user@example.com
or alice_smith_identifier (global/workforcePools/example-com-us-employees)
.
↳ warnings
array< Warnings
>
[Output Only] If warning messages are generated during processing of the operation, this field will be populated.
↳ zone
string
[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
getClientOperationId
[Output Only] The value of requestId
if you provided it in the request. Not present otherwise.
string
hasClientOperationId
clearClientOperationId
setClientOperationId
[Output Only] The value of requestId
if you provided it in the request. Not present otherwise.
var
string
$this
getCreationTimestamp
[Deprecated] This field is deprecated.
string
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
[Deprecated] This field is deprecated.
var
string
$this
getDescription
[Output Only] A textual description of the operation, which is set when the operation is created.
string
hasDescription
clearDescription
setDescription
[Output Only] A textual description of the operation, which is set when the operation is created.
var
string
$this
getEndTime
[Output Only] The time that this operation was completed. This value is in RFC3339 text format.
string
hasEndTime
clearEndTime
setEndTime
[Output Only] The time that this operation was completed. This value is in RFC3339 text format.
var
string
$this
getError
[Output Only] If errors are generated during processing of the operation, this field will be populated.
hasError
clearError
setError
[Output Only] If errors are generated during processing of the operation, this field will be populated.
$this
getHttpErrorMessage
[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND
.
string
hasHttpErrorMessage
clearHttpErrorMessage
setHttpErrorMessage
[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND
.
var
string
$this
getHttpErrorStatusCode
[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404
means the resource was not found.
int
hasHttpErrorStatusCode
clearHttpErrorStatusCode
setHttpErrorStatusCode
[Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404
means the resource was not found.
var
int
$this
getId
[Output Only] The unique identifier for the operation. This identifier is defined by the server.
int|string
hasId
clearId
setId
[Output Only] The unique identifier for the operation. This identifier is defined by the server.
var
int|string
$this
getInsertTime
[Output Only] The time that this operation was requested. This value is in RFC3339 text format.
string
hasInsertTime
clearInsertTime
setInsertTime
[Output Only] The time that this operation was requested. This value is in RFC3339 text format.
var
string
$this
getInstancesBulkInsertOperationMetadata
Generated from protobuf field optional .google.cloud.compute.v1.InstancesBulkInsertOperationMetadata instances_bulk_insert_operation_metadata = 89146177;
hasInstancesBulkInsertOperationMetadata
clearInstancesBulkInsertOperationMetadata
setInstancesBulkInsertOperationMetadata
Generated from protobuf field optional .google.cloud.compute.v1.InstancesBulkInsertOperationMetadata instances_bulk_insert_operation_metadata = 89146177;
$this
getKind
[Output Only] Type of the resource. Always compute#operation
for Operation resources.
string
hasKind
clearKind
setKind
[Output Only] Type of the resource. Always compute#operation
for Operation resources.
var
string
$this
getName
[Output Only] Name of the operation.
string
hasName
clearName
setName
[Output Only] Name of the operation.
var
string
$this
getOperationGroupId
[Output Only] An ID that represents a group of operations, such as when a group of operations results from a bulkInsert
API request.
string
hasOperationGroupId
clearOperationGroupId
setOperationGroupId
[Output Only] An ID that represents a group of operations, such as when a group of operations results from a bulkInsert
API request.
var
string
$this
getOperationType
[Output Only] The type of operation, such as insert
, update
, or delete
, and so on.
string
hasOperationType
clearOperationType
setOperationType
[Output Only] The type of operation, such as insert
, update
, or delete
, and so on.
var
string
$this
getProgress
[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
int
hasProgress
clearProgress
setProgress
[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
var
int
$this
getRegion
[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
string
hasRegion
clearRegion
setRegion
[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
var
string
$this
getSelfLink
[Output Only] Server-defined URL for the resource.
string
hasSelfLink
clearSelfLink
setSelfLink
[Output Only] Server-defined URL for the resource.
var
string
$this
getSetCommonInstanceMetadataOperationMetadata
[Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state.
hasSetCommonInstanceMetadataOperationMetadata
clearSetCommonInstanceMetadataOperationMetadata
setSetCommonInstanceMetadataOperationMetadata
[Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state.
$this
getStartTime
[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
string
hasStartTime
clearStartTime
setStartTime
[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
var
string
$this
getStatus
[Output Only] The status of the operation, which can be one of the following: PENDING
, RUNNING
, or DONE
.
int
hasStatus
clearStatus
setStatus
[Output Only] The status of the operation, which can be one of the following: PENDING
, RUNNING
, or DONE
.
var
int
$this
getStatusMessage
[Output Only] An optional textual description of the current status of the operation.
string
hasStatusMessage
clearStatusMessage
setStatusMessage
[Output Only] An optional textual description of the current status of the operation.
var
string
$this
getTargetId
[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
int|string
hasTargetId
clearTargetId
setTargetId
[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
var
int|string
$this
getTargetLink
[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from.
string
hasTargetLink
clearTargetLink
setTargetLink
[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the disk that the snapshot was created from.
var
string
$this
getUser
[Output Only] User who requested the operation, for example: user@example.com
or alice_smith_identifier (global/workforcePools/example-com-us-employees)
.
string
hasUser
clearUser
setUser
[Output Only] User who requested the operation, for example: user@example.com
or alice_smith_identifier (global/workforcePools/example-com-us-employees)
.
var
string
$this
getWarnings
[Output Only] If warning messages are generated during processing of the operation, this field will be populated.
setWarnings
[Output Only] If warning messages are generated during processing of the operation, this field will be populated.
$this
getZone
[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
string
hasZone
clearZone
setZone
[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
var
string
$this