Skip to content

Commit c411402

Browse files
feat: [alloydb] add metadata exchange support for AlloyDB connectors (#9639)
* feat: add metadata exchange support for AlloyDB connectors feat: adds metadata field describing an AlloyDB backup's quantity based retention PiperOrigin-RevId: 547600058 Source-Link: googleapis/googleapis@b270d27 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b24f121a6432e1a93a37fbaef768817c68263135 Copy-Tag: eyJwIjoiamF2YS1hbGxveWRiLy5Pd2xCb3QueWFtbCIsImgiOiJiMjRmMTIxYTY0MzJlMWE5M2EzN2ZiYWVmNzY4ODE3YzY4MjYzMTM1In0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 36f5b3c commit c411402

File tree

23 files changed

+2140
-498
lines changed

23 files changed

+2140
-498
lines changed

java-alloydb/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2323
<dependency>
2424
<groupId>com.google.cloud</groupId>
2525
<artifactId>libraries-bom</artifactId>
26-
<version>26.17.0</version>
26+
<version>26.18.0</version>
2727
<type>pom</type>
2828
<scope>import</scope>
2929
</dependency>
@@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies:
4545
<dependency>
4646
<groupId>com.google.cloud</groupId>
4747
<artifactId>google-cloud-alloydb</artifactId>
48-
<version>0.10.0</version>
48+
<version>0.9.0</version>
4949
</dependency>
5050
```
5151

5252
If you are using Gradle without BOM, add this to your dependencies:
5353

5454
```Groovy
55-
implementation 'com.google.cloud:google-cloud-alloydb:0.10.0'
55+
implementation 'com.google.cloud:google-cloud-alloydb:0.9.0'
5656
```
5757

5858
If you are using SBT, add this to your dependencies:
5959

6060
```Scala
61-
libraryDependencies += "com.google.cloud" % "google-cloud-alloydb" % "0.10.0"
61+
libraryDependencies += "com.google.cloud" % "google-cloud-alloydb" % "0.9.0"
6262
```
6363
<!-- {x-version-update-end} -->
6464

@@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
201201
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-alloydb/java11.html
202202
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
203203
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-alloydb.svg
204-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.8.0
204+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-alloydb/0.9.0
205205
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
206206
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
207207
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-alloydb/google-cloud-alloydb/src/main/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClient.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3788,9 +3788,9 @@ public final ListSupportedDatabaseFlagsPagedResponse listSupportedDatabaseFlags(
37883788
// AUTO-GENERATED DOCUMENTATION AND METHOD.
37893789
/**
37903790
* Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to
3791-
* support the Auth Proxy client and the endpoint's behavior is subject to change without notice,
3792-
* so do not rely on its behavior remaining constant. Future changes will not break the Auth Proxy
3793-
* client.
3791+
* support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to
3792+
* change without notice, so do not rely on its behavior remaining constant. Future changes will
3793+
* not break AlloyDB connectors or the Auth Proxy client.
37943794
*
37953795
* <p>Sample code:
37963796
*
@@ -3822,9 +3822,9 @@ public final GenerateClientCertificateResponse generateClientCertificate(Cluster
38223822
// AUTO-GENERATED DOCUMENTATION AND METHOD.
38233823
/**
38243824
* Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to
3825-
* support the Auth Proxy client and the endpoint's behavior is subject to change without notice,
3826-
* so do not rely on its behavior remaining constant. Future changes will not break the Auth Proxy
3827-
* client.
3825+
* support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to
3826+
* change without notice, so do not rely on its behavior remaining constant. Future changes will
3827+
* not break AlloyDB connectors or the Auth Proxy client.
38283828
*
38293829
* <p>Sample code:
38303830
*
@@ -3854,9 +3854,9 @@ public final GenerateClientCertificateResponse generateClientCertificate(String
38543854
// AUTO-GENERATED DOCUMENTATION AND METHOD.
38553855
/**
38563856
* Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to
3857-
* support the Auth Proxy client and the endpoint's behavior is subject to change without notice,
3858-
* so do not rely on its behavior remaining constant. Future changes will not break the Auth Proxy
3859-
* client.
3857+
* support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to
3858+
* change without notice, so do not rely on its behavior remaining constant. Future changes will
3859+
* not break AlloyDB connectors or the Auth Proxy client.
38603860
*
38613861
* <p>Sample code:
38623862
*
@@ -3874,6 +3874,7 @@ public final GenerateClientCertificateResponse generateClientCertificate(String
38743874
* .setPemCsr("pemCsr-991911478")
38753875
* .setCertDuration(Duration.newBuilder().build())
38763876
* .setPublicKey("publicKey1446899510")
3877+
* .setUseMetadataExchange(true)
38773878
* .build();
38783879
* GenerateClientCertificateResponse response =
38793880
* alloyDBAdminClient.generateClientCertificate(request);
@@ -3891,9 +3892,9 @@ public final GenerateClientCertificateResponse generateClientCertificate(
38913892
// AUTO-GENERATED DOCUMENTATION AND METHOD.
38923893
/**
38933894
* Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to
3894-
* support the Auth Proxy client and the endpoint's behavior is subject to change without notice,
3895-
* so do not rely on its behavior remaining constant. Future changes will not break the Auth Proxy
3896-
* client.
3895+
* support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to
3896+
* change without notice, so do not rely on its behavior remaining constant. Future changes will
3897+
* not break AlloyDB connectors or the Auth Proxy client.
38973898
*
38983899
* <p>Sample code:
38993900
*
@@ -3911,6 +3912,7 @@ public final GenerateClientCertificateResponse generateClientCertificate(
39113912
* .setPemCsr("pemCsr-991911478")
39123913
* .setCertDuration(Duration.newBuilder().build())
39133914
* .setPublicKey("publicKey1446899510")
3915+
* .setUseMetadataExchange(true)
39143916
* .build();
39153917
* ApiFuture<GenerateClientCertificateResponse> future =
39163918
* alloyDBAdminClient.generateClientCertificateCallable().futureCall(request);

java-alloydb/google-cloud-alloydb/src/test/java/com/google/cloud/alloydb/v1alpha/AlloyDBAdminClientHttpJsonTest.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ public void getClusterTest() throws Exception {
218218
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
219219
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
220220
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
221+
.setSatisfiesPzs(true)
221222
.build();
222223
mockService.addResponse(expectedResponse);
223224

@@ -283,6 +284,7 @@ public void getClusterTest2() throws Exception {
283284
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
284285
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
285286
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
287+
.setSatisfiesPzs(true)
286288
.build();
287289
mockService.addResponse(expectedResponse);
288290

@@ -348,6 +350,7 @@ public void createClusterTest() throws Exception {
348350
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
349351
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
350352
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
353+
.setSatisfiesPzs(true)
351354
.build();
352355
Operation resultOperation =
353356
Operation.newBuilder()
@@ -422,6 +425,7 @@ public void createClusterTest2() throws Exception {
422425
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
423426
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
424427
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
428+
.setSatisfiesPzs(true)
425429
.build();
426430
Operation resultOperation =
427431
Operation.newBuilder()
@@ -496,6 +500,7 @@ public void updateClusterTest() throws Exception {
496500
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
497501
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
498502
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
503+
.setSatisfiesPzs(true)
499504
.build();
500505
Operation resultOperation =
501506
Operation.newBuilder()
@@ -529,6 +534,7 @@ public void updateClusterTest() throws Exception {
529534
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
530535
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
531536
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
537+
.setSatisfiesPzs(true)
532538
.build();
533539
FieldMask updateMask = FieldMask.newBuilder().build();
534540

@@ -582,6 +588,7 @@ public void updateClusterExceptionTest() throws Exception {
582588
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
583589
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
584590
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
591+
.setSatisfiesPzs(true)
585592
.build();
586593
FieldMask updateMask = FieldMask.newBuilder().build();
587594
client.updateClusterAsync(cluster, updateMask).get();
@@ -706,6 +713,7 @@ public void promoteClusterTest() throws Exception {
706713
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
707714
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
708715
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
716+
.setSatisfiesPzs(true)
709717
.build();
710718
Operation resultOperation =
711719
Operation.newBuilder()
@@ -776,6 +784,7 @@ public void promoteClusterTest2() throws Exception {
776784
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
777785
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
778786
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
787+
.setSatisfiesPzs(true)
779788
.build();
780789
Operation resultOperation =
781790
Operation.newBuilder()
@@ -846,6 +855,7 @@ public void restoreClusterTest() throws Exception {
846855
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
847856
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
848857
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
858+
.setSatisfiesPzs(true)
849859
.build();
850860
Operation resultOperation =
851861
Operation.newBuilder()
@@ -930,6 +940,7 @@ public void createSecondaryClusterTest() throws Exception {
930940
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
931941
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
932942
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
943+
.setSatisfiesPzs(true)
933944
.build();
934945
Operation resultOperation =
935946
Operation.newBuilder()
@@ -1004,6 +1015,7 @@ public void createSecondaryClusterTest2() throws Exception {
10041015
.setContinuousBackupInfo(ContinuousBackupInfo.newBuilder().build())
10051016
.setSecondaryConfig(Cluster.SecondaryConfig.newBuilder().build())
10061017
.setPrimaryConfig(Cluster.PrimaryConfig.newBuilder().build())
1018+
.setSatisfiesPzs(true)
10071019
.build();
10081020
Operation resultOperation =
10091021
Operation.newBuilder()
@@ -1176,6 +1188,7 @@ public void getInstanceTest() throws Exception {
11761188
.setEtag("etag3123477")
11771189
.putAllAnnotations(new HashMap<String, String>())
11781190
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1191+
.setSatisfiesPzs(true)
11791192
.build();
11801193
mockService.addResponse(expectedResponse);
11811194

@@ -1239,6 +1252,7 @@ public void getInstanceTest2() throws Exception {
12391252
.setEtag("etag3123477")
12401253
.putAllAnnotations(new HashMap<String, String>())
12411254
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1255+
.setSatisfiesPzs(true)
12421256
.build();
12431257
mockService.addResponse(expectedResponse);
12441258

@@ -1304,6 +1318,7 @@ public void createInstanceTest() throws Exception {
13041318
.setEtag("etag3123477")
13051319
.putAllAnnotations(new HashMap<String, String>())
13061320
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1321+
.setSatisfiesPzs(true)
13071322
.build();
13081323
Operation resultOperation =
13091324
Operation.newBuilder()
@@ -1376,6 +1391,7 @@ public void createInstanceTest2() throws Exception {
13761391
.setEtag("etag3123477")
13771392
.putAllAnnotations(new HashMap<String, String>())
13781393
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1394+
.setSatisfiesPzs(true)
13791395
.build();
13801396
Operation resultOperation =
13811397
Operation.newBuilder()
@@ -1448,6 +1464,7 @@ public void createSecondaryInstanceTest() throws Exception {
14481464
.setEtag("etag3123477")
14491465
.putAllAnnotations(new HashMap<String, String>())
14501466
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1467+
.setSatisfiesPzs(true)
14511468
.build();
14521469
Operation resultOperation =
14531470
Operation.newBuilder()
@@ -1521,6 +1538,7 @@ public void createSecondaryInstanceTest2() throws Exception {
15211538
.setEtag("etag3123477")
15221539
.putAllAnnotations(new HashMap<String, String>())
15231540
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1541+
.setSatisfiesPzs(true)
15241542
.build();
15251543
Operation resultOperation =
15261544
Operation.newBuilder()
@@ -1653,6 +1671,7 @@ public void updateInstanceTest() throws Exception {
16531671
.setEtag("etag3123477")
16541672
.putAllAnnotations(new HashMap<String, String>())
16551673
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1674+
.setSatisfiesPzs(true)
16561675
.build();
16571676
Operation resultOperation =
16581677
Operation.newBuilder()
@@ -1684,6 +1703,7 @@ public void updateInstanceTest() throws Exception {
16841703
.setEtag("etag3123477")
16851704
.putAllAnnotations(new HashMap<String, String>())
16861705
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1706+
.setSatisfiesPzs(true)
16871707
.build();
16881708
FieldMask updateMask = FieldMask.newBuilder().build();
16891709

@@ -1735,6 +1755,7 @@ public void updateInstanceExceptionTest() throws Exception {
17351755
.setEtag("etag3123477")
17361756
.putAllAnnotations(new HashMap<String, String>())
17371757
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1758+
.setSatisfiesPzs(true)
17381759
.build();
17391760
FieldMask updateMask = FieldMask.newBuilder().build();
17401761
client.updateInstanceAsync(instance, updateMask).get();
@@ -1859,6 +1880,7 @@ public void failoverInstanceTest() throws Exception {
18591880
.setEtag("etag3123477")
18601881
.putAllAnnotations(new HashMap<String, String>())
18611882
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1883+
.setSatisfiesPzs(true)
18621884
.build();
18631885
Operation resultOperation =
18641886
Operation.newBuilder()
@@ -1927,6 +1949,7 @@ public void failoverInstanceTest2() throws Exception {
19271949
.setEtag("etag3123477")
19281950
.putAllAnnotations(new HashMap<String, String>())
19291951
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
1952+
.setSatisfiesPzs(true)
19301953
.build();
19311954
Operation resultOperation =
19321955
Operation.newBuilder()
@@ -1997,6 +2020,7 @@ public void injectFaultTest() throws Exception {
19972020
.setEtag("etag3123477")
19982021
.putAllAnnotations(new HashMap<String, String>())
19992022
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
2023+
.setSatisfiesPzs(true)
20002024
.build();
20012025
Operation resultOperation =
20022026
Operation.newBuilder()
@@ -2067,6 +2091,7 @@ public void injectFaultTest2() throws Exception {
20672091
.setEtag("etag3123477")
20682092
.putAllAnnotations(new HashMap<String, String>())
20692093
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
2094+
.setSatisfiesPzs(true)
20702095
.build();
20712096
Operation resultOperation =
20722097
Operation.newBuilder()
@@ -2139,6 +2164,7 @@ public void restartInstanceTest() throws Exception {
21392164
.setEtag("etag3123477")
21402165
.putAllAnnotations(new HashMap<String, String>())
21412166
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
2167+
.setSatisfiesPzs(true)
21422168
.build();
21432169
Operation resultOperation =
21442170
Operation.newBuilder()
@@ -2207,6 +2233,7 @@ public void restartInstanceTest2() throws Exception {
22072233
.setEtag("etag3123477")
22082234
.putAllAnnotations(new HashMap<String, String>())
22092235
.setUpdatePolicy(Instance.UpdatePolicy.newBuilder().build())
2236+
.setSatisfiesPzs(true)
22102237
.build();
22112238
Operation resultOperation =
22122239
Operation.newBuilder()
@@ -2374,6 +2401,8 @@ public void getBackupTest() throws Exception {
23742401
.putAllAnnotations(new HashMap<String, String>())
23752402
.setSizeBytes(-1796325715)
23762403
.setExpiryTime(Timestamp.newBuilder().build())
2404+
.setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build())
2405+
.setSatisfiesPzs(true)
23772406
.build();
23782407
mockService.addResponse(expectedResponse);
23792408

@@ -2434,6 +2463,8 @@ public void getBackupTest2() throws Exception {
24342463
.putAllAnnotations(new HashMap<String, String>())
24352464
.setSizeBytes(-1796325715)
24362465
.setExpiryTime(Timestamp.newBuilder().build())
2466+
.setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build())
2467+
.setSatisfiesPzs(true)
24372468
.build();
24382469
mockService.addResponse(expectedResponse);
24392470

@@ -2494,6 +2525,8 @@ public void createBackupTest() throws Exception {
24942525
.putAllAnnotations(new HashMap<String, String>())
24952526
.setSizeBytes(-1796325715)
24962527
.setExpiryTime(Timestamp.newBuilder().build())
2528+
.setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build())
2529+
.setSatisfiesPzs(true)
24972530
.build();
24982531
Operation resultOperation =
24992532
Operation.newBuilder()
@@ -2563,6 +2596,8 @@ public void createBackupTest2() throws Exception {
25632596
.putAllAnnotations(new HashMap<String, String>())
25642597
.setSizeBytes(-1796325715)
25652598
.setExpiryTime(Timestamp.newBuilder().build())
2599+
.setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build())
2600+
.setSatisfiesPzs(true)
25662601
.build();
25672602
Operation resultOperation =
25682603
Operation.newBuilder()
@@ -2632,6 +2667,8 @@ public void updateBackupTest() throws Exception {
26322667
.putAllAnnotations(new HashMap<String, String>())
26332668
.setSizeBytes(-1796325715)
26342669
.setExpiryTime(Timestamp.newBuilder().build())
2670+
.setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build())
2671+
.setSatisfiesPzs(true)
26352672
.build();
26362673
Operation resultOperation =
26372674
Operation.newBuilder()
@@ -2660,6 +2697,8 @@ public void updateBackupTest() throws Exception {
26602697
.putAllAnnotations(new HashMap<String, String>())
26612698
.setSizeBytes(-1796325715)
26622699
.setExpiryTime(Timestamp.newBuilder().build())
2700+
.setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build())
2701+
.setSatisfiesPzs(true)
26632702
.build();
26642703
FieldMask updateMask = FieldMask.newBuilder().build();
26652704

@@ -2708,6 +2747,8 @@ public void updateBackupExceptionTest() throws Exception {
27082747
.putAllAnnotations(new HashMap<String, String>())
27092748
.setSizeBytes(-1796325715)
27102749
.setExpiryTime(Timestamp.newBuilder().build())
2750+
.setExpiryQuantity(Backup.QuantityBasedExpiry.newBuilder().build())
2751+
.setSatisfiesPzs(true)
27112752
.build();
27122753
FieldMask updateMask = FieldMask.newBuilder().build();
27132754
client.updateBackupAsync(backup, updateMask).get();

0 commit comments

Comments
 (0)