Skip to content

Commit

Permalink
feat: add cloud spanner connection support
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 384325792
  • Loading branch information
Google APIs authored and Copybara-Service committed Jul 12, 2021
1 parent c61a01d commit eba5492
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion google/cloud/bigquery/connection/v1/connection.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -233,6 +233,9 @@ message Connection {

// Amazon Web Services (AWS) properties.
AwsProperties aws = 8;

// Cloud Spanner properties.
CloudSpannerProperties cloud_spanner = 21;
}

// Output only. The creation timestamp of the connection.
Expand Down Expand Up @@ -281,13 +284,26 @@ message CloudSqlCredential {
string password = 2;
}

// Connection properties specific to Cloud Spanner.
message CloudSpannerProperties {
// Cloud Spanner database in the form `project/instance/database'
string database = 1;

// If parallelism should be used when reading from Cloud Spanner
bool use_parallelism = 2;
}

// Connection properties specific to Amazon Web Services (AWS).
message AwsProperties {
// Authentication method chosen at connection creation.
oneof authentication_method {
// Authentication using Google owned AWS IAM user's access key to assume
// into customer's AWS IAM Role.
AwsCrossAccountRole cross_account_role = 2;

// Authentication using Google owned service account to assume into
// customer's AWS IAM Role.
AwsAccessRole access_role = 3;
}
}

Expand All @@ -306,3 +322,15 @@ message AwsCrossAccountRole {
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
string external_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Authentication method for Amazon Web Services (AWS) that uses Google owned
// Google service account to assume into customer's AWS IAM Role.
message AwsAccessRole {
// The user’s AWS IAM Role that trusts the Google-owned AWS IAM user
// Connection.
string iam_role_id = 1;

// A unique Google-owned and Google-generated identity for the Connection.
// This identity will be used to access the user's AWS IAM Role.
string identity = 2;
}

0 comments on commit eba5492

Please sign in to comment.