data_sources
Creates, updates, deletes, gets or lists a data_sources
resource.
Overview
Name | data_sources |
Type | Resource |
Id | google.backupdr.data_sources |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The resource name. |
backupConfigInfo | object | BackupConfigInfo has information about how the resource is configured for Backup and about the most recent backup to this vault. |
backupCount | string | Number of backups in the data source. |
configState | string | Output only. The backup configuration state. |
createTime | string | Output only. The time when the instance was created. |
dataSourceBackupApplianceApplication | object | BackupApplianceApplication describes a Source Resource when it is an application backed up by a BackupAppliance. |
dataSourceGcpResource | object | DataSourceGcpResource is used for protected resources that are Google Cloud Resources. This name is easeier to understand than GcpResourceDataSource or GcpDataSourceResource |
etag | string | Server specified ETag for the ManagementServer resource to prevent simultaneous updates from overwiting each other. |
labels | object | Optional. Resource labels to represent user provided metadata. No labels currently defined: |
state | string | Output only. The DataSource resource instance state. |
totalStoredBytes | string | The number of bytes (metadata and data) stored in this datasource. |
updateTime | string | Output only. The time when the instance was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupVaultsId, dataSourcesId, locationsId, projectsId | Gets details of a DataSource. |
list | SELECT | backupVaultsId, locationsId, projectsId | Lists DataSources in a given project and location. |
remove | DELETE | backupVaultsId, dataSourcesId, locationsId, projectsId | Deletes 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. |
patch | UPDATE | backupVaultsId, dataSourcesId, locationsId, projectsId | Updates the settings of a DataSource. |
abandon_backup | EXEC | backupVaultsId, dataSourcesId, locationsId, projectsId | Internal only. Abandons a backup. |
finalize_backup | EXEC | backupVaultsId, dataSourcesId, locationsId, projectsId | Internal only. Finalize a backup that was started by a call to InitiateBackup. |
initiate_backup | EXEC | backupVaultsId, dataSourcesId, locationsId, projectsId | Internal only. Initiates a backup. |
set_internal_status | EXEC | backupVaultsId, dataSourcesId, locationsId, projectsId | Sets 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 }}';