Skip to main content

operations

Creates, updates, deletes, gets or lists a operations resource.

Overview

Nameoperations
TypeResource
Idgoogle.sqladmin.operations

Fields

NameDatatypeDescription
namestringAn identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.
acquireSsrsLeaseContextobjectAcquire SSRS lease context.
apiWarningobjectAn Admin API warning message.
backupContextobjectBackup context.
endTimestringThe time this operation finished in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
errorobjectDatabase instance operation errors list wrapper.
exportContextobjectDatabase instance export context.
importContextobjectDatabase instance import context.
insertTimestringThe time this operation was enqueued in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
kindstringThis is always sql#operation.
operationTypestringThe type of the operation. Valid values are: CREATE DELETE UPDATE RESTART IMPORT EXPORT BACKUP_VOLUME RESTORE_VOLUME CREATE_USER DELETE_USER CREATE_DATABASE DELETE_DATABASE
selfLinkstringThe URI of this resource.
startTimestringThe time this operation actually started in UTC timezone in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.
statusstringThe status of an operation.
targetIdstringName of the database instance related to this operation.
targetLinkstring
targetProjectstringThe project ID of the target instance related to this operation.
userstringThe email address of the user who initiated this operation.

Methods

NameAccessible byRequired ParamsDescription
getSELECToperation, projectRetrieves an instance operation that has been performed on an instance.
listSELECTprojectLists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.
cancelEXECoperation, projectCancels an instance operation that has been performed on an instance.

SELECT examples

Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.

SELECT
name,
acquireSsrsLeaseContext,
apiWarning,
backupContext,
endTime,
error,
exportContext,
importContext,
insertTime,
kind,
operationType,
selfLink,
startTime,
status,
targetId,
targetLink,
targetProject,
user
FROM google.sqladmin.operations
WHERE project = '{{ project }}';