Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
Remove AwsCrossAccountRole from AWS sample.
Browse files Browse the repository at this point in the history
This was updated in https://github.com/googleapis/java-bigqueryconnection/pull/576/files, but one reference to AwsCrossAccountRole was not changed, which causes the sample to not work as the cross account role is no longer supported.
  • Loading branch information
TAnchor committed Jun 7, 2023
1 parent c798552 commit a64289a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

// [START bigqueryconnection_create_aws_connection]
import com.google.cloud.bigquery.connection.v1.AwsAccessRole;
import com.google.cloud.bigquery.connection.v1.AwsCrossAccountRole;
import com.google.cloud.bigquery.connection.v1.AwsProperties;
import com.google.cloud.bigquery.connection.v1.Connection;
import com.google.cloud.bigquery.connection.v1.CreateConnectionRequest;
Expand All @@ -37,8 +36,8 @@ public static void main(String[] args) throws IOException {
String connectionId = "MY_CONNECTION_ID";
// Example of role id: arn:aws:iam::accountId:role/myrole
String iamRoleId = "MY_AWS_ROLE_ID";
AwsCrossAccountRole role = AwsCrossAccountRole.newBuilder().setIamRoleId(iamRoleId).build();
AwsProperties awsProperties = AwsProperties.newBuilder().setCrossAccountRole(role).build();
AwsAccessRole role = AwsAccessRole.newBuilder().setIamRoleId(iamRoleId).build();
AwsProperties awsProperties = AwsProperties.newBuilder().setAccessRole(role).build();
Connection connection = Connection.newBuilder().setAws(awsProperties).build();
createAwsConnection(projectId, location, connectionId, connection);
}
Expand Down

0 comments on commit a64289a

Please sign in to comment.