Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: [backupdr] Remove visibility of unneeded TestIamPermissions RPC #5713

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
34 changes: 32 additions & 2 deletions packages/google-cloud-backupdr/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ package google.cloud.backupdr.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/field_info.proto";
import "google/api/resource.proto";
import "google/cloud/backupdr/v1/backupplan.proto";
import "google/cloud/backupdr/v1/backupplanassociation.proto";
import "google/cloud/backupdr/v1/backupvault.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -84,6 +88,266 @@ service BackupDR {
metadata_type: "OperationMetadata"
};
}

// Creates a new BackupVault in a given project and location.
rpc CreateBackupVault(CreateBackupVaultRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/backupVaults"
body: "backup_vault"
};
option (google.api.method_signature) =
"parent,backup_vault,backup_vault_id";
option (google.longrunning.operation_info) = {
response_type: "BackupVault"
metadata_type: "OperationMetadata"
};
}

// Lists BackupVaults in a given project and location.
rpc ListBackupVaults(ListBackupVaultsRequest)
returns (ListBackupVaultsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/backupVaults"
};
option (google.api.method_signature) = "parent";
}

// FetchUsableBackupVaults lists usable BackupVaults in a given project and
// location. Usable BackupVault are the ones that user has
// backupdr.backupVaults.get permission.
rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest)
returns (FetchUsableBackupVaultsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable"
};
option (google.api.method_signature) = "parent";
}

// Gets details of a BackupVault.
rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/backupVaults/*}"
};
option (google.api.method_signature) = "name";
}

// Updates the settings of a BackupVault.
rpc UpdateBackupVault(UpdateBackupVaultRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}"
body: "backup_vault"
};
option (google.api.method_signature) = "backup_vault,update_mask";
option (google.longrunning.operation_info) = {
response_type: "BackupVault"
metadata_type: "OperationMetadata"
};
}

// Deletes a BackupVault.
rpc DeleteBackupVault(DeleteBackupVaultRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/backupVaults/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "OperationMetadata"
};
}

// Lists DataSources in a given project and location.
rpc ListDataSources(ListDataSourcesRequest)
returns (ListDataSourcesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources"
};
option (google.api.method_signature) = "parent";
}

// Gets details of a DataSource.
rpc GetDataSource(GetDataSourceRequest) returns (DataSource) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}"
};
option (google.api.method_signature) = "name";
}

// Updates the settings of a DataSource.
rpc UpdateDataSource(UpdateDataSourceRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}"
body: "data_source"
};
option (google.api.method_signature) = "data_source,update_mask";
option (google.longrunning.operation_info) = {
response_type: "DataSource"
metadata_type: "OperationMetadata"
};
}

// Lists Backups in a given project and location.
rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups"
};
option (google.api.method_signature) = "parent";
}

// Gets details of a Backup.
rpc GetBackup(GetBackupRequest) returns (Backup) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}"
};
option (google.api.method_signature) = "name";
}

// Updates the settings of a Backup.
rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}"
body: "backup"
};
option (google.api.method_signature) = "backup,update_mask";
option (google.longrunning.operation_info) = {
response_type: "Backup"
metadata_type: "OperationMetadata"
};
}

// Deletes a Backup.
rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "Backup"
metadata_type: "OperationMetadata"
};
}

// Restore from a Backup
rpc RestoreBackup(RestoreBackupRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore"
body: "*"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "RestoreBackupResponse"
metadata_type: "OperationMetadata"
};
}

// Create a BackupPlan
rpc CreateBackupPlan(CreateBackupPlanRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/backupPlans"
body: "backup_plan"
};
option (google.api.method_signature) = "parent,backup_plan,backup_plan_id";
option (google.longrunning.operation_info) = {
response_type: "BackupPlan"
metadata_type: "OperationMetadata"
};
}

// Gets details of a single BackupPlan.
rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/backupPlans/*}"
};
option (google.api.method_signature) = "name";
}

// Lists BackupPlans in a given project and location.
rpc ListBackupPlans(ListBackupPlansRequest)
returns (ListBackupPlansResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/backupPlans"
};
option (google.api.method_signature) = "parent";
}

// Deletes a single BackupPlan.
rpc DeleteBackupPlan(DeleteBackupPlanRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/backupPlans/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "OperationMetadata"
};
}

// Create a BackupPlanAssociation
rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations"
body: "backup_plan_association"
};
option (google.api.method_signature) =
"parent,backup_plan_association,backup_plan_association_id";
option (google.longrunning.operation_info) = {
response_type: "BackupPlanAssociation"
metadata_type: "OperationMetadata"
};
}

// Gets details of a single BackupPlanAssociation.
rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest)
returns (BackupPlanAssociation) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}"
};
option (google.api.method_signature) = "name";
}

// Lists BackupPlanAssociations in a given project and location.
rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest)
returns (ListBackupPlanAssociationsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations"
};
option (google.api.method_signature) = "parent";
}

// Deletes a single BackupPlanAssociation.
rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "OperationMetadata"
};
}

// Triggers a new Backup.
rpc TriggerBackup(TriggerBackupRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup"
body: "*"
};
option (google.api.method_signature) = "name,rule_id";
option (google.longrunning.operation_info) = {
response_type: "BackupPlanAssociation"
metadata_type: "OperationMetadata"
};
}
}

// Network configuration for ManagementServer instance.
Expand Down Expand Up @@ -236,7 +500,7 @@ message ManagementServer {

// Output only. The OAuth 2.0 client id is required to make API calls to the
// BackupDR instance API of this ManagementServer. This is the value that
// should be provided in the aud field of the OIDC ID Token (see openid
// should be provided in the 'aud' field of the OIDC ID Token (see openid
// specification
// https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand All @@ -261,10 +525,11 @@ message ManagementServer {
// Request message for listing management servers.
message ListManagementServersRequest {
// Required. The project and location for which to retrieve management servers
// information, in the format `projects/{project_id}/locations/{location}`. In
// Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
// To retrieve management servers for all locations, use "-" for the
// `{location}` value.
// information, in the format 'projects/{project_id}/locations/{location}'. In
// Cloud BackupDR, locations map to Google Cloud regions, for example
// **us-central1**. To retrieve management servers for all locations, use "-"
// for the
// '{location}' value.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -291,7 +556,7 @@ message ListManagementServersResponse {
// The list of ManagementServer instances in the project for the specified
// location.
//
// If the `{location}` value in the request is "-", the response contains a
// 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 management servers in reachable locations and
// the 'unreachable' field will be populated with a list of unreachable
Expand All @@ -308,7 +573,7 @@ message ListManagementServersResponse {
// Request message for getting a management server instance.
message GetManagementServerRequest {
// Required. Name of the management server resource name, in the format
// `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
// 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -320,8 +585,8 @@ message GetManagementServerRequest {
// Request message for creating a management server instance.
message CreateManagementServerRequest {
// Required. The management server project and location in the format
// `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
// locations map to GCP regions, for example **us-central1**.
// 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
// locations map to Google Cloud regions, for example **us-central1**.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -403,7 +668,7 @@ message OperationMetadata {
// of the operation. Operations that have successfully been cancelled
// have [Operation.error][] value with a
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
// `Code.CANCELLED`.
// 'Code.CANCELLED'.
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. API version used to start the operation.
Expand Down
Loading
Loading