@maxim_mazurok/gapi.client.sqladmin-v1beta4 0.0.20230928 → 0.0.20231011

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://sqladmin.googleapis.com/$discovery/rest?version=v1beta4
12
- // Revision: 20230928
12
+ // Revision: 20231011
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -378,7 +378,7 @@ declare namespace gapi.client {
378
378
  */
379
379
  outOfDiskReport?:
380
380
  SqlOutOfDiskReport;
381
- /** Output only. The dns name of the primary instance in a replication group. */
381
+ /** Output only. DEPRECATED: please use write_endpoint instead. */
382
382
  primaryDnsName?:
383
383
  string;
384
384
  /** The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. */
@@ -432,6 +432,9 @@ declare namespace gapi.client {
432
432
  /** If the instance state is SUSPENDED, the reason for the suspension. */
433
433
  suspensionReason?:
434
434
  string[];
435
+ /** Output only. The dns name of the primary instance in a replication group. */
436
+ writeEndpoint?:
437
+ string;
435
438
  }
436
439
  interface DatabasesListResponse {
437
440
  /** List of database resources in the instance. */
@@ -914,9 +917,24 @@ declare namespace gapi.client {
914
917
  /** PSC settings for this instance. */
915
918
  pscConfig?:
916
919
  PscConfig;
917
- /** Whether SSL connections over IP are enforced or not. */
920
+ /**
921
+ * LINT.IfChange(require_ssl_deprecate) Whether SSL/TLS connections over IP are enforced or not. If set to false, allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS
922
+ * connections, the client certificate will not be verified. If set to true, only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce
923
+ * SSL/TLS without enforcing the requirement for valid client certificates, use the `ssl_mode` flag instead of the legacy `require_ssl` flag.
924
+ * LINT.ThenChange(//depot/google3/java/com/google/storage/speckle/boss/admin/actions/InstanceUpdateAction.java:update_api_temp_fix)
925
+ */
918
926
  requireSsl?:
919
927
  boolean;
928
+ /**
929
+ * Specify how SSL/TLS will be enforced in database connections. This flag is only supported for PostgreSQL. Use the legacy `require_ssl` flag for enforcing SSL/TLS in MySQL and SQL
930
+ * Server. But, for PostgreSQL, it is recommended to use the `ssl_mode` flag instead of the legacy `require_ssl` flag. To avoid the conflict between those flags in PostgreSQL, only the
931
+ * following value pairs are valid: ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED, require_ssl=false; ssl_mode=ENCRYPTED_ONLY, require_ssl=false;
932
+ * ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED, require_ssl=true; Note that the value of `ssl_mode` gets priority over the value of the legacy `require_ssl`. For example, for the pair
933
+ * `ssl_mode=ENCRYPTED_ONLY, require_ssl=false`, the `ssl_mode=ENCRYPTED_ONLY` means "only accepts SSL connection", while the `require_ssl=false` means "both non-SSL and SSL
934
+ * connections are allowed". The database will respect `ssl_mode` in this case and only accept SSL connections.
935
+ */
936
+ sslMode?:
937
+ string;
920
938
  }
921
939
  interface IpMapping {
922
940
  /** The IP address assigned. */
@@ -1155,6 +1173,9 @@ declare namespace gapi.client {
1155
1173
  /** The complexity of the password. */
1156
1174
  complexity?:
1157
1175
  string;
1176
+ /** Disallow credentials that have been previously compromised by a public data breach. */
1177
+ disallowCompromisedCredentials?:
1178
+ boolean;
1158
1179
  /** Disallow username as a part of the password. */
1159
1180
  disallowUsernameSubstring?:
1160
1181
  boolean;
@@ -1178,8 +1199,8 @@ declare namespace gapi.client {
1178
1199
  }
1179
1200
  interface PscConfig {
1180
1201
  /**
1181
- * List of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer
1182
- * project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
1202
+ * Optional. The list of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects.
1203
+ * Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).
1183
1204
  */
1184
1205
  allowedConsumerProjects?:
1185
1206
  string[];
@@ -1188,6 +1209,9 @@ declare namespace gapi.client {
1188
1209
  boolean;
1189
1210
  }
1190
1211
  interface ReplicaConfiguration {
1212
+ /** Optional. Specifies if a SQL Server replica is a cascadable replica. A cascadable replica is a SQL Server cross region replica that supports replica(s) under it. */
1213
+ cascadableReplica?:
1214
+ boolean;
1191
1215
  /**
1192
1216
  * Specifies if the replica is the failover target. If the field is set to `true` the replica will be designated as a failover replica. In case the primary instance fails, the replica
1193
1217
  * instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.
@@ -2770,7 +2794,7 @@ declare namespace gapi.client {
2770
2794
  /** Selector specifying which fields to include in a partial response. */
2771
2795
  fields?:
2772
2796
  string;
2773
- /** Cloud SQL instance ID. This does not include the project ID. */
2797
+ /** The Cloud SQL instance ID. This doesn't include the project ID. */
2774
2798
  instance:
2775
2799
  string;
2776
2800
  /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
@@ -2814,7 +2838,7 @@ declare namespace gapi.client {
2814
2838
  /** Selector specifying which fields to include in a partial response. */
2815
2839
  fields?:
2816
2840
  string;
2817
- /** Cloud SQL instance ID. This does not include the project ID. */
2841
+ /** The Cloud SQL instance ID. This doesn't include the project ID. */
2818
2842
  instance:
2819
2843
  string;
2820
2844
  /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
@@ -3342,6 +3366,12 @@ declare namespace gapi.client {
3342
3366
  /** JSONP */
3343
3367
  callback?:
3344
3368
  string;
3369
+ /**
3370
+ * Set to true if the promote operation should attempt to re-add the original primary as a replica when it comes back online. Otherwise, if this value is false or not set, the
3371
+ * original primary will be a standalone instance.
3372
+ */
3373
+ failover?:
3374
+ boolean;
3345
3375
  /** Selector specifying which fields to include in a partial response. */
3346
3376
  fields?:
3347
3377
  string;
@@ -3799,6 +3829,54 @@ declare namespace gapi.client {
3799
3829
  uploadType?:
3800
3830
  string;
3801
3831
  }): Request<Operation>;
3832
+ /** Switches over from the primary instance to a replica instance. */
3833
+ switchover(request?: {
3834
+ /** V1 error format. */
3835
+ "$.xgafv"?:
3836
+ string;
3837
+ /** OAuth access token. */
3838
+ access_token?:
3839
+ string;
3840
+ /** Data format for response. */
3841
+ alt?:
3842
+ string;
3843
+ /** JSONP */
3844
+ callback?:
3845
+ string;
3846
+ /**
3847
+ * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24
3848
+ * hours.
3849
+ */
3850
+ dbTimeout?:
3851
+ string;
3852
+ /** Selector specifying which fields to include in a partial response. */
3853
+ fields?:
3854
+ string;
3855
+ /** Cloud SQL read replica instance name. */
3856
+ instance:
3857
+ string;
3858
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
3859
+ key?:
3860
+ string;
3861
+ /** OAuth 2.0 token for the current user. */
3862
+ oauth_token?:
3863
+ string;
3864
+ /** Returns response with indentations and line breaks. */
3865
+ prettyPrint?:
3866
+ boolean;
3867
+ /** ID of the project that contains the replica. */
3868
+ project:
3869
+ string;
3870
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
3871
+ quotaUser?:
3872
+ string;
3873
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3874
+ upload_protocol?:
3875
+ string;
3876
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3877
+ uploadType?:
3878
+ string;
3879
+ }): Request<Operation>;
3802
3880
  /** Truncate MySQL general and slow query log tables MySQL only. */
3803
3881
  truncateLog(request: {
3804
3882
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.sqladmin-v1beta4",
3
- "version": "0.0.20230928",
3
+ "version": "0.0.20231011",
4
4
  "description": "TypeScript typings for Cloud SQL Admin API v1beta4",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -234,6 +234,11 @@ Stops the replication in the read replica instance.
234
234
  */
235
235
  await gapi.client.sql.instances.stopReplica({ instance: "instance", project: "project", });
236
236
 
237
+ /*
238
+ Switches over from the primary instance to a replica instance.
239
+ */
240
+ await gapi.client.sql.instances.switchover({ instance: "instance", project: "project", });
241
+
237
242
  /*
238
243
  Truncate MySQL general and slow query log tables MySQL only.
239
244
  */
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230928
6
+ // Revision: 20231011
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -396,6 +396,7 @@ gapi.load('client', async () => {
396
396
  pscServiceAttachmentLink: "Test string",
397
397
  region: "Test string",
398
398
  replicaConfiguration: {
399
+ cascadableReplica: true,
399
400
  failoverTarget: true,
400
401
  kind: "Test string",
401
402
  mysqlReplicaConfiguration: {
@@ -515,6 +516,7 @@ gapi.load('client', async () => {
515
516
  pscEnabled: true,
516
517
  },
517
518
  requireSsl: true,
519
+ sslMode: "Test string",
518
520
  },
519
521
  kind: "Test string",
520
522
  locationPreference: {
@@ -531,6 +533,7 @@ gapi.load('client', async () => {
531
533
  },
532
534
  passwordValidationPolicy: {
533
535
  complexity: "Test string",
536
+ disallowCompromisedCredentials: true,
534
537
  disallowUsernameSubstring: true,
535
538
  enablePasswordPolicy: true,
536
539
  minLength: 42,
@@ -558,6 +561,7 @@ gapi.load('client', async () => {
558
561
  suspensionReason: [
559
562
  "Test string"
560
563
  ],
564
+ writeEndpoint: "Test string",
561
565
  });
562
566
  /** Lists instances under a given project. */
563
567
  await gapi.client.sql.instances.list({
@@ -641,6 +645,7 @@ gapi.load('client', async () => {
641
645
  pscServiceAttachmentLink: "Test string",
642
646
  region: "Test string",
643
647
  replicaConfiguration: {
648
+ cascadableReplica: true,
644
649
  failoverTarget: true,
645
650
  kind: "Test string",
646
651
  mysqlReplicaConfiguration: {
@@ -760,6 +765,7 @@ gapi.load('client', async () => {
760
765
  pscEnabled: true,
761
766
  },
762
767
  requireSsl: true,
768
+ sslMode: "Test string",
763
769
  },
764
770
  kind: "Test string",
765
771
  locationPreference: {
@@ -776,6 +782,7 @@ gapi.load('client', async () => {
776
782
  },
777
783
  passwordValidationPolicy: {
778
784
  complexity: "Test string",
785
+ disallowCompromisedCredentials: true,
779
786
  disallowUsernameSubstring: true,
780
787
  enablePasswordPolicy: true,
781
788
  minLength: 42,
@@ -803,9 +810,11 @@ gapi.load('client', async () => {
803
810
  suspensionReason: [
804
811
  "Test string"
805
812
  ],
813
+ writeEndpoint: "Test string",
806
814
  });
807
815
  /** Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. */
808
816
  await gapi.client.sql.instances.promoteReplica({
817
+ failover: true,
809
818
  instance: "Test string",
810
819
  project: "Test string",
811
820
  });
@@ -861,6 +870,12 @@ gapi.load('client', async () => {
861
870
  instance: "Test string",
862
871
  project: "Test string",
863
872
  });
873
+ /** Switches over from the primary instance to a replica instance. */
874
+ await gapi.client.sql.instances.switchover({
875
+ dbTimeout: "Test string",
876
+ instance: "Test string",
877
+ project: "Test string",
878
+ });
864
879
  /** Truncate MySQL general and slow query log tables MySQL only. */
865
880
  await gapi.client.sql.instances.truncateLog({
866
881
  instance: "Test string",
@@ -938,6 +953,7 @@ gapi.load('client', async () => {
938
953
  pscServiceAttachmentLink: "Test string",
939
954
  region: "Test string",
940
955
  replicaConfiguration: {
956
+ cascadableReplica: true,
941
957
  failoverTarget: true,
942
958
  kind: "Test string",
943
959
  mysqlReplicaConfiguration: {
@@ -1057,6 +1073,7 @@ gapi.load('client', async () => {
1057
1073
  pscEnabled: true,
1058
1074
  },
1059
1075
  requireSsl: true,
1076
+ sslMode: "Test string",
1060
1077
  },
1061
1078
  kind: "Test string",
1062
1079
  locationPreference: {
@@ -1073,6 +1090,7 @@ gapi.load('client', async () => {
1073
1090
  },
1074
1091
  passwordValidationPolicy: {
1075
1092
  complexity: "Test string",
1093
+ disallowCompromisedCredentials: true,
1076
1094
  disallowUsernameSubstring: true,
1077
1095
  enablePasswordPolicy: true,
1078
1096
  minLength: 42,
@@ -1100,6 +1118,7 @@ gapi.load('client', async () => {
1100
1118
  suspensionReason: [
1101
1119
  "Test string"
1102
1120
  ],
1121
+ writeEndpoint: "Test string",
1103
1122
  });
1104
1123
  /** Cancels an instance operation that has been performed on an instance. */
1105
1124
  await gapi.client.sql.operations.cancel({