Skip to main content

data_sources

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

Overview

Namedata_sources
TypeResource
Idgoogle.backupdr.data_sources

Fields

NameDatatypeDescription
namestringOutput only. Identifier. The resource name.
backupConfigInfoobjectBackupConfigInfo has information about how the resource is configured for Backup and about the most recent backup to this vault.
backupCountstringNumber of backups in the data source.
configStatestringOutput only. The backup configuration state.
createTimestringOutput only. The time when the instance was created.
dataSourceBackupApplianceApplicationobjectBackupApplianceApplication describes a Source Resource when it is an application backed up by a BackupAppliance.
dataSourceGcpResourceobjectDataSourceGcpResource is used for protected resources that are Google Cloud Resources. This name is easeier to understand than GcpResourceDataSource or GcpDataSourceResource
etagstringServer specified ETag for the ManagementServer resource to prevent simultaneous updates from overwiting each other.
labelsobjectOptional. Resource labels to represent user provided metadata. No labels currently defined:
statestringOutput only. The DataSource resource instance state.
totalStoredBytesstringThe number of bytes (metadata and data) stored in this datasource.
updateTimestringOutput only. The time when the instance was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTbackupVaultsId, dataSourcesId, locationsId, projectsIdGets details of a DataSource.
listSELECTbackupVaultsId, locationsId, projectsIdLists DataSources in a given project and location.
removeDELETEbackupVaultsId, dataSourcesId, locationsId, projectsIdDeletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.
patchUPDATEbackupVaultsId, dataSourcesId, locationsId, projectsIdUpdates the settings of a DataSource.
abandon_backupEXECbackupVaultsId, dataSourcesId, locationsId, projectsIdInternal only. Abandons a backup.
finalize_backupEXECbackupVaultsId, dataSourcesId, locationsId, projectsIdInternal only. Finalize a backup that was started by a call to InitiateBackup.
initiate_backupEXECbackupVaultsId, dataSourcesId, locationsId, projectsIdInternal only. Initiates a backup.
set_internal_statusEXECbackupVaultsId, dataSourcesId, locationsId, projectsIdSets the internal status of a DataSource.

SELECT examples

Lists DataSources in a given project and location.

SELECT
name,
backupConfigInfo,
backupCount,
configState,
createTime,
dataSourceBackupApplianceApplication,
dataSourceGcpResource,
etag,
labels,
state,
totalStoredBytes,
updateTime
FROM google.backupdr.data_sources
WHERE backupVaultsId = '{{ backupVaultsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a data_sources resource.

/*+ update */
UPDATE google.backupdr.data_sources
SET
labels = '{{ labels }}',
backupCount = '{{ backupCount }}',
etag = '{{ etag }}',
totalStoredBytes = '{{ totalStoredBytes }}',
dataSourceGcpResource = '{{ dataSourceGcpResource }}',
dataSourceBackupApplianceApplication = '{{ dataSourceBackupApplianceApplication }}'
WHERE
backupVaultsId = '{{ backupVaultsId }}'
AND dataSourcesId = '{{ dataSourcesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified data_sources resource.

/*+ delete */
DELETE FROM google.backupdr.data_sources
WHERE backupVaultsId = '{{ backupVaultsId }}'
AND dataSourcesId = '{{ dataSourcesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';