Tool: ListDataSources
Lists all data sources (protected workloads) contained within a specific backup vault.
The following sample demonstrate how to use curl to invoke the ListDataSources MCP tool.
| Curl Request |
|---|
curl --location 'https://backupdr.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "ListDataSources", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for listing DataSources.
ListDataSourcesRequest
| JSON representation |
|---|
{ "parent": string, "pageSize": integer, "pageToken": string, "filter": string, "orderBy": string } |
| Fields | |
|---|---|
parent |
Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value. |
pageSize |
Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. |
pageToken |
Optional. A token identifying a page of results the server should return. |
filter |
Optional. Filtering results. |
orderBy |
Optional. Hint for how to order the results. |
Output Schema
Response message for listing DataSources.
ListDataSourcesResponse
| JSON representation |
|---|
{
"dataSources": [
{
object ( |
| Fields | |
|---|---|
dataSources[] |
The list of DataSource instances in the project for the specified location. If the '{location}' value in the request is "-", the response contains a list of instances from all locations. In case any location is unreachable, the response will only return data sources in reachable locations and the 'unreachable' field will be populated with a list of unreachable locations. |
nextPageToken |
A token identifying a page of results the server should return. |
unreachable[] |
Locations that could not be reached. |
DataSource
| JSON representation |
|---|
{ "name": string, "state": enum ( |
| Fields | |
|---|---|
name |
Output only. Identifier. Name of the datasource to create. It must have the format |
state |
Output only. The DataSource resource instance state. |
labels |
Optional. Resource labels to represent user provided metadata. No labels currently defined: An object containing a list of |
configState |
Output only. The backup configuration state. |
backupConfigInfo |
Output only. Details of how the resource is configured for backup. |
backupBlockedByVaultAccessRestriction |
Output only. This field is set to true if the backup is blocked by vault access restriction. |
Union field
|
|
createTime |
Output only. The time when the instance was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Union field
|
|
updateTime |
Output only. The time when the instance was updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Union field
|
|
backupCount |
Number of backups in the data source. |
Union field
|
|
etag |
Server specified ETag for the ManagementServer resource to prevent simultaneous updates from overwiting each other. |
Union field
|
|
totalStoredBytes |
The number of bytes (metadata and data) stored in this datasource. |
Union field source_resource. The source resource that is represented by this DataSource. It can be a Google Cloud resource, or one backed up by a Backup Appliance. source_resource can be only one of the following: |
|
dataSourceGcpResource |
The backed up resource is a Google Cloud resource. The word 'DataSource' was included in the names to indicate that this is the representation of the Google Cloud resource used within the DataSource object. |
dataSourceBackupApplianceApplication |
The backed up resource is a backup appliance application. |
LabelsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
BackupConfigInfo
| JSON representation |
|---|
{ "lastBackupState": enum ( |
| Fields | |
|---|---|
lastBackupState |
Output only. The status of the last backup to this BackupVault |
lastSuccessfulBackupConsistencyTime |
Output only. If the last backup were successful, this field has the consistency date. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
lastBackupError |
Output only. If the last backup failed, this field has the error message. |
Union field backup_config. Configuration Info has the resource format-specific configuration. backup_config can be only one of the following: |
|
gcpBackupConfig |
Configuration for a Google Cloud resource. |
backupApplianceBackupConfig |
Configuration for an application backed up by a Backup Appliance. |
Status
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
Any
| JSON representation |
|---|
{ "typeUrl": string, "value": string } |
| Fields | |
|---|---|
typeUrl |
Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): In the original design of |
value |
Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |
GcpBackupConfig
| JSON representation |
|---|
{ "backupPlan": string, "backupPlanDescription": string, "backupPlanAssociation": string, "backupPlanRules": [ string ], "backupPlanRevisionName": string, "backupPlanRevisionId": string } |
| Fields | |
|---|---|
backupPlan |
The name of the backup plan. |
backupPlanDescription |
The description of the backup plan. |
backupPlanAssociation |
The name of the backup plan association. |
backupPlanRules[] |
The names of the backup plan rules which point to this backupvault |
backupPlanRevisionName |
The name of the backup plan revision. |
backupPlanRevisionId |
The user friendly id of the backup plan revision. E.g. v0, v1 etc. |
BackupApplianceBackupConfig
| JSON representation |
|---|
{ "backupApplianceName": string, "backupApplianceId": string, "slaId": string, "applicationName": string, "hostName": string, "sltName": string, "slpName": string } |
| Fields | |
|---|---|
backupApplianceName |
The name of the backup appliance. |
backupApplianceId |
The ID of the backup appliance. |
slaId |
The ID of the SLA of this application. |
applicationName |
The name of the application. |
hostName |
The name of the host where the application is running. |
sltName |
The name of the SLT associated with the application. |
slpName |
The name of the SLP associated with the application. |
DataSourceGcpResource
| JSON representation |
|---|
{ "gcpResourcename": string, "location": string, "type": string, // Union field |
| Fields | |
|---|---|
gcpResourcename |
Output only. Full resource pathname URL of the source Google Cloud resource. |
location |
Location of the resource: |
type |
The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance. |
Union field gcp_resource_properties. gcp_Properties has properties of the Google Cloud Resource. gcp_resource_properties can be only one of the following: |
|
computeInstanceDatasourceProperties |
ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level. |
cloudSqlInstanceDatasourceProperties |
Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud SQL Instance properties that are useful at the Datasource level. |
alloyDbClusterDatasourceProperties |
Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB cluster properties that are useful at the Datasource level. Currently none of its child properties are auditable. If new auditable properties are added, the AUDIT annotation should be added. |
diskDatasourceProperties |
DiskDataSourceProperties has a subset of Disk properties that are useful at the Datasource level. |
filestoreInstanceDatasourceProperties |
Output only. FilestoreInstanceDataSourceProperties has a subset of FileStore instance properties that are useful at the Datasource level. |
ComputeInstanceDataSourceProperties
| JSON representation |
|---|
{ "name": string, "description": string, "machineType": string, "totalDiskCount": string, "totalDiskSizeGb": string } |
| Fields | |
|---|---|
name |
Name of the compute instance backed up by the datasource. |
description |
The description of the Compute Engine instance. |
machineType |
The machine type of the instance. |
totalDiskCount |
The total number of disks attached to the Instance. |
totalDiskSizeGb |
The sum of all the disk sizes. |
CloudSqlInstanceDataSourceProperties
| JSON representation |
|---|
{ "name": string, "databaseInstalledVersion": string, "instanceCreateTime": string, "instanceTier": string } |
| Fields | |
|---|---|
name |
Output only. Name of the Cloud SQL instance backed up by the datasource. Format: projects/{project}/instances/{instance} |
databaseInstalledVersion |
Output only. The installed database version of the Cloud SQL instance. |
instanceCreateTime |
Output only. The instance creation timestamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
instanceTier |
Output only. The tier (or machine type) for this instance. Example: |
AlloyDBClusterDataSourceProperties
| JSON representation |
|---|
{
"name": string,
"pitrWindows": [
{
object ( |
| Fields | |
|---|---|
name |
Output only. Name of the AlloyDB cluster backed up by the datasource. |
pitrWindows[] |
Output only. Point in time recovery windows. The order is guaranteed to be ascending by start time. |
clusterUid |
Output only. The cluster UID of the AlloyDB cluster backed up by the datasource. |
AlloyDbPitrWindow
| JSON representation |
|---|
{ "startTime": string, "endTime": string, "logRetentionDays": string } |
| Fields | |
|---|---|
startTime |
Output only. The start time of the PITR window. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Output only. The end time of the PITR window. It is not set if the corresponding Backup Plan Association is active. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
logRetentionDays |
Output only. Log retention days for the PITR window. |
DiskDataSourceProperties
| JSON representation |
|---|
{ "name": string, "description": string, "type": string, "sizeGb": string } |
| Fields | |
|---|---|
name |
Name of the disk backed up by the datasource. |
description |
The description of the disk. |
type |
The type of the disk. |
sizeGb |
The size of the disk in GB. |
FilestoreInstanceDataSourceProperties
| JSON representation |
|---|
{ "name": string, "instanceCreateTime": string } |
| Fields | |
|---|---|
name |
Output only. Name of the Filestore instance backed up by the datasource. |
instanceCreateTime |
Output only. The instance creation timestamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
DataSourceBackupApplianceApplication
| JSON representation |
|---|
{ "applicationName": string, "backupAppliance": string, "applianceId": string, "type": string, "applicationId": string, "hostname": string, "hostId": string } |
| Fields | |
|---|---|
applicationName |
The name of the Application as known to the Backup Appliance. |
backupAppliance |
Appliance name. |
applianceId |
Appliance Id of the Backup Appliance. |
type |
The type of the application. e.g. VMBackup |
applicationId |
The appid field of the application within the Backup Appliance. |
hostname |
Hostname of the host where the application is running. |
hostId |
Hostid of the application host. |
State
Holds the state of the data source resource.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
State not set. |
CREATING |
The data source is being created. |
ACTIVE |
The data source has been created and is fully usable. |
DELETING |
The data source is being deleted. |
ERROR |
The data source is experiencing an issue and might be unusable. |
BackupConfigState
Backup configuration state. Is the resource configured for backup?
| Enums | |
|---|---|
BACKUP_CONFIG_STATE_UNSPECIFIED |
The possible states of backup configuration. Status not set. |
ACTIVE |
The data source is actively protected (i.e. there is a BackupPlanAssociation or Appliance SLA pointing to it) |
PASSIVE |
The data source is no longer protected (but may have backups under it) |
LastBackupState
LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
| Enums | |
|---|---|
LAST_BACKUP_STATE_UNSPECIFIED |
Status not set. |
FIRST_BACKUP_PENDING |
The first backup has not yet completed |
SUCCEEDED |
The most recent backup was successful |
FAILED |
The most recent backup failed |
PERMISSION_DENIED |
The most recent backup could not be run/failed because of the lack of permissions |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌