|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.backupdr.v1; |
| 18 | + |
| 19 | +import "google/api/annotations.proto"; |
| 20 | +import "google/api/client.proto"; |
| 21 | +import "google/api/field_behavior.proto"; |
| 22 | +import "google/api/field_info.proto"; |
| 23 | +import "google/api/resource.proto"; |
| 24 | +import "google/protobuf/timestamp.proto"; |
| 25 | + |
| 26 | +option csharp_namespace = "Google.Cloud.BackupDR.V1"; |
| 27 | +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; |
| 28 | +option java_multiple_files = true; |
| 29 | +option java_outer_classname = "ProtectionSummaryProto"; |
| 30 | +option java_package = "com.google.cloud.backupdr.v1"; |
| 31 | +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; |
| 32 | +option ruby_package = "Google::Cloud::BackupDR::V1"; |
| 33 | + |
| 34 | +// The Protection Summary service. |
| 35 | +service BackupDrProtectionSummary { |
| 36 | + option (google.api.default_host) = "backupdr.googleapis.com"; |
| 37 | + option (google.api.oauth_scopes) = |
| 38 | + "https://www.googleapis.com/auth/cloud-platform"; |
| 39 | + |
| 40 | + // Lists ResourceBackupConfigs. |
| 41 | + rpc ListResourceBackupConfigs(ListResourceBackupConfigsRequest) |
| 42 | + returns (ListResourceBackupConfigsResponse) { |
| 43 | + option (google.api.http) = { |
| 44 | + get: "/v1/{parent=projects/*/locations/*}/resourceBackupConfigs" |
| 45 | + }; |
| 46 | + option (google.api.method_signature) = "parent"; |
| 47 | + } |
| 48 | +} |
| 49 | + |
| 50 | +// Request for ListResourceBackupConfigs. |
| 51 | +message ListResourceBackupConfigsRequest { |
| 52 | + // Required. The project and location for which to retrieve resource backup |
| 53 | + // configs. Format: 'projects/{project_id}/locations/{location}'. In Google |
| 54 | + // Cloud Backup and DR, locations map to Google Cloud regions, for example |
| 55 | + // **us-central1**. |
| 56 | + string parent = 1 [ |
| 57 | + (google.api.field_behavior) = REQUIRED, |
| 58 | + (google.api.resource_reference) = { |
| 59 | + type: "locations.googleapis.com/Location" |
| 60 | + } |
| 61 | + ]; |
| 62 | + |
| 63 | + // Optional. Requested page size. Server may return fewer items than |
| 64 | + // requested. If unspecified, server will use 100 as default. Maximum value is |
| 65 | + // 500 and values above 500 will be coerced to 500. |
| 66 | + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 67 | + |
| 68 | + // Optional. A token identifying a page of results the server should return. |
| 69 | + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 70 | + |
| 71 | + // Optional. Filtering results. |
| 72 | + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 73 | + |
| 74 | + // Optional. Hint for how to order the results. |
| 75 | + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; |
| 76 | +} |
| 77 | + |
| 78 | +// Response for ListResourceBackupConfigs. |
| 79 | +message ListResourceBackupConfigsResponse { |
| 80 | + // The list of ResourceBackupConfigs for the specified scope. |
| 81 | + repeated ResourceBackupConfig resource_backup_configs = 1; |
| 82 | + |
| 83 | + // A token identifying a page of results the server should return. |
| 84 | + string next_page_token = 2; |
| 85 | +} |
| 86 | + |
| 87 | +// ResourceBackupConfig represents a resource along with its backup |
| 88 | +// configurations. |
| 89 | +message ResourceBackupConfig { |
| 90 | + option (google.api.resource) = { |
| 91 | + type: "backupdr.googleapis.com/ResourceBackupConfig" |
| 92 | + pattern: "projects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}" |
| 93 | + plural: "resourceBackupConfigs" |
| 94 | + singular: "resourceBackupConfig" |
| 95 | + }; |
| 96 | + |
| 97 | + // The type of the cloud resource. |
| 98 | + enum ResourceType { |
| 99 | + // Resource type not set. |
| 100 | + RESOURCE_TYPE_UNSPECIFIED = 0; |
| 101 | + |
| 102 | + // Cloud SQL instance. |
| 103 | + CLOUD_SQL_INSTANCE = 1; |
| 104 | + |
| 105 | + // Compute Engine VM. |
| 106 | + COMPUTE_ENGINE_VM = 2; |
| 107 | + |
| 108 | + // Compute Engine Disk. |
| 109 | + COMPUTE_ENGINE_DISK = 3; |
| 110 | + |
| 111 | + // Compute Engine Regional Disk. |
| 112 | + COMPUTE_ENGINE_REGIONAL_DISK = 4; |
| 113 | + } |
| 114 | + |
| 115 | + // Identifier. The resource name of the ResourceBackupConfig. |
| 116 | + // Format: |
| 117 | + // projects/{project}/locations/{location}/resourceBackupConfigs/{uid} |
| 118 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 119 | + |
| 120 | + // Output only. The unique identifier of the resource backup config. |
| 121 | + string uid = 2 [ |
| 122 | + (google.api.field_info).format = UUID4, |
| 123 | + (google.api.field_behavior) = OUTPUT_ONLY |
| 124 | + ]; |
| 125 | + |
| 126 | + // Output only. The [full resource |
| 127 | + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) |
| 128 | + // of the cloud resource that this configuration applies to. Supported |
| 129 | + // resource types are |
| 130 | + // [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1.ResourceBackupConfig.ResourceType]. |
| 131 | + string target_resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 132 | + |
| 133 | + // Output only. The human friendly name of the target resource. |
| 134 | + string target_resource_display_name = 4 |
| 135 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 136 | + |
| 137 | + // Output only. The type of the target resource. |
| 138 | + ResourceType target_resource_type = 5 |
| 139 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 140 | + |
| 141 | + // Labels associated with the target resource. |
| 142 | + map<string, string> target_resource_labels = 6; |
| 143 | + |
| 144 | + // Backup configurations applying to the target resource, including those |
| 145 | + // targeting its related/child resources. For example, backup configuration |
| 146 | + // applicable to Compute Engine disks will be populated in this field for a |
| 147 | + // Compute Engine VM which has the disk associated. |
| 148 | + repeated BackupConfigDetails backup_configs_details = 7; |
| 149 | + |
| 150 | + // Output only. Whether the target resource is configured for backup. This is |
| 151 | + // true if the backup_configs_details is not empty. |
| 152 | + bool backup_configured = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 153 | + |
| 154 | + // Output only. Whether the target resource is protected by a backup vault. |
| 155 | + // This is true if the backup_configs_details is not empty and any of the |
| 156 | + // [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1.ResourceBackupConfig.backup_configs_details] |
| 157 | + // has a backup configuration with |
| 158 | + // [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1.BackupConfigDetails.backup_vault] |
| 159 | + // set. set. |
| 160 | + bool vaulted = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 161 | +} |
| 162 | + |
| 163 | +// BackupConfigDetails has information about how the resource is configured |
| 164 | +// for backups and about the most recent backup taken for this configuration. |
| 165 | +message BackupConfigDetails { |
| 166 | + // Type of the backup configuration. |
| 167 | + // This enum may receive new values in the future. |
| 168 | + enum Type { |
| 169 | + // Backup config type is unspecified. |
| 170 | + TYPE_UNSPECIFIED = 0; |
| 171 | + |
| 172 | + // Backup config is Cloud SQL instance's automated backup config. |
| 173 | + CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1; |
| 174 | + |
| 175 | + // Backup config is Compute Engine Resource Policy. |
| 176 | + COMPUTE_ENGINE_RESOURCE_POLICY = 2; |
| 177 | + |
| 178 | + // Backup config is Google Cloud Backup and DR's Backup Plan. |
| 179 | + BACKUPDR_BACKUP_PLAN = 3; |
| 180 | + |
| 181 | + // Backup config is Google Cloud Backup and DR's Template. |
| 182 | + BACKUPDR_TEMPLATE = 4; |
| 183 | + } |
| 184 | + |
| 185 | + // The state tells whether the backup config is active or not. |
| 186 | + enum State { |
| 187 | + // Backup config state not set. |
| 188 | + STATE_UNSPECIFIED = 0; |
| 189 | + |
| 190 | + // The config is in an active state protecting the resource |
| 191 | + ACTIVE = 1; |
| 192 | + |
| 193 | + // The config is currently not protecting the resource. Either because it is |
| 194 | + // disabled or the owning project has been deleted without cleanup of the |
| 195 | + // actual resource. |
| 196 | + INACTIVE = 2; |
| 197 | + |
| 198 | + // The config still exists but because of some error state it is not |
| 199 | + // protecting the resource. Like the source project is deleted. For eg. |
| 200 | + // PlanAssociation, BackupPlan is deleted. |
| 201 | + ERROR = 3; |
| 202 | + } |
| 203 | + |
| 204 | + // Output only. The full resource name of the backup config source resource. |
| 205 | + // For example, |
| 206 | + // "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}" |
| 207 | + // or |
| 208 | + // "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}". |
| 209 | + string backup_config_source = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 210 | + |
| 211 | + // Output only. The display name of the backup config source resource. |
| 212 | + string backup_config_source_display_name = 2 |
| 213 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 214 | + |
| 215 | + // Output only. The type of the backup config resource. |
| 216 | + Type type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 217 | + |
| 218 | + // Output only. The state of the backup config resource. |
| 219 | + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 220 | + |
| 221 | + // Output only. Point in time recovery settings of the backup configuration |
| 222 | + // resource. |
| 223 | + PitrSettings pitr_settings = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 224 | + |
| 225 | + // Output only. Timestamp of the latest successful backup created via this |
| 226 | + // backup configuration. |
| 227 | + google.protobuf.Timestamp latest_successful_backup_time = 6 |
| 228 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 229 | + |
| 230 | + // Output only. The [full resource |
| 231 | + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) |
| 232 | + // of the resource that is applicable for the backup configuration. Example: |
| 233 | + // "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}" |
| 234 | + string applicable_resource = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 235 | + |
| 236 | + // Output only. The [full resource |
| 237 | + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) |
| 238 | + // of the backup vault that will store the backups generated through this |
| 239 | + // backup configuration. Example: |
| 240 | + // "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}" |
| 241 | + string backup_vault = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 242 | + |
| 243 | + // The locations where the backups are to be stored. |
| 244 | + repeated BackupLocation backup_locations = 12; |
| 245 | + |
| 246 | + // The plan specific config. This depends on the value of |
| 247 | + // [BackupConfigDetails.type][google.cloud.backupdr.v1.BackupConfigDetails.type]. |
| 248 | + // For type=BACKUPDR_BACKUP_PLAN, backup_dr_plan_config would be populated to |
| 249 | + // capture information related to Google Cloud Backup and DR's Backup Plans. |
| 250 | + // For type=BACKUPDR_TEMPLATE, backup_dr_template_config would be populated to |
| 251 | + // capture information related to Google Cloud Backup and DR's Template |
| 252 | + // details. |
| 253 | + oneof plan_specific_config { |
| 254 | + // Google Cloud Backup and DR's Backup Plan specific data. |
| 255 | + BackupDrPlanConfig backup_dr_plan_config = 10; |
| 256 | + |
| 257 | + // Google Cloud Backup and DR's Template specific data. |
| 258 | + BackupDrTemplateConfig backup_dr_template_config = 11; |
| 259 | + } |
| 260 | +} |
| 261 | + |
| 262 | +// Point in time recovery settings of the backup configuration resource. |
| 263 | +message PitrSettings { |
| 264 | + // Output only. Number of days to retain the backup. |
| 265 | + int32 retention_days = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 266 | +} |
| 267 | + |
| 268 | +// Provides additional information about Google Cloud Backup |
| 269 | +// and DR's Template backup configuration. |
| 270 | +message BackupDrTemplateConfig { |
| 271 | + // Output only. The URI of the BackupDr template resource for the first party |
| 272 | + // identity users. |
| 273 | + string first_party_management_uri = 1 |
| 274 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 275 | + |
| 276 | + // Output only. The URI of the BackupDr template resource for the third party |
| 277 | + // identity users. |
| 278 | + string third_party_management_uri = 2 |
| 279 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 280 | +} |
| 281 | + |
| 282 | +// BackupDrPlanConfig has additional information about Google Cloud Backup and |
| 283 | +// DR's Plan backup configuration. |
| 284 | +message BackupDrPlanConfig { |
| 285 | + // Backup rules of the backup plan resource. |
| 286 | + repeated BackupDrPlanRule backup_dr_plan_rules = 1; |
| 287 | +} |
| 288 | + |
| 289 | +// BackupDrPlanRule has rule specific information of the backup plan resource. |
| 290 | +message BackupDrPlanRule { |
| 291 | + // Output only. Unique Id of the backup rule. |
| 292 | + string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 293 | + |
| 294 | + // Output only. Timestamp of the latest successful backup created via this |
| 295 | + // backup rule. |
| 296 | + google.protobuf.Timestamp last_successful_backup_time = 2 |
| 297 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 298 | +} |
| 299 | + |
| 300 | +// BackupLocation represents a cloud location where a backup can be stored. |
| 301 | +message BackupLocation { |
| 302 | + // The type of the location. |
| 303 | + enum Type { |
| 304 | + // Location type is unspecified. |
| 305 | + TYPE_UNSPECIFIED = 0; |
| 306 | + |
| 307 | + // Location type is zonal. |
| 308 | + ZONAL = 1; |
| 309 | + |
| 310 | + // Location type is regional. |
| 311 | + REGIONAL = 2; |
| 312 | + |
| 313 | + // Location type is multi regional. |
| 314 | + MULTI_REGIONAL = 3; |
| 315 | + } |
| 316 | + |
| 317 | + // Output only. The type of the location. |
| 318 | + Type type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 319 | + |
| 320 | + // Output only. The id of the cloud location. Example: "us-central1" |
| 321 | + string location_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 322 | +} |
0 commit comments