@googleapis/alloydb 13.0.1 → 14.0.1
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/CHANGELOG.md +24 -0
- package/build/v1.d.ts +2630 -5
- package/build/v1.js.map +1 -1
- package/build/v1alpha.d.ts +2685 -15
- package/build/v1alpha.js.map +1 -1
- package/build/v1beta.d.ts +2673 -16
- package/build/v1beta.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +2630 -5
- package/v1alpha.ts +2685 -15
- package/v1beta.ts +2673 -16
package/v1beta.ts
CHANGED
|
@@ -440,6 +440,10 @@ export namespace alloydb_v1beta {
|
|
|
440
440
|
* Cross Region replication config specific to SECONDARY cluster.
|
|
441
441
|
*/
|
|
442
442
|
secondaryConfig?: Schema$SecondaryConfig;
|
|
443
|
+
/**
|
|
444
|
+
* Output only. AlloyDB per-cluster service account. This service account is created per-cluster per-project, and is different from the per-project service account. The per-cluster service account naming format is subject to change.
|
|
445
|
+
*/
|
|
446
|
+
serviceAccountEmail?: string | null;
|
|
443
447
|
/**
|
|
444
448
|
* SSL configuration for this AlloyDB cluster.
|
|
445
449
|
*/
|
|
@@ -532,7 +536,7 @@ export namespace alloydb_v1beta {
|
|
|
532
536
|
*/
|
|
533
537
|
export interface Schema$ConnectionPoolConfig {
|
|
534
538
|
/**
|
|
535
|
-
* Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to 20.
|
|
539
|
+
* Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to 20. Note: This field should not be added to client libraries if not present already.
|
|
536
540
|
*/
|
|
537
541
|
defaultPoolSize?: string | null;
|
|
538
542
|
/**
|
|
@@ -548,35 +552,39 @@ export namespace alloydb_v1beta {
|
|
|
548
552
|
*/
|
|
549
553
|
flags?: {[key: string]: string} | null;
|
|
550
554
|
/**
|
|
551
|
-
* Optional. Deprecated. Use 'flags' instead. The list of startup parameters to ignore. Defaults to ["extra_float_digits"]
|
|
555
|
+
* Optional. Deprecated. Use 'flags' instead. The list of startup parameters to ignore. Defaults to ["extra_float_digits"] Note: This field should not be added to client libraries if not present already.
|
|
552
556
|
*/
|
|
553
557
|
ignoreStartupParameters?: string[] | null;
|
|
554
558
|
/**
|
|
555
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of client connections allowed.
|
|
559
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of client connections allowed. Note: This field should not be added to client libraries if not present already.
|
|
556
560
|
*/
|
|
557
561
|
maxClientConn?: string | null;
|
|
558
562
|
/**
|
|
559
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of prepared statements allowed. MCP makes sure that any statement prepared by a client, up to this limit, is available on the backing server connection in transaction and statement pooling mode. Even if the statement was originally prepared on another server connection. Defaults to 0.
|
|
563
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of prepared statements allowed. MCP makes sure that any statement prepared by a client, up to this limit, is available on the backing server connection in transaction and statement pooling mode. Even if the statement was originally prepared on another server connection. Defaults to 0. Note: This field should not be added to client libraries if not present already.
|
|
560
564
|
*/
|
|
561
565
|
maxPreparedStatements?: string | null;
|
|
562
566
|
/**
|
|
563
|
-
* Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to 0.
|
|
567
|
+
* Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to 0. Note: This field should not be added to client libraries if not present already.
|
|
564
568
|
*/
|
|
565
569
|
minPoolSize?: string | null;
|
|
566
570
|
/**
|
|
567
|
-
*
|
|
571
|
+
* Output only. The number of running poolers per instance.
|
|
572
|
+
*/
|
|
573
|
+
poolerCount?: number | null;
|
|
574
|
+
/**
|
|
575
|
+
* Optional. Deprecated. Use 'flags' instead. The pool mode. Defaults to `POOL_MODE_TRANSACTION`. Note: This field should not be added to client libraries if not present already.
|
|
568
576
|
*/
|
|
569
577
|
poolMode?: string | null;
|
|
570
578
|
/**
|
|
571
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds queries are allowed to spend waiting for execution. If the query is not assigned to a server during that time, the client is disconnected. 0 disables.
|
|
579
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds queries are allowed to spend waiting for execution. If the query is not assigned to a server during that time, the client is disconnected. 0 disables. Note: This field should not be added to client libraries if not present already.
|
|
572
580
|
*/
|
|
573
581
|
queryWaitTimeout?: string | null;
|
|
574
582
|
/**
|
|
575
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a server is allowed to be idle before it is disconnected. 0 disables.
|
|
583
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a server is allowed to be idle before it is disconnected. 0 disables. Note: This field should not be added to client libraries if not present already.
|
|
576
584
|
*/
|
|
577
585
|
serverIdleTimeout?: string | null;
|
|
578
586
|
/**
|
|
579
|
-
* Optional. Deprecated. Use 'flags' instead. The list of users that are allowed to connect to the MCP stats console. The users must exist in the database.
|
|
587
|
+
* Optional. Deprecated. Use 'flags' instead. The list of users that are allowed to connect to the MCP stats console. The users must exist in the database. Note: This field should not be added to client libraries if not present already.
|
|
580
588
|
*/
|
|
581
589
|
statsUsers?: string[] | null;
|
|
582
590
|
}
|
|
@@ -602,7 +610,7 @@ export namespace alloydb_v1beta {
|
|
|
602
610
|
*/
|
|
603
611
|
export interface Schema$ContinuousBackupInfo {
|
|
604
612
|
/**
|
|
605
|
-
* Output only. The earliest restorable time that can be restored to.
|
|
613
|
+
* Output only. The earliest restorable time that can be restored to. If continuous backups and recovery was recently enabled, the earliest restorable time is the creation time of the earliest eligible backup within this cluster's continuous backup recovery window. After a cluster has had continuous backups enabled for the duration of its recovery window, the earliest restorable time becomes "now minus the recovery window". For example, assuming a point in time recovery is attempted at 04/16/2025 3:23:00PM with a 14d recovery window, the earliest restorable time would be 04/02/2025 3:23:00PM. This field is only visible if the CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided.
|
|
606
614
|
*/
|
|
607
615
|
earliestRestorableTime?: string | null;
|
|
608
616
|
/**
|
|
@@ -614,7 +622,7 @@ export namespace alloydb_v1beta {
|
|
|
614
622
|
*/
|
|
615
623
|
encryptionInfo?: Schema$EncryptionInfo;
|
|
616
624
|
/**
|
|
617
|
-
* Output only. Days of the week on which a continuous backup is taken.
|
|
625
|
+
* Output only. Days of the week on which a continuous backup is taken.
|
|
618
626
|
*/
|
|
619
627
|
schedule?: string[] | null;
|
|
620
628
|
}
|
|
@@ -773,7 +781,7 @@ export namespace alloydb_v1beta {
|
|
|
773
781
|
uri?: string | null;
|
|
774
782
|
}
|
|
775
783
|
/**
|
|
776
|
-
* Deprecated and unused. This
|
|
784
|
+
* Deprecated and unused. This message will be removed in the near future.
|
|
777
785
|
*/
|
|
778
786
|
export interface Schema$GeminiClusterConfig {
|
|
779
787
|
/**
|
|
@@ -782,7 +790,7 @@ export namespace alloydb_v1beta {
|
|
|
782
790
|
entitled?: boolean | null;
|
|
783
791
|
}
|
|
784
792
|
/**
|
|
785
|
-
* Deprecated and unused. This
|
|
793
|
+
* Deprecated and unused. This message will be removed in the near future.
|
|
786
794
|
*/
|
|
787
795
|
export interface Schema$GeminiInstanceConfig {
|
|
788
796
|
/**
|
|
@@ -1049,6 +1057,10 @@ export namespace alloydb_v1beta {
|
|
|
1049
1057
|
* Metadata related to instance-level network configuration.
|
|
1050
1058
|
*/
|
|
1051
1059
|
export interface Schema$InstanceNetworkConfig {
|
|
1060
|
+
/**
|
|
1061
|
+
* Optional. Name of the allocated IP range for the private IP AlloyDB instance, for example: "google-managed-services-default". If set, the instance IPs will be created from this allocated range and will override the IP range used by the parent cluster. The range name must comply with [RFC 1035](http://datatracker.ietf.org/doc/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?.
|
|
1062
|
+
*/
|
|
1063
|
+
allocatedIpRangeOverride?: string | null;
|
|
1052
1064
|
/**
|
|
1053
1065
|
* Optional. A list of external network authorized to access this instance.
|
|
1054
1066
|
*/
|
|
@@ -1067,7 +1079,7 @@ export namespace alloydb_v1beta {
|
|
|
1067
1079
|
network?: string | null;
|
|
1068
1080
|
}
|
|
1069
1081
|
/**
|
|
1070
|
-
* Details regarding the upgrade of
|
|
1082
|
+
* Details regarding the upgrade of instances associated with a cluster.
|
|
1071
1083
|
*/
|
|
1072
1084
|
export interface Schema$InstanceUpgradeDetails {
|
|
1073
1085
|
/**
|
|
@@ -1321,6 +1333,10 @@ export namespace alloydb_v1beta {
|
|
|
1321
1333
|
* Track actively running queries on the instance. If not set, this flag is "off" by default.
|
|
1322
1334
|
*/
|
|
1323
1335
|
trackActiveQueries?: boolean | null;
|
|
1336
|
+
/**
|
|
1337
|
+
* Track client address for an instance. If not set, default value is "off".
|
|
1338
|
+
*/
|
|
1339
|
+
trackClientAddress?: boolean | null;
|
|
1324
1340
|
/**
|
|
1325
1341
|
* Track wait events during query execution for an instance. This flag is turned "on" by default but tracking is enabled only after observability enabled flag is also turned on.
|
|
1326
1342
|
*/
|
|
@@ -1810,7 +1826,7 @@ export namespace alloydb_v1beta {
|
|
|
1810
1826
|
internalResourceMetadata?: Schema$StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata[];
|
|
1811
1827
|
}
|
|
1812
1828
|
/**
|
|
1813
|
-
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.
|
|
1829
|
+
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 8
|
|
1814
1830
|
*/
|
|
1815
1831
|
export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed {
|
|
1816
1832
|
/**
|
|
@@ -1854,6 +1870,10 @@ export namespace alloydb_v1beta {
|
|
|
1854
1870
|
* The external-uri of the signal, using which more information about this signal can be obtained. In GCP, this will take user to SCC page to get more details about signals.
|
|
1855
1871
|
*/
|
|
1856
1872
|
externalUri?: string | null;
|
|
1873
|
+
/**
|
|
1874
|
+
* This is used to identify the location of the resource. Example: "us-central1"
|
|
1875
|
+
*/
|
|
1876
|
+
location?: string | null;
|
|
1857
1877
|
/**
|
|
1858
1878
|
* Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.
|
|
1859
1879
|
*/
|
|
@@ -1901,7 +1921,7 @@ export namespace alloydb_v1beta {
|
|
|
1901
1921
|
*/
|
|
1902
1922
|
providerDescription?: string | null;
|
|
1903
1923
|
/**
|
|
1904
|
-
* Required. The type of resource this ID is identifying. Ex
|
|
1924
|
+
* Required. The type of resource this ID is identifying. Ex go/keep-sorted start alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance compute.googleapis.com/Instance firestore.googleapis.com/Database, redis.googleapis.com/Instance, redis.googleapis.com/Cluster, oracledatabase.googleapis.com/CloudExadataInfrastructure oracledatabase.googleapis.com/CloudVmCluster oracledatabase.googleapis.com/AutonomousDatabase spanner.googleapis.com/Instance, spanner.googleapis.com/Database, sqladmin.googleapis.com/Instance, go/keep-sorted end REQUIRED Please refer go/condor-common-datamodel
|
|
1905
1925
|
*/
|
|
1906
1926
|
resourceType?: string | null;
|
|
1907
1927
|
/**
|
|
@@ -2464,6 +2484,56 @@ export namespace alloydb_v1beta {
|
|
|
2464
2484
|
|
|
2465
2485
|
/**
|
|
2466
2486
|
* Gets information about a location.
|
|
2487
|
+
* @example
|
|
2488
|
+
* ```js
|
|
2489
|
+
* // Before running the sample:
|
|
2490
|
+
* // - Enable the API at:
|
|
2491
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2492
|
+
* // - Login into gcloud by running:
|
|
2493
|
+
* // ```sh
|
|
2494
|
+
* // $ gcloud auth application-default login
|
|
2495
|
+
* // ```
|
|
2496
|
+
* // - Install the npm module by running:
|
|
2497
|
+
* // ```sh
|
|
2498
|
+
* // $ npm install googleapis
|
|
2499
|
+
* // ```
|
|
2500
|
+
*
|
|
2501
|
+
* const {google} = require('googleapis');
|
|
2502
|
+
* const alloydb = google.alloydb('v1beta');
|
|
2503
|
+
*
|
|
2504
|
+
* async function main() {
|
|
2505
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2506
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2507
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2508
|
+
* });
|
|
2509
|
+
*
|
|
2510
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2511
|
+
* const authClient = await auth.getClient();
|
|
2512
|
+
* google.options({auth: authClient});
|
|
2513
|
+
*
|
|
2514
|
+
* // Do the magic
|
|
2515
|
+
* const res = await alloydb.projects.locations.get({
|
|
2516
|
+
* // Resource name for the location.
|
|
2517
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2518
|
+
* });
|
|
2519
|
+
* console.log(res.data);
|
|
2520
|
+
*
|
|
2521
|
+
* // Example response
|
|
2522
|
+
* // {
|
|
2523
|
+
* // "displayName": "my_displayName",
|
|
2524
|
+
* // "labels": {},
|
|
2525
|
+
* // "locationId": "my_locationId",
|
|
2526
|
+
* // "metadata": {},
|
|
2527
|
+
* // "name": "my_name"
|
|
2528
|
+
* // }
|
|
2529
|
+
* }
|
|
2530
|
+
*
|
|
2531
|
+
* main().catch(e => {
|
|
2532
|
+
* console.error(e);
|
|
2533
|
+
* throw e;
|
|
2534
|
+
* });
|
|
2535
|
+
*
|
|
2536
|
+
* ```
|
|
2467
2537
|
*
|
|
2468
2538
|
* @param params - Parameters for request
|
|
2469
2539
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2556,6 +2626,61 @@ export namespace alloydb_v1beta {
|
|
|
2556
2626
|
|
|
2557
2627
|
/**
|
|
2558
2628
|
* Lists information about the supported locations for this service.
|
|
2629
|
+
* @example
|
|
2630
|
+
* ```js
|
|
2631
|
+
* // Before running the sample:
|
|
2632
|
+
* // - Enable the API at:
|
|
2633
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2634
|
+
* // - Login into gcloud by running:
|
|
2635
|
+
* // ```sh
|
|
2636
|
+
* // $ gcloud auth application-default login
|
|
2637
|
+
* // ```
|
|
2638
|
+
* // - Install the npm module by running:
|
|
2639
|
+
* // ```sh
|
|
2640
|
+
* // $ npm install googleapis
|
|
2641
|
+
* // ```
|
|
2642
|
+
*
|
|
2643
|
+
* const {google} = require('googleapis');
|
|
2644
|
+
* const alloydb = google.alloydb('v1beta');
|
|
2645
|
+
*
|
|
2646
|
+
* async function main() {
|
|
2647
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2648
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2649
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2650
|
+
* });
|
|
2651
|
+
*
|
|
2652
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2653
|
+
* const authClient = await auth.getClient();
|
|
2654
|
+
* google.options({auth: authClient});
|
|
2655
|
+
*
|
|
2656
|
+
* // Do the magic
|
|
2657
|
+
* const res = await alloydb.projects.locations.list({
|
|
2658
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
2659
|
+
* extraLocationTypes: 'placeholder-value',
|
|
2660
|
+
* // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
|
2661
|
+
* filter: 'placeholder-value',
|
|
2662
|
+
* // The resource that owns the locations collection, if applicable.
|
|
2663
|
+
* name: 'projects/my-project',
|
|
2664
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
2665
|
+
* pageSize: 'placeholder-value',
|
|
2666
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
2667
|
+
* pageToken: 'placeholder-value',
|
|
2668
|
+
* });
|
|
2669
|
+
* console.log(res.data);
|
|
2670
|
+
*
|
|
2671
|
+
* // Example response
|
|
2672
|
+
* // {
|
|
2673
|
+
* // "locations": [],
|
|
2674
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
2675
|
+
* // }
|
|
2676
|
+
* }
|
|
2677
|
+
*
|
|
2678
|
+
* main().catch(e => {
|
|
2679
|
+
* console.error(e);
|
|
2680
|
+
* throw e;
|
|
2681
|
+
* });
|
|
2682
|
+
*
|
|
2683
|
+
* ```
|
|
2559
2684
|
*
|
|
2560
2685
|
* @param params - Parameters for request
|
|
2561
2686
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2695,6 +2820,93 @@ export namespace alloydb_v1beta {
|
|
|
2695
2820
|
|
|
2696
2821
|
/**
|
|
2697
2822
|
* Creates a new Backup in a given project and location.
|
|
2823
|
+
* @example
|
|
2824
|
+
* ```js
|
|
2825
|
+
* // Before running the sample:
|
|
2826
|
+
* // - Enable the API at:
|
|
2827
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2828
|
+
* // - Login into gcloud by running:
|
|
2829
|
+
* // ```sh
|
|
2830
|
+
* // $ gcloud auth application-default login
|
|
2831
|
+
* // ```
|
|
2832
|
+
* // - Install the npm module by running:
|
|
2833
|
+
* // ```sh
|
|
2834
|
+
* // $ npm install googleapis
|
|
2835
|
+
* // ```
|
|
2836
|
+
*
|
|
2837
|
+
* const {google} = require('googleapis');
|
|
2838
|
+
* const alloydb = google.alloydb('v1beta');
|
|
2839
|
+
*
|
|
2840
|
+
* async function main() {
|
|
2841
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2842
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2843
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2844
|
+
* });
|
|
2845
|
+
*
|
|
2846
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2847
|
+
* const authClient = await auth.getClient();
|
|
2848
|
+
* google.options({auth: authClient});
|
|
2849
|
+
*
|
|
2850
|
+
* // Do the magic
|
|
2851
|
+
* const res = await alloydb.projects.locations.backups.create({
|
|
2852
|
+
* // Required. ID of the requesting object.
|
|
2853
|
+
* backupId: 'placeholder-value',
|
|
2854
|
+
* // Required. Value for parent.
|
|
2855
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2856
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
2857
|
+
* requestId: 'placeholder-value',
|
|
2858
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2859
|
+
* validateOnly: 'placeholder-value',
|
|
2860
|
+
*
|
|
2861
|
+
* // Request body metadata
|
|
2862
|
+
* requestBody: {
|
|
2863
|
+
* // request body parameters
|
|
2864
|
+
* // {
|
|
2865
|
+
* // "annotations": {},
|
|
2866
|
+
* // "clusterName": "my_clusterName",
|
|
2867
|
+
* // "clusterUid": "my_clusterUid",
|
|
2868
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
2869
|
+
* // "createTime": "my_createTime",
|
|
2870
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
2871
|
+
* // "deleteTime": "my_deleteTime",
|
|
2872
|
+
* // "description": "my_description",
|
|
2873
|
+
* // "displayName": "my_displayName",
|
|
2874
|
+
* // "encryptionConfig": {},
|
|
2875
|
+
* // "encryptionInfo": {},
|
|
2876
|
+
* // "etag": "my_etag",
|
|
2877
|
+
* // "expiryQuantity": {},
|
|
2878
|
+
* // "expiryTime": "my_expiryTime",
|
|
2879
|
+
* // "labels": {},
|
|
2880
|
+
* // "name": "my_name",
|
|
2881
|
+
* // "reconciling": false,
|
|
2882
|
+
* // "satisfiesPzs": false,
|
|
2883
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
2884
|
+
* // "state": "my_state",
|
|
2885
|
+
* // "tags": {},
|
|
2886
|
+
* // "type": "my_type",
|
|
2887
|
+
* // "uid": "my_uid",
|
|
2888
|
+
* // "updateTime": "my_updateTime"
|
|
2889
|
+
* // }
|
|
2890
|
+
* },
|
|
2891
|
+
* });
|
|
2892
|
+
* console.log(res.data);
|
|
2893
|
+
*
|
|
2894
|
+
* // Example response
|
|
2895
|
+
* // {
|
|
2896
|
+
* // "done": false,
|
|
2897
|
+
* // "error": {},
|
|
2898
|
+
* // "metadata": {},
|
|
2899
|
+
* // "name": "my_name",
|
|
2900
|
+
* // "response": {}
|
|
2901
|
+
* // }
|
|
2902
|
+
* }
|
|
2903
|
+
*
|
|
2904
|
+
* main().catch(e => {
|
|
2905
|
+
* console.error(e);
|
|
2906
|
+
* throw e;
|
|
2907
|
+
* });
|
|
2908
|
+
*
|
|
2909
|
+
* ```
|
|
2698
2910
|
*
|
|
2699
2911
|
* @param params - Parameters for request
|
|
2700
2912
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2786,6 +2998,62 @@ export namespace alloydb_v1beta {
|
|
|
2786
2998
|
|
|
2787
2999
|
/**
|
|
2788
3000
|
* Deletes a single Backup.
|
|
3001
|
+
* @example
|
|
3002
|
+
* ```js
|
|
3003
|
+
* // Before running the sample:
|
|
3004
|
+
* // - Enable the API at:
|
|
3005
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3006
|
+
* // - Login into gcloud by running:
|
|
3007
|
+
* // ```sh
|
|
3008
|
+
* // $ gcloud auth application-default login
|
|
3009
|
+
* // ```
|
|
3010
|
+
* // - Install the npm module by running:
|
|
3011
|
+
* // ```sh
|
|
3012
|
+
* // $ npm install googleapis
|
|
3013
|
+
* // ```
|
|
3014
|
+
*
|
|
3015
|
+
* const {google} = require('googleapis');
|
|
3016
|
+
* const alloydb = google.alloydb('v1beta');
|
|
3017
|
+
*
|
|
3018
|
+
* async function main() {
|
|
3019
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3020
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3021
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3022
|
+
* });
|
|
3023
|
+
*
|
|
3024
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3025
|
+
* const authClient = await auth.getClient();
|
|
3026
|
+
* google.options({auth: authClient});
|
|
3027
|
+
*
|
|
3028
|
+
* // Do the magic
|
|
3029
|
+
* const res = await alloydb.projects.locations.backups.delete({
|
|
3030
|
+
* // Optional. The current etag of the Backup. If an etag is provided and does not match the current etag of the Backup, deletion will be blocked and an ABORTED error will be returned.
|
|
3031
|
+
* etag: 'placeholder-value',
|
|
3032
|
+
* // Required. Name of the resource. For the required format, see the comment on the Backup.name field.
|
|
3033
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3034
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
3035
|
+
* requestId: 'placeholder-value',
|
|
3036
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
3037
|
+
* validateOnly: 'placeholder-value',
|
|
3038
|
+
* });
|
|
3039
|
+
* console.log(res.data);
|
|
3040
|
+
*
|
|
3041
|
+
* // Example response
|
|
3042
|
+
* // {
|
|
3043
|
+
* // "done": false,
|
|
3044
|
+
* // "error": {},
|
|
3045
|
+
* // "metadata": {},
|
|
3046
|
+
* // "name": "my_name",
|
|
3047
|
+
* // "response": {}
|
|
3048
|
+
* // }
|
|
3049
|
+
* }
|
|
3050
|
+
*
|
|
3051
|
+
* main().catch(e => {
|
|
3052
|
+
* console.error(e);
|
|
3053
|
+
* throw e;
|
|
3054
|
+
* });
|
|
3055
|
+
*
|
|
3056
|
+
* ```
|
|
2789
3057
|
*
|
|
2790
3058
|
* @param params - Parameters for request
|
|
2791
3059
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2874,6 +3142,75 @@ export namespace alloydb_v1beta {
|
|
|
2874
3142
|
|
|
2875
3143
|
/**
|
|
2876
3144
|
* Gets details of a single Backup.
|
|
3145
|
+
* @example
|
|
3146
|
+
* ```js
|
|
3147
|
+
* // Before running the sample:
|
|
3148
|
+
* // - Enable the API at:
|
|
3149
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3150
|
+
* // - Login into gcloud by running:
|
|
3151
|
+
* // ```sh
|
|
3152
|
+
* // $ gcloud auth application-default login
|
|
3153
|
+
* // ```
|
|
3154
|
+
* // - Install the npm module by running:
|
|
3155
|
+
* // ```sh
|
|
3156
|
+
* // $ npm install googleapis
|
|
3157
|
+
* // ```
|
|
3158
|
+
*
|
|
3159
|
+
* const {google} = require('googleapis');
|
|
3160
|
+
* const alloydb = google.alloydb('v1beta');
|
|
3161
|
+
*
|
|
3162
|
+
* async function main() {
|
|
3163
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3164
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3165
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3166
|
+
* });
|
|
3167
|
+
*
|
|
3168
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3169
|
+
* const authClient = await auth.getClient();
|
|
3170
|
+
* google.options({auth: authClient});
|
|
3171
|
+
*
|
|
3172
|
+
* // Do the magic
|
|
3173
|
+
* const res = await alloydb.projects.locations.backups.get({
|
|
3174
|
+
* // Required. Name of the resource
|
|
3175
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3176
|
+
* });
|
|
3177
|
+
* console.log(res.data);
|
|
3178
|
+
*
|
|
3179
|
+
* // Example response
|
|
3180
|
+
* // {
|
|
3181
|
+
* // "annotations": {},
|
|
3182
|
+
* // "clusterName": "my_clusterName",
|
|
3183
|
+
* // "clusterUid": "my_clusterUid",
|
|
3184
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3185
|
+
* // "createTime": "my_createTime",
|
|
3186
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3187
|
+
* // "deleteTime": "my_deleteTime",
|
|
3188
|
+
* // "description": "my_description",
|
|
3189
|
+
* // "displayName": "my_displayName",
|
|
3190
|
+
* // "encryptionConfig": {},
|
|
3191
|
+
* // "encryptionInfo": {},
|
|
3192
|
+
* // "etag": "my_etag",
|
|
3193
|
+
* // "expiryQuantity": {},
|
|
3194
|
+
* // "expiryTime": "my_expiryTime",
|
|
3195
|
+
* // "labels": {},
|
|
3196
|
+
* // "name": "my_name",
|
|
3197
|
+
* // "reconciling": false,
|
|
3198
|
+
* // "satisfiesPzs": false,
|
|
3199
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3200
|
+
* // "state": "my_state",
|
|
3201
|
+
* // "tags": {},
|
|
3202
|
+
* // "type": "my_type",
|
|
3203
|
+
* // "uid": "my_uid",
|
|
3204
|
+
* // "updateTime": "my_updateTime"
|
|
3205
|
+
* // }
|
|
3206
|
+
* }
|
|
3207
|
+
*
|
|
3208
|
+
* main().catch(e => {
|
|
3209
|
+
* console.error(e);
|
|
3210
|
+
* throw e;
|
|
3211
|
+
* });
|
|
3212
|
+
*
|
|
3213
|
+
* ```
|
|
2877
3214
|
*
|
|
2878
3215
|
* @param params - Parameters for request
|
|
2879
3216
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2962,6 +3299,62 @@ export namespace alloydb_v1beta {
|
|
|
2962
3299
|
|
|
2963
3300
|
/**
|
|
2964
3301
|
* Lists Backups in a given project and location.
|
|
3302
|
+
* @example
|
|
3303
|
+
* ```js
|
|
3304
|
+
* // Before running the sample:
|
|
3305
|
+
* // - Enable the API at:
|
|
3306
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3307
|
+
* // - Login into gcloud by running:
|
|
3308
|
+
* // ```sh
|
|
3309
|
+
* // $ gcloud auth application-default login
|
|
3310
|
+
* // ```
|
|
3311
|
+
* // - Install the npm module by running:
|
|
3312
|
+
* // ```sh
|
|
3313
|
+
* // $ npm install googleapis
|
|
3314
|
+
* // ```
|
|
3315
|
+
*
|
|
3316
|
+
* const {google} = require('googleapis');
|
|
3317
|
+
* const alloydb = google.alloydb('v1beta');
|
|
3318
|
+
*
|
|
3319
|
+
* async function main() {
|
|
3320
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3321
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3322
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3323
|
+
* });
|
|
3324
|
+
*
|
|
3325
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3326
|
+
* const authClient = await auth.getClient();
|
|
3327
|
+
* google.options({auth: authClient});
|
|
3328
|
+
*
|
|
3329
|
+
* // Do the magic
|
|
3330
|
+
* const res = await alloydb.projects.locations.backups.list({
|
|
3331
|
+
* // Filtering results
|
|
3332
|
+
* filter: 'placeholder-value',
|
|
3333
|
+
* // Hint for how to order the results
|
|
3334
|
+
* orderBy: 'placeholder-value',
|
|
3335
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
3336
|
+
* pageSize: 'placeholder-value',
|
|
3337
|
+
* // A token identifying a page of results the server should return.
|
|
3338
|
+
* pageToken: 'placeholder-value',
|
|
3339
|
+
* // Required. Parent value for ListBackupsRequest
|
|
3340
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3341
|
+
* });
|
|
3342
|
+
* console.log(res.data);
|
|
3343
|
+
*
|
|
3344
|
+
* // Example response
|
|
3345
|
+
* // {
|
|
3346
|
+
* // "backups": [],
|
|
3347
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3348
|
+
* // "unreachable": []
|
|
3349
|
+
* // }
|
|
3350
|
+
* }
|
|
3351
|
+
*
|
|
3352
|
+
* main().catch(e => {
|
|
3353
|
+
* console.error(e);
|
|
3354
|
+
* throw e;
|
|
3355
|
+
* });
|
|
3356
|
+
*
|
|
3357
|
+
* ```
|
|
2965
3358
|
*
|
|
2966
3359
|
* @param params - Parameters for request
|
|
2967
3360
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3053,6 +3446,95 @@ export namespace alloydb_v1beta {
|
|
|
3053
3446
|
|
|
3054
3447
|
/**
|
|
3055
3448
|
* Updates the parameters of a single Backup.
|
|
3449
|
+
* @example
|
|
3450
|
+
* ```js
|
|
3451
|
+
* // Before running the sample:
|
|
3452
|
+
* // - Enable the API at:
|
|
3453
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3454
|
+
* // - Login into gcloud by running:
|
|
3455
|
+
* // ```sh
|
|
3456
|
+
* // $ gcloud auth application-default login
|
|
3457
|
+
* // ```
|
|
3458
|
+
* // - Install the npm module by running:
|
|
3459
|
+
* // ```sh
|
|
3460
|
+
* // $ npm install googleapis
|
|
3461
|
+
* // ```
|
|
3462
|
+
*
|
|
3463
|
+
* const {google} = require('googleapis');
|
|
3464
|
+
* const alloydb = google.alloydb('v1beta');
|
|
3465
|
+
*
|
|
3466
|
+
* async function main() {
|
|
3467
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3468
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3469
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3470
|
+
* });
|
|
3471
|
+
*
|
|
3472
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3473
|
+
* const authClient = await auth.getClient();
|
|
3474
|
+
* google.options({auth: authClient});
|
|
3475
|
+
*
|
|
3476
|
+
* // Do the magic
|
|
3477
|
+
* const res = await alloydb.projects.locations.backups.patch({
|
|
3478
|
+
* // Optional. If set to true, update succeeds even if instance is not found. In that case, a new backup is created and `update_mask` is ignored.
|
|
3479
|
+
* allowMissing: 'placeholder-value',
|
|
3480
|
+
* // Output only. The name of the backup resource with the format: * projects/{project\}/locations/{region\}/backups/{backup_id\} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61\}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project\}/locations/{region\}
|
|
3481
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3482
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
3483
|
+
* requestId: 'placeholder-value',
|
|
3484
|
+
* // Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
|
|
3485
|
+
* updateMask: 'placeholder-value',
|
|
3486
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
3487
|
+
* validateOnly: 'placeholder-value',
|
|
3488
|
+
*
|
|
3489
|
+
* // Request body metadata
|
|
3490
|
+
* requestBody: {
|
|
3491
|
+
* // request body parameters
|
|
3492
|
+
* // {
|
|
3493
|
+
* // "annotations": {},
|
|
3494
|
+
* // "clusterName": "my_clusterName",
|
|
3495
|
+
* // "clusterUid": "my_clusterUid",
|
|
3496
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3497
|
+
* // "createTime": "my_createTime",
|
|
3498
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3499
|
+
* // "deleteTime": "my_deleteTime",
|
|
3500
|
+
* // "description": "my_description",
|
|
3501
|
+
* // "displayName": "my_displayName",
|
|
3502
|
+
* // "encryptionConfig": {},
|
|
3503
|
+
* // "encryptionInfo": {},
|
|
3504
|
+
* // "etag": "my_etag",
|
|
3505
|
+
* // "expiryQuantity": {},
|
|
3506
|
+
* // "expiryTime": "my_expiryTime",
|
|
3507
|
+
* // "labels": {},
|
|
3508
|
+
* // "name": "my_name",
|
|
3509
|
+
* // "reconciling": false,
|
|
3510
|
+
* // "satisfiesPzs": false,
|
|
3511
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3512
|
+
* // "state": "my_state",
|
|
3513
|
+
* // "tags": {},
|
|
3514
|
+
* // "type": "my_type",
|
|
3515
|
+
* // "uid": "my_uid",
|
|
3516
|
+
* // "updateTime": "my_updateTime"
|
|
3517
|
+
* // }
|
|
3518
|
+
* },
|
|
3519
|
+
* });
|
|
3520
|
+
* console.log(res.data);
|
|
3521
|
+
*
|
|
3522
|
+
* // Example response
|
|
3523
|
+
* // {
|
|
3524
|
+
* // "done": false,
|
|
3525
|
+
* // "error": {},
|
|
3526
|
+
* // "metadata": {},
|
|
3527
|
+
* // "name": "my_name",
|
|
3528
|
+
* // "response": {}
|
|
3529
|
+
* // }
|
|
3530
|
+
* }
|
|
3531
|
+
*
|
|
3532
|
+
* main().catch(e => {
|
|
3533
|
+
* console.error(e);
|
|
3534
|
+
* throw e;
|
|
3535
|
+
* });
|
|
3536
|
+
*
|
|
3537
|
+
* ```
|
|
3056
3538
|
*
|
|
3057
3539
|
* @param params - Parameters for request
|
|
3058
3540
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3256,6 +3738,105 @@ export namespace alloydb_v1beta {
|
|
|
3256
3738
|
|
|
3257
3739
|
/**
|
|
3258
3740
|
* Creates a new Cluster in a given project and location.
|
|
3741
|
+
* @example
|
|
3742
|
+
* ```js
|
|
3743
|
+
* // Before running the sample:
|
|
3744
|
+
* // - Enable the API at:
|
|
3745
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3746
|
+
* // - Login into gcloud by running:
|
|
3747
|
+
* // ```sh
|
|
3748
|
+
* // $ gcloud auth application-default login
|
|
3749
|
+
* // ```
|
|
3750
|
+
* // - Install the npm module by running:
|
|
3751
|
+
* // ```sh
|
|
3752
|
+
* // $ npm install googleapis
|
|
3753
|
+
* // ```
|
|
3754
|
+
*
|
|
3755
|
+
* const {google} = require('googleapis');
|
|
3756
|
+
* const alloydb = google.alloydb('v1beta');
|
|
3757
|
+
*
|
|
3758
|
+
* async function main() {
|
|
3759
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3760
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3761
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3762
|
+
* });
|
|
3763
|
+
*
|
|
3764
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3765
|
+
* const authClient = await auth.getClient();
|
|
3766
|
+
* google.options({auth: authClient});
|
|
3767
|
+
*
|
|
3768
|
+
* // Do the magic
|
|
3769
|
+
* const res = await alloydb.projects.locations.clusters.create({
|
|
3770
|
+
* // Required. ID of the requesting object.
|
|
3771
|
+
* clusterId: 'placeholder-value',
|
|
3772
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3773
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3774
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
3775
|
+
* requestId: 'placeholder-value',
|
|
3776
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3777
|
+
* validateOnly: 'placeholder-value',
|
|
3778
|
+
*
|
|
3779
|
+
* // Request body metadata
|
|
3780
|
+
* requestBody: {
|
|
3781
|
+
* // request body parameters
|
|
3782
|
+
* // {
|
|
3783
|
+
* // "annotations": {},
|
|
3784
|
+
* // "automatedBackupPolicy": {},
|
|
3785
|
+
* // "backupSource": {},
|
|
3786
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3787
|
+
* // "clusterType": "my_clusterType",
|
|
3788
|
+
* // "continuousBackupConfig": {},
|
|
3789
|
+
* // "continuousBackupInfo": {},
|
|
3790
|
+
* // "createTime": "my_createTime",
|
|
3791
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3792
|
+
* // "deleteTime": "my_deleteTime",
|
|
3793
|
+
* // "displayName": "my_displayName",
|
|
3794
|
+
* // "encryptionConfig": {},
|
|
3795
|
+
* // "encryptionInfo": {},
|
|
3796
|
+
* // "etag": "my_etag",
|
|
3797
|
+
* // "geminiConfig": {},
|
|
3798
|
+
* // "initialUser": {},
|
|
3799
|
+
* // "labels": {},
|
|
3800
|
+
* // "maintenanceSchedule": {},
|
|
3801
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3802
|
+
* // "migrationSource": {},
|
|
3803
|
+
* // "name": "my_name",
|
|
3804
|
+
* // "network": "my_network",
|
|
3805
|
+
* // "networkConfig": {},
|
|
3806
|
+
* // "primaryConfig": {},
|
|
3807
|
+
* // "pscConfig": {},
|
|
3808
|
+
* // "reconciling": false,
|
|
3809
|
+
* // "satisfiesPzs": false,
|
|
3810
|
+
* // "secondaryConfig": {},
|
|
3811
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
3812
|
+
* // "sslConfig": {},
|
|
3813
|
+
* // "state": "my_state",
|
|
3814
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3815
|
+
* // "tags": {},
|
|
3816
|
+
* // "trialMetadata": {},
|
|
3817
|
+
* // "uid": "my_uid",
|
|
3818
|
+
* // "updateTime": "my_updateTime"
|
|
3819
|
+
* // }
|
|
3820
|
+
* },
|
|
3821
|
+
* });
|
|
3822
|
+
* console.log(res.data);
|
|
3823
|
+
*
|
|
3824
|
+
* // Example response
|
|
3825
|
+
* // {
|
|
3826
|
+
* // "done": false,
|
|
3827
|
+
* // "error": {},
|
|
3828
|
+
* // "metadata": {},
|
|
3829
|
+
* // "name": "my_name",
|
|
3830
|
+
* // "response": {}
|
|
3831
|
+
* // }
|
|
3832
|
+
* }
|
|
3833
|
+
*
|
|
3834
|
+
* main().catch(e => {
|
|
3835
|
+
* console.error(e);
|
|
3836
|
+
* throw e;
|
|
3837
|
+
* });
|
|
3838
|
+
*
|
|
3839
|
+
* ```
|
|
3259
3840
|
*
|
|
3260
3841
|
* @param params - Parameters for request
|
|
3261
3842
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3347,6 +3928,105 @@ export namespace alloydb_v1beta {
|
|
|
3347
3928
|
|
|
3348
3929
|
/**
|
|
3349
3930
|
* Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
|
|
3931
|
+
* @example
|
|
3932
|
+
* ```js
|
|
3933
|
+
* // Before running the sample:
|
|
3934
|
+
* // - Enable the API at:
|
|
3935
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3936
|
+
* // - Login into gcloud by running:
|
|
3937
|
+
* // ```sh
|
|
3938
|
+
* // $ gcloud auth application-default login
|
|
3939
|
+
* // ```
|
|
3940
|
+
* // - Install the npm module by running:
|
|
3941
|
+
* // ```sh
|
|
3942
|
+
* // $ npm install googleapis
|
|
3943
|
+
* // ```
|
|
3944
|
+
*
|
|
3945
|
+
* const {google} = require('googleapis');
|
|
3946
|
+
* const alloydb = google.alloydb('v1beta');
|
|
3947
|
+
*
|
|
3948
|
+
* async function main() {
|
|
3949
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3950
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3951
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3952
|
+
* });
|
|
3953
|
+
*
|
|
3954
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3955
|
+
* const authClient = await auth.getClient();
|
|
3956
|
+
* google.options({auth: authClient});
|
|
3957
|
+
*
|
|
3958
|
+
* // Do the magic
|
|
3959
|
+
* const res = await alloydb.projects.locations.clusters.createsecondary({
|
|
3960
|
+
* // Required. ID of the requesting object (the secondary cluster).
|
|
3961
|
+
* clusterId: 'placeholder-value',
|
|
3962
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3963
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3964
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
3965
|
+
* requestId: 'placeholder-value',
|
|
3966
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3967
|
+
* validateOnly: 'placeholder-value',
|
|
3968
|
+
*
|
|
3969
|
+
* // Request body metadata
|
|
3970
|
+
* requestBody: {
|
|
3971
|
+
* // request body parameters
|
|
3972
|
+
* // {
|
|
3973
|
+
* // "annotations": {},
|
|
3974
|
+
* // "automatedBackupPolicy": {},
|
|
3975
|
+
* // "backupSource": {},
|
|
3976
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3977
|
+
* // "clusterType": "my_clusterType",
|
|
3978
|
+
* // "continuousBackupConfig": {},
|
|
3979
|
+
* // "continuousBackupInfo": {},
|
|
3980
|
+
* // "createTime": "my_createTime",
|
|
3981
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3982
|
+
* // "deleteTime": "my_deleteTime",
|
|
3983
|
+
* // "displayName": "my_displayName",
|
|
3984
|
+
* // "encryptionConfig": {},
|
|
3985
|
+
* // "encryptionInfo": {},
|
|
3986
|
+
* // "etag": "my_etag",
|
|
3987
|
+
* // "geminiConfig": {},
|
|
3988
|
+
* // "initialUser": {},
|
|
3989
|
+
* // "labels": {},
|
|
3990
|
+
* // "maintenanceSchedule": {},
|
|
3991
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3992
|
+
* // "migrationSource": {},
|
|
3993
|
+
* // "name": "my_name",
|
|
3994
|
+
* // "network": "my_network",
|
|
3995
|
+
* // "networkConfig": {},
|
|
3996
|
+
* // "primaryConfig": {},
|
|
3997
|
+
* // "pscConfig": {},
|
|
3998
|
+
* // "reconciling": false,
|
|
3999
|
+
* // "satisfiesPzs": false,
|
|
4000
|
+
* // "secondaryConfig": {},
|
|
4001
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4002
|
+
* // "sslConfig": {},
|
|
4003
|
+
* // "state": "my_state",
|
|
4004
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4005
|
+
* // "tags": {},
|
|
4006
|
+
* // "trialMetadata": {},
|
|
4007
|
+
* // "uid": "my_uid",
|
|
4008
|
+
* // "updateTime": "my_updateTime"
|
|
4009
|
+
* // }
|
|
4010
|
+
* },
|
|
4011
|
+
* });
|
|
4012
|
+
* console.log(res.data);
|
|
4013
|
+
*
|
|
4014
|
+
* // Example response
|
|
4015
|
+
* // {
|
|
4016
|
+
* // "done": false,
|
|
4017
|
+
* // "error": {},
|
|
4018
|
+
* // "metadata": {},
|
|
4019
|
+
* // "name": "my_name",
|
|
4020
|
+
* // "response": {}
|
|
4021
|
+
* // }
|
|
4022
|
+
* }
|
|
4023
|
+
*
|
|
4024
|
+
* main().catch(e => {
|
|
4025
|
+
* console.error(e);
|
|
4026
|
+
* throw e;
|
|
4027
|
+
* });
|
|
4028
|
+
*
|
|
4029
|
+
* ```
|
|
3350
4030
|
*
|
|
3351
4031
|
* @param params - Parameters for request
|
|
3352
4032
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3438,6 +4118,64 @@ export namespace alloydb_v1beta {
|
|
|
3438
4118
|
|
|
3439
4119
|
/**
|
|
3440
4120
|
* Deletes a single Cluster.
|
|
4121
|
+
* @example
|
|
4122
|
+
* ```js
|
|
4123
|
+
* // Before running the sample:
|
|
4124
|
+
* // - Enable the API at:
|
|
4125
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4126
|
+
* // - Login into gcloud by running:
|
|
4127
|
+
* // ```sh
|
|
4128
|
+
* // $ gcloud auth application-default login
|
|
4129
|
+
* // ```
|
|
4130
|
+
* // - Install the npm module by running:
|
|
4131
|
+
* // ```sh
|
|
4132
|
+
* // $ npm install googleapis
|
|
4133
|
+
* // ```
|
|
4134
|
+
*
|
|
4135
|
+
* const {google} = require('googleapis');
|
|
4136
|
+
* const alloydb = google.alloydb('v1beta');
|
|
4137
|
+
*
|
|
4138
|
+
* async function main() {
|
|
4139
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4140
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4141
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4142
|
+
* });
|
|
4143
|
+
*
|
|
4144
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4145
|
+
* const authClient = await auth.getClient();
|
|
4146
|
+
* google.options({auth: authClient});
|
|
4147
|
+
*
|
|
4148
|
+
* // Do the magic
|
|
4149
|
+
* const res = await alloydb.projects.locations.clusters.delete({
|
|
4150
|
+
* // Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.
|
|
4151
|
+
* etag: 'placeholder-value',
|
|
4152
|
+
* // Optional. Whether to cascade delete child instances for given cluster.
|
|
4153
|
+
* force: 'placeholder-value',
|
|
4154
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4155
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4156
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
4157
|
+
* requestId: 'placeholder-value',
|
|
4158
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4159
|
+
* validateOnly: 'placeholder-value',
|
|
4160
|
+
* });
|
|
4161
|
+
* console.log(res.data);
|
|
4162
|
+
*
|
|
4163
|
+
* // Example response
|
|
4164
|
+
* // {
|
|
4165
|
+
* // "done": false,
|
|
4166
|
+
* // "error": {},
|
|
4167
|
+
* // "metadata": {},
|
|
4168
|
+
* // "name": "my_name",
|
|
4169
|
+
* // "response": {}
|
|
4170
|
+
* // }
|
|
4171
|
+
* }
|
|
4172
|
+
*
|
|
4173
|
+
* main().catch(e => {
|
|
4174
|
+
* console.error(e);
|
|
4175
|
+
* throw e;
|
|
4176
|
+
* });
|
|
4177
|
+
*
|
|
4178
|
+
* ```
|
|
3441
4179
|
*
|
|
3442
4180
|
* @param params - Parameters for request
|
|
3443
4181
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3526,6 +4264,67 @@ export namespace alloydb_v1beta {
|
|
|
3526
4264
|
|
|
3527
4265
|
/**
|
|
3528
4266
|
* Exports data from the cluster. Imperative only.
|
|
4267
|
+
* @example
|
|
4268
|
+
* ```js
|
|
4269
|
+
* // Before running the sample:
|
|
4270
|
+
* // - Enable the API at:
|
|
4271
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4272
|
+
* // - Login into gcloud by running:
|
|
4273
|
+
* // ```sh
|
|
4274
|
+
* // $ gcloud auth application-default login
|
|
4275
|
+
* // ```
|
|
4276
|
+
* // - Install the npm module by running:
|
|
4277
|
+
* // ```sh
|
|
4278
|
+
* // $ npm install googleapis
|
|
4279
|
+
* // ```
|
|
4280
|
+
*
|
|
4281
|
+
* const {google} = require('googleapis');
|
|
4282
|
+
* const alloydb = google.alloydb('v1beta');
|
|
4283
|
+
*
|
|
4284
|
+
* async function main() {
|
|
4285
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4286
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4287
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4288
|
+
* });
|
|
4289
|
+
*
|
|
4290
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4291
|
+
* const authClient = await auth.getClient();
|
|
4292
|
+
* google.options({auth: authClient});
|
|
4293
|
+
*
|
|
4294
|
+
* // Do the magic
|
|
4295
|
+
* const res = await alloydb.projects.locations.clusters.export({
|
|
4296
|
+
* // Required. The resource name of the cluster.
|
|
4297
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4298
|
+
*
|
|
4299
|
+
* // Request body metadata
|
|
4300
|
+
* requestBody: {
|
|
4301
|
+
* // request body parameters
|
|
4302
|
+
* // {
|
|
4303
|
+
* // "csvExportOptions": {},
|
|
4304
|
+
* // "database": "my_database",
|
|
4305
|
+
* // "gcsDestination": {},
|
|
4306
|
+
* // "sqlExportOptions": {}
|
|
4307
|
+
* // }
|
|
4308
|
+
* },
|
|
4309
|
+
* });
|
|
4310
|
+
* console.log(res.data);
|
|
4311
|
+
*
|
|
4312
|
+
* // Example response
|
|
4313
|
+
* // {
|
|
4314
|
+
* // "done": false,
|
|
4315
|
+
* // "error": {},
|
|
4316
|
+
* // "metadata": {},
|
|
4317
|
+
* // "name": "my_name",
|
|
4318
|
+
* // "response": {}
|
|
4319
|
+
* // }
|
|
4320
|
+
* }
|
|
4321
|
+
*
|
|
4322
|
+
* main().catch(e => {
|
|
4323
|
+
* console.error(e);
|
|
4324
|
+
* throw e;
|
|
4325
|
+
* });
|
|
4326
|
+
*
|
|
4327
|
+
* ```
|
|
3529
4328
|
*
|
|
3530
4329
|
* @param params - Parameters for request
|
|
3531
4330
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3617,6 +4416,89 @@ export namespace alloydb_v1beta {
|
|
|
3617
4416
|
|
|
3618
4417
|
/**
|
|
3619
4418
|
* Gets details of a single Cluster.
|
|
4419
|
+
* @example
|
|
4420
|
+
* ```js
|
|
4421
|
+
* // Before running the sample:
|
|
4422
|
+
* // - Enable the API at:
|
|
4423
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4424
|
+
* // - Login into gcloud by running:
|
|
4425
|
+
* // ```sh
|
|
4426
|
+
* // $ gcloud auth application-default login
|
|
4427
|
+
* // ```
|
|
4428
|
+
* // - Install the npm module by running:
|
|
4429
|
+
* // ```sh
|
|
4430
|
+
* // $ npm install googleapis
|
|
4431
|
+
* // ```
|
|
4432
|
+
*
|
|
4433
|
+
* const {google} = require('googleapis');
|
|
4434
|
+
* const alloydb = google.alloydb('v1beta');
|
|
4435
|
+
*
|
|
4436
|
+
* async function main() {
|
|
4437
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4438
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4439
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4440
|
+
* });
|
|
4441
|
+
*
|
|
4442
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4443
|
+
* const authClient = await auth.getClient();
|
|
4444
|
+
* google.options({auth: authClient});
|
|
4445
|
+
*
|
|
4446
|
+
* // Do the magic
|
|
4447
|
+
* const res = await alloydb.projects.locations.clusters.get({
|
|
4448
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4449
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4450
|
+
* // Optional. The view of the cluster to return. Returns all default fields if not set.
|
|
4451
|
+
* view: 'placeholder-value',
|
|
4452
|
+
* });
|
|
4453
|
+
* console.log(res.data);
|
|
4454
|
+
*
|
|
4455
|
+
* // Example response
|
|
4456
|
+
* // {
|
|
4457
|
+
* // "annotations": {},
|
|
4458
|
+
* // "automatedBackupPolicy": {},
|
|
4459
|
+
* // "backupSource": {},
|
|
4460
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4461
|
+
* // "clusterType": "my_clusterType",
|
|
4462
|
+
* // "continuousBackupConfig": {},
|
|
4463
|
+
* // "continuousBackupInfo": {},
|
|
4464
|
+
* // "createTime": "my_createTime",
|
|
4465
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4466
|
+
* // "deleteTime": "my_deleteTime",
|
|
4467
|
+
* // "displayName": "my_displayName",
|
|
4468
|
+
* // "encryptionConfig": {},
|
|
4469
|
+
* // "encryptionInfo": {},
|
|
4470
|
+
* // "etag": "my_etag",
|
|
4471
|
+
* // "geminiConfig": {},
|
|
4472
|
+
* // "initialUser": {},
|
|
4473
|
+
* // "labels": {},
|
|
4474
|
+
* // "maintenanceSchedule": {},
|
|
4475
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4476
|
+
* // "migrationSource": {},
|
|
4477
|
+
* // "name": "my_name",
|
|
4478
|
+
* // "network": "my_network",
|
|
4479
|
+
* // "networkConfig": {},
|
|
4480
|
+
* // "primaryConfig": {},
|
|
4481
|
+
* // "pscConfig": {},
|
|
4482
|
+
* // "reconciling": false,
|
|
4483
|
+
* // "satisfiesPzs": false,
|
|
4484
|
+
* // "secondaryConfig": {},
|
|
4485
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4486
|
+
* // "sslConfig": {},
|
|
4487
|
+
* // "state": "my_state",
|
|
4488
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4489
|
+
* // "tags": {},
|
|
4490
|
+
* // "trialMetadata": {},
|
|
4491
|
+
* // "uid": "my_uid",
|
|
4492
|
+
* // "updateTime": "my_updateTime"
|
|
4493
|
+
* // }
|
|
4494
|
+
* }
|
|
4495
|
+
*
|
|
4496
|
+
* main().catch(e => {
|
|
4497
|
+
* console.error(e);
|
|
4498
|
+
* throw e;
|
|
4499
|
+
* });
|
|
4500
|
+
*
|
|
4501
|
+
* ```
|
|
3620
4502
|
*
|
|
3621
4503
|
* @param params - Parameters for request
|
|
3622
4504
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3705,6 +4587,68 @@ export namespace alloydb_v1beta {
|
|
|
3705
4587
|
|
|
3706
4588
|
/**
|
|
3707
4589
|
* Imports data to the cluster. Imperative only.
|
|
4590
|
+
* @example
|
|
4591
|
+
* ```js
|
|
4592
|
+
* // Before running the sample:
|
|
4593
|
+
* // - Enable the API at:
|
|
4594
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4595
|
+
* // - Login into gcloud by running:
|
|
4596
|
+
* // ```sh
|
|
4597
|
+
* // $ gcloud auth application-default login
|
|
4598
|
+
* // ```
|
|
4599
|
+
* // - Install the npm module by running:
|
|
4600
|
+
* // ```sh
|
|
4601
|
+
* // $ npm install googleapis
|
|
4602
|
+
* // ```
|
|
4603
|
+
*
|
|
4604
|
+
* const {google} = require('googleapis');
|
|
4605
|
+
* const alloydb = google.alloydb('v1beta');
|
|
4606
|
+
*
|
|
4607
|
+
* async function main() {
|
|
4608
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4609
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4610
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4611
|
+
* });
|
|
4612
|
+
*
|
|
4613
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4614
|
+
* const authClient = await auth.getClient();
|
|
4615
|
+
* google.options({auth: authClient});
|
|
4616
|
+
*
|
|
4617
|
+
* // Do the magic
|
|
4618
|
+
* const res = await alloydb.projects.locations.clusters.import({
|
|
4619
|
+
* // Required. The resource name of the cluster.
|
|
4620
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4621
|
+
*
|
|
4622
|
+
* // Request body metadata
|
|
4623
|
+
* requestBody: {
|
|
4624
|
+
* // request body parameters
|
|
4625
|
+
* // {
|
|
4626
|
+
* // "csvImportOptions": {},
|
|
4627
|
+
* // "database": "my_database",
|
|
4628
|
+
* // "gcsUri": "my_gcsUri",
|
|
4629
|
+
* // "sqlImportOptions": {},
|
|
4630
|
+
* // "user": "my_user"
|
|
4631
|
+
* // }
|
|
4632
|
+
* },
|
|
4633
|
+
* });
|
|
4634
|
+
* console.log(res.data);
|
|
4635
|
+
*
|
|
4636
|
+
* // Example response
|
|
4637
|
+
* // {
|
|
4638
|
+
* // "done": false,
|
|
4639
|
+
* // "error": {},
|
|
4640
|
+
* // "metadata": {},
|
|
4641
|
+
* // "name": "my_name",
|
|
4642
|
+
* // "response": {}
|
|
4643
|
+
* // }
|
|
4644
|
+
* }
|
|
4645
|
+
*
|
|
4646
|
+
* main().catch(e => {
|
|
4647
|
+
* console.error(e);
|
|
4648
|
+
* throw e;
|
|
4649
|
+
* });
|
|
4650
|
+
*
|
|
4651
|
+
* ```
|
|
3708
4652
|
*
|
|
3709
4653
|
* @param params - Parameters for request
|
|
3710
4654
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3796,6 +4740,62 @@ export namespace alloydb_v1beta {
|
|
|
3796
4740
|
|
|
3797
4741
|
/**
|
|
3798
4742
|
* Lists Clusters in a given project and location.
|
|
4743
|
+
* @example
|
|
4744
|
+
* ```js
|
|
4745
|
+
* // Before running the sample:
|
|
4746
|
+
* // - Enable the API at:
|
|
4747
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4748
|
+
* // - Login into gcloud by running:
|
|
4749
|
+
* // ```sh
|
|
4750
|
+
* // $ gcloud auth application-default login
|
|
4751
|
+
* // ```
|
|
4752
|
+
* // - Install the npm module by running:
|
|
4753
|
+
* // ```sh
|
|
4754
|
+
* // $ npm install googleapis
|
|
4755
|
+
* // ```
|
|
4756
|
+
*
|
|
4757
|
+
* const {google} = require('googleapis');
|
|
4758
|
+
* const alloydb = google.alloydb('v1beta');
|
|
4759
|
+
*
|
|
4760
|
+
* async function main() {
|
|
4761
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4762
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4763
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4764
|
+
* });
|
|
4765
|
+
*
|
|
4766
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4767
|
+
* const authClient = await auth.getClient();
|
|
4768
|
+
* google.options({auth: authClient});
|
|
4769
|
+
*
|
|
4770
|
+
* // Do the magic
|
|
4771
|
+
* const res = await alloydb.projects.locations.clusters.list({
|
|
4772
|
+
* // Optional. Filtering results
|
|
4773
|
+
* filter: 'placeholder-value',
|
|
4774
|
+
* // Optional. Hint for how to order the results
|
|
4775
|
+
* orderBy: 'placeholder-value',
|
|
4776
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
4777
|
+
* pageSize: 'placeholder-value',
|
|
4778
|
+
* // A token identifying a page of results the server should return.
|
|
4779
|
+
* pageToken: 'placeholder-value',
|
|
4780
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project\}/locations/-
|
|
4781
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
4782
|
+
* });
|
|
4783
|
+
* console.log(res.data);
|
|
4784
|
+
*
|
|
4785
|
+
* // Example response
|
|
4786
|
+
* // {
|
|
4787
|
+
* // "clusters": [],
|
|
4788
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4789
|
+
* // "unreachable": []
|
|
4790
|
+
* // }
|
|
4791
|
+
* }
|
|
4792
|
+
*
|
|
4793
|
+
* main().catch(e => {
|
|
4794
|
+
* console.error(e);
|
|
4795
|
+
* throw e;
|
|
4796
|
+
* });
|
|
4797
|
+
*
|
|
4798
|
+
* ```
|
|
3799
4799
|
*
|
|
3800
4800
|
* @param params - Parameters for request
|
|
3801
4801
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3889,6 +4889,107 @@ export namespace alloydb_v1beta {
|
|
|
3889
4889
|
|
|
3890
4890
|
/**
|
|
3891
4891
|
* Updates the parameters of a single Cluster.
|
|
4892
|
+
* @example
|
|
4893
|
+
* ```js
|
|
4894
|
+
* // Before running the sample:
|
|
4895
|
+
* // - Enable the API at:
|
|
4896
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4897
|
+
* // - Login into gcloud by running:
|
|
4898
|
+
* // ```sh
|
|
4899
|
+
* // $ gcloud auth application-default login
|
|
4900
|
+
* // ```
|
|
4901
|
+
* // - Install the npm module by running:
|
|
4902
|
+
* // ```sh
|
|
4903
|
+
* // $ npm install googleapis
|
|
4904
|
+
* // ```
|
|
4905
|
+
*
|
|
4906
|
+
* const {google} = require('googleapis');
|
|
4907
|
+
* const alloydb = google.alloydb('v1beta');
|
|
4908
|
+
*
|
|
4909
|
+
* async function main() {
|
|
4910
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4911
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4912
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4913
|
+
* });
|
|
4914
|
+
*
|
|
4915
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4916
|
+
* const authClient = await auth.getClient();
|
|
4917
|
+
* google.options({auth: authClient});
|
|
4918
|
+
*
|
|
4919
|
+
* // Do the magic
|
|
4920
|
+
* const res = await alloydb.projects.locations.clusters.patch({
|
|
4921
|
+
* // Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and `update_mask` is ignored.
|
|
4922
|
+
* allowMissing: 'placeholder-value',
|
|
4923
|
+
* // Output only. The name of the cluster resource with the format: * projects/{project\}/locations/{region\}/clusters/{cluster_id\} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project\}/locations/{region\}
|
|
4924
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4925
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
4926
|
+
* requestId: 'placeholder-value',
|
|
4927
|
+
* // Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
|
|
4928
|
+
* updateMask: 'placeholder-value',
|
|
4929
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4930
|
+
* validateOnly: 'placeholder-value',
|
|
4931
|
+
*
|
|
4932
|
+
* // Request body metadata
|
|
4933
|
+
* requestBody: {
|
|
4934
|
+
* // request body parameters
|
|
4935
|
+
* // {
|
|
4936
|
+
* // "annotations": {},
|
|
4937
|
+
* // "automatedBackupPolicy": {},
|
|
4938
|
+
* // "backupSource": {},
|
|
4939
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4940
|
+
* // "clusterType": "my_clusterType",
|
|
4941
|
+
* // "continuousBackupConfig": {},
|
|
4942
|
+
* // "continuousBackupInfo": {},
|
|
4943
|
+
* // "createTime": "my_createTime",
|
|
4944
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4945
|
+
* // "deleteTime": "my_deleteTime",
|
|
4946
|
+
* // "displayName": "my_displayName",
|
|
4947
|
+
* // "encryptionConfig": {},
|
|
4948
|
+
* // "encryptionInfo": {},
|
|
4949
|
+
* // "etag": "my_etag",
|
|
4950
|
+
* // "geminiConfig": {},
|
|
4951
|
+
* // "initialUser": {},
|
|
4952
|
+
* // "labels": {},
|
|
4953
|
+
* // "maintenanceSchedule": {},
|
|
4954
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4955
|
+
* // "migrationSource": {},
|
|
4956
|
+
* // "name": "my_name",
|
|
4957
|
+
* // "network": "my_network",
|
|
4958
|
+
* // "networkConfig": {},
|
|
4959
|
+
* // "primaryConfig": {},
|
|
4960
|
+
* // "pscConfig": {},
|
|
4961
|
+
* // "reconciling": false,
|
|
4962
|
+
* // "satisfiesPzs": false,
|
|
4963
|
+
* // "secondaryConfig": {},
|
|
4964
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4965
|
+
* // "sslConfig": {},
|
|
4966
|
+
* // "state": "my_state",
|
|
4967
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4968
|
+
* // "tags": {},
|
|
4969
|
+
* // "trialMetadata": {},
|
|
4970
|
+
* // "uid": "my_uid",
|
|
4971
|
+
* // "updateTime": "my_updateTime"
|
|
4972
|
+
* // }
|
|
4973
|
+
* },
|
|
4974
|
+
* });
|
|
4975
|
+
* console.log(res.data);
|
|
4976
|
+
*
|
|
4977
|
+
* // Example response
|
|
4978
|
+
* // {
|
|
4979
|
+
* // "done": false,
|
|
4980
|
+
* // "error": {},
|
|
4981
|
+
* // "metadata": {},
|
|
4982
|
+
* // "name": "my_name",
|
|
4983
|
+
* // "response": {}
|
|
4984
|
+
* // }
|
|
4985
|
+
* }
|
|
4986
|
+
*
|
|
4987
|
+
* main().catch(e => {
|
|
4988
|
+
* console.error(e);
|
|
4989
|
+
* throw e;
|
|
4990
|
+
* });
|
|
4991
|
+
*
|
|
4992
|
+
* ```
|
|
3892
4993
|
*
|
|
3893
4994
|
* @param params - Parameters for request
|
|
3894
4995
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3977,6 +5078,66 @@ export namespace alloydb_v1beta {
|
|
|
3977
5078
|
|
|
3978
5079
|
/**
|
|
3979
5080
|
* Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.
|
|
5081
|
+
* @example
|
|
5082
|
+
* ```js
|
|
5083
|
+
* // Before running the sample:
|
|
5084
|
+
* // - Enable the API at:
|
|
5085
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5086
|
+
* // - Login into gcloud by running:
|
|
5087
|
+
* // ```sh
|
|
5088
|
+
* // $ gcloud auth application-default login
|
|
5089
|
+
* // ```
|
|
5090
|
+
* // - Install the npm module by running:
|
|
5091
|
+
* // ```sh
|
|
5092
|
+
* // $ npm install googleapis
|
|
5093
|
+
* // ```
|
|
5094
|
+
*
|
|
5095
|
+
* const {google} = require('googleapis');
|
|
5096
|
+
* const alloydb = google.alloydb('v1beta');
|
|
5097
|
+
*
|
|
5098
|
+
* async function main() {
|
|
5099
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5100
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5101
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5102
|
+
* });
|
|
5103
|
+
*
|
|
5104
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5105
|
+
* const authClient = await auth.getClient();
|
|
5106
|
+
* google.options({auth: authClient});
|
|
5107
|
+
*
|
|
5108
|
+
* // Do the magic
|
|
5109
|
+
* const res = await alloydb.projects.locations.clusters.promote({
|
|
5110
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5111
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5112
|
+
*
|
|
5113
|
+
* // Request body metadata
|
|
5114
|
+
* requestBody: {
|
|
5115
|
+
* // request body parameters
|
|
5116
|
+
* // {
|
|
5117
|
+
* // "etag": "my_etag",
|
|
5118
|
+
* // "requestId": "my_requestId",
|
|
5119
|
+
* // "validateOnly": false
|
|
5120
|
+
* // }
|
|
5121
|
+
* },
|
|
5122
|
+
* });
|
|
5123
|
+
* console.log(res.data);
|
|
5124
|
+
*
|
|
5125
|
+
* // Example response
|
|
5126
|
+
* // {
|
|
5127
|
+
* // "done": false,
|
|
5128
|
+
* // "error": {},
|
|
5129
|
+
* // "metadata": {},
|
|
5130
|
+
* // "name": "my_name",
|
|
5131
|
+
* // "response": {}
|
|
5132
|
+
* // }
|
|
5133
|
+
* }
|
|
5134
|
+
*
|
|
5135
|
+
* main().catch(e => {
|
|
5136
|
+
* console.error(e);
|
|
5137
|
+
* throw e;
|
|
5138
|
+
* });
|
|
5139
|
+
*
|
|
5140
|
+
* ```
|
|
3980
5141
|
*
|
|
3981
5142
|
* @param params - Parameters for request
|
|
3982
5143
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4068,6 +5229,69 @@ export namespace alloydb_v1beta {
|
|
|
4068
5229
|
|
|
4069
5230
|
/**
|
|
4070
5231
|
* Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.
|
|
5232
|
+
* @example
|
|
5233
|
+
* ```js
|
|
5234
|
+
* // Before running the sample:
|
|
5235
|
+
* // - Enable the API at:
|
|
5236
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5237
|
+
* // - Login into gcloud by running:
|
|
5238
|
+
* // ```sh
|
|
5239
|
+
* // $ gcloud auth application-default login
|
|
5240
|
+
* // ```
|
|
5241
|
+
* // - Install the npm module by running:
|
|
5242
|
+
* // ```sh
|
|
5243
|
+
* // $ npm install googleapis
|
|
5244
|
+
* // ```
|
|
5245
|
+
*
|
|
5246
|
+
* const {google} = require('googleapis');
|
|
5247
|
+
* const alloydb = google.alloydb('v1beta');
|
|
5248
|
+
*
|
|
5249
|
+
* async function main() {
|
|
5250
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5251
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5252
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5253
|
+
* });
|
|
5254
|
+
*
|
|
5255
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5256
|
+
* const authClient = await auth.getClient();
|
|
5257
|
+
* google.options({auth: authClient});
|
|
5258
|
+
*
|
|
5259
|
+
* // Do the magic
|
|
5260
|
+
* const res = await alloydb.projects.locations.clusters.restore({
|
|
5261
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.
|
|
5262
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5263
|
+
*
|
|
5264
|
+
* // Request body metadata
|
|
5265
|
+
* requestBody: {
|
|
5266
|
+
* // request body parameters
|
|
5267
|
+
* // {
|
|
5268
|
+
* // "backupSource": {},
|
|
5269
|
+
* // "cluster": {},
|
|
5270
|
+
* // "clusterId": "my_clusterId",
|
|
5271
|
+
* // "continuousBackupSource": {},
|
|
5272
|
+
* // "requestId": "my_requestId",
|
|
5273
|
+
* // "validateOnly": false
|
|
5274
|
+
* // }
|
|
5275
|
+
* },
|
|
5276
|
+
* });
|
|
5277
|
+
* console.log(res.data);
|
|
5278
|
+
*
|
|
5279
|
+
* // Example response
|
|
5280
|
+
* // {
|
|
5281
|
+
* // "done": false,
|
|
5282
|
+
* // "error": {},
|
|
5283
|
+
* // "metadata": {},
|
|
5284
|
+
* // "name": "my_name",
|
|
5285
|
+
* // "response": {}
|
|
5286
|
+
* // }
|
|
5287
|
+
* }
|
|
5288
|
+
*
|
|
5289
|
+
* main().catch(e => {
|
|
5290
|
+
* console.error(e);
|
|
5291
|
+
* throw e;
|
|
5292
|
+
* });
|
|
5293
|
+
*
|
|
5294
|
+
* ```
|
|
4071
5295
|
*
|
|
4072
5296
|
* @param params - Parameters for request
|
|
4073
5297
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4159,6 +5383,66 @@ export namespace alloydb_v1beta {
|
|
|
4159
5383
|
|
|
4160
5384
|
/**
|
|
4161
5385
|
* Restores an AlloyDB cluster from a CloudSQL resource.
|
|
5386
|
+
* @example
|
|
5387
|
+
* ```js
|
|
5388
|
+
* // Before running the sample:
|
|
5389
|
+
* // - Enable the API at:
|
|
5390
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5391
|
+
* // - Login into gcloud by running:
|
|
5392
|
+
* // ```sh
|
|
5393
|
+
* // $ gcloud auth application-default login
|
|
5394
|
+
* // ```
|
|
5395
|
+
* // - Install the npm module by running:
|
|
5396
|
+
* // ```sh
|
|
5397
|
+
* // $ npm install googleapis
|
|
5398
|
+
* // ```
|
|
5399
|
+
*
|
|
5400
|
+
* const {google} = require('googleapis');
|
|
5401
|
+
* const alloydb = google.alloydb('v1beta');
|
|
5402
|
+
*
|
|
5403
|
+
* async function main() {
|
|
5404
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5405
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5406
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5407
|
+
* });
|
|
5408
|
+
*
|
|
5409
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5410
|
+
* const authClient = await auth.getClient();
|
|
5411
|
+
* google.options({auth: authClient});
|
|
5412
|
+
*
|
|
5413
|
+
* // Do the magic
|
|
5414
|
+
* const res = await alloydb.projects.locations.clusters.restoreFromCloudSQL({
|
|
5415
|
+
* // Required. The location of the new cluster. For the required format, see the comment on Cluster.name field.
|
|
5416
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5417
|
+
*
|
|
5418
|
+
* // Request body metadata
|
|
5419
|
+
* requestBody: {
|
|
5420
|
+
* // request body parameters
|
|
5421
|
+
* // {
|
|
5422
|
+
* // "cloudsqlBackupRunSource": {},
|
|
5423
|
+
* // "cluster": {},
|
|
5424
|
+
* // "clusterId": "my_clusterId"
|
|
5425
|
+
* // }
|
|
5426
|
+
* },
|
|
5427
|
+
* });
|
|
5428
|
+
* console.log(res.data);
|
|
5429
|
+
*
|
|
5430
|
+
* // Example response
|
|
5431
|
+
* // {
|
|
5432
|
+
* // "done": false,
|
|
5433
|
+
* // "error": {},
|
|
5434
|
+
* // "metadata": {},
|
|
5435
|
+
* // "name": "my_name",
|
|
5436
|
+
* // "response": {}
|
|
5437
|
+
* // }
|
|
5438
|
+
* }
|
|
5439
|
+
*
|
|
5440
|
+
* main().catch(e => {
|
|
5441
|
+
* console.error(e);
|
|
5442
|
+
* throw e;
|
|
5443
|
+
* });
|
|
5444
|
+
*
|
|
5445
|
+
* ```
|
|
4162
5446
|
*
|
|
4163
5447
|
* @param params - Parameters for request
|
|
4164
5448
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4250,6 +5534,65 @@ export namespace alloydb_v1beta {
|
|
|
4250
5534
|
|
|
4251
5535
|
/**
|
|
4252
5536
|
* Switches the roles of PRIMARY and SECONDARY clusters without any data loss. This promotes the SECONDARY cluster to PRIMARY and sets up the original PRIMARY cluster to replicate from this newly promoted cluster.
|
|
5537
|
+
* @example
|
|
5538
|
+
* ```js
|
|
5539
|
+
* // Before running the sample:
|
|
5540
|
+
* // - Enable the API at:
|
|
5541
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5542
|
+
* // - Login into gcloud by running:
|
|
5543
|
+
* // ```sh
|
|
5544
|
+
* // $ gcloud auth application-default login
|
|
5545
|
+
* // ```
|
|
5546
|
+
* // - Install the npm module by running:
|
|
5547
|
+
* // ```sh
|
|
5548
|
+
* // $ npm install googleapis
|
|
5549
|
+
* // ```
|
|
5550
|
+
*
|
|
5551
|
+
* const {google} = require('googleapis');
|
|
5552
|
+
* const alloydb = google.alloydb('v1beta');
|
|
5553
|
+
*
|
|
5554
|
+
* async function main() {
|
|
5555
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5556
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5557
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5558
|
+
* });
|
|
5559
|
+
*
|
|
5560
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5561
|
+
* const authClient = await auth.getClient();
|
|
5562
|
+
* google.options({auth: authClient});
|
|
5563
|
+
*
|
|
5564
|
+
* // Do the magic
|
|
5565
|
+
* const res = await alloydb.projects.locations.clusters.switchover({
|
|
5566
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5567
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5568
|
+
*
|
|
5569
|
+
* // Request body metadata
|
|
5570
|
+
* requestBody: {
|
|
5571
|
+
* // request body parameters
|
|
5572
|
+
* // {
|
|
5573
|
+
* // "requestId": "my_requestId",
|
|
5574
|
+
* // "validateOnly": false
|
|
5575
|
+
* // }
|
|
5576
|
+
* },
|
|
5577
|
+
* });
|
|
5578
|
+
* console.log(res.data);
|
|
5579
|
+
*
|
|
5580
|
+
* // Example response
|
|
5581
|
+
* // {
|
|
5582
|
+
* // "done": false,
|
|
5583
|
+
* // "error": {},
|
|
5584
|
+
* // "metadata": {},
|
|
5585
|
+
* // "name": "my_name",
|
|
5586
|
+
* // "response": {}
|
|
5587
|
+
* // }
|
|
5588
|
+
* }
|
|
5589
|
+
*
|
|
5590
|
+
* main().catch(e => {
|
|
5591
|
+
* console.error(e);
|
|
5592
|
+
* throw e;
|
|
5593
|
+
* });
|
|
5594
|
+
*
|
|
5595
|
+
* ```
|
|
4253
5596
|
*
|
|
4254
5597
|
* @param params - Parameters for request
|
|
4255
5598
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4341,6 +5684,67 @@ export namespace alloydb_v1beta {
|
|
|
4341
5684
|
|
|
4342
5685
|
/**
|
|
4343
5686
|
* Upgrades a single Cluster. Imperative only.
|
|
5687
|
+
* @example
|
|
5688
|
+
* ```js
|
|
5689
|
+
* // Before running the sample:
|
|
5690
|
+
* // - Enable the API at:
|
|
5691
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5692
|
+
* // - Login into gcloud by running:
|
|
5693
|
+
* // ```sh
|
|
5694
|
+
* // $ gcloud auth application-default login
|
|
5695
|
+
* // ```
|
|
5696
|
+
* // - Install the npm module by running:
|
|
5697
|
+
* // ```sh
|
|
5698
|
+
* // $ npm install googleapis
|
|
5699
|
+
* // ```
|
|
5700
|
+
*
|
|
5701
|
+
* const {google} = require('googleapis');
|
|
5702
|
+
* const alloydb = google.alloydb('v1beta');
|
|
5703
|
+
*
|
|
5704
|
+
* async function main() {
|
|
5705
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5706
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5707
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5708
|
+
* });
|
|
5709
|
+
*
|
|
5710
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5711
|
+
* const authClient = await auth.getClient();
|
|
5712
|
+
* google.options({auth: authClient});
|
|
5713
|
+
*
|
|
5714
|
+
* // Do the magic
|
|
5715
|
+
* const res = await alloydb.projects.locations.clusters.upgrade({
|
|
5716
|
+
* // Required. The resource name of the cluster.
|
|
5717
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5718
|
+
*
|
|
5719
|
+
* // Request body metadata
|
|
5720
|
+
* requestBody: {
|
|
5721
|
+
* // request body parameters
|
|
5722
|
+
* // {
|
|
5723
|
+
* // "etag": "my_etag",
|
|
5724
|
+
* // "requestId": "my_requestId",
|
|
5725
|
+
* // "validateOnly": false,
|
|
5726
|
+
* // "version": "my_version"
|
|
5727
|
+
* // }
|
|
5728
|
+
* },
|
|
5729
|
+
* });
|
|
5730
|
+
* console.log(res.data);
|
|
5731
|
+
*
|
|
5732
|
+
* // Example response
|
|
5733
|
+
* // {
|
|
5734
|
+
* // "done": false,
|
|
5735
|
+
* // "error": {},
|
|
5736
|
+
* // "metadata": {},
|
|
5737
|
+
* // "name": "my_name",
|
|
5738
|
+
* // "response": {}
|
|
5739
|
+
* // }
|
|
5740
|
+
* }
|
|
5741
|
+
*
|
|
5742
|
+
* main().catch(e => {
|
|
5743
|
+
* console.error(e);
|
|
5744
|
+
* throw e;
|
|
5745
|
+
* });
|
|
5746
|
+
*
|
|
5747
|
+
* ```
|
|
4344
5748
|
*
|
|
4345
5749
|
* @param params - Parameters for request
|
|
4346
5750
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4657,6 +6061,102 @@ export namespace alloydb_v1beta {
|
|
|
4657
6061
|
|
|
4658
6062
|
/**
|
|
4659
6063
|
* Creates a new Instance in a given project and location.
|
|
6064
|
+
* @example
|
|
6065
|
+
* ```js
|
|
6066
|
+
* // Before running the sample:
|
|
6067
|
+
* // - Enable the API at:
|
|
6068
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6069
|
+
* // - Login into gcloud by running:
|
|
6070
|
+
* // ```sh
|
|
6071
|
+
* // $ gcloud auth application-default login
|
|
6072
|
+
* // ```
|
|
6073
|
+
* // - Install the npm module by running:
|
|
6074
|
+
* // ```sh
|
|
6075
|
+
* // $ npm install googleapis
|
|
6076
|
+
* // ```
|
|
6077
|
+
*
|
|
6078
|
+
* const {google} = require('googleapis');
|
|
6079
|
+
* const alloydb = google.alloydb('v1beta');
|
|
6080
|
+
*
|
|
6081
|
+
* async function main() {
|
|
6082
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6083
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6084
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6085
|
+
* });
|
|
6086
|
+
*
|
|
6087
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6088
|
+
* const authClient = await auth.getClient();
|
|
6089
|
+
* google.options({auth: authClient});
|
|
6090
|
+
*
|
|
6091
|
+
* // Do the magic
|
|
6092
|
+
* const res = await alloydb.projects.locations.clusters.instances.create({
|
|
6093
|
+
* // Required. ID of the requesting object.
|
|
6094
|
+
* instanceId: 'placeholder-value',
|
|
6095
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6096
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6097
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
6098
|
+
* requestId: 'placeholder-value',
|
|
6099
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6100
|
+
* validateOnly: 'placeholder-value',
|
|
6101
|
+
*
|
|
6102
|
+
* // Request body metadata
|
|
6103
|
+
* requestBody: {
|
|
6104
|
+
* // request body parameters
|
|
6105
|
+
* // {
|
|
6106
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6107
|
+
* // "annotations": {},
|
|
6108
|
+
* // "availabilityType": "my_availabilityType",
|
|
6109
|
+
* // "clientConnectionConfig": {},
|
|
6110
|
+
* // "connectionPoolConfig": {},
|
|
6111
|
+
* // "createTime": "my_createTime",
|
|
6112
|
+
* // "databaseFlags": {},
|
|
6113
|
+
* // "deleteTime": "my_deleteTime",
|
|
6114
|
+
* // "displayName": "my_displayName",
|
|
6115
|
+
* // "etag": "my_etag",
|
|
6116
|
+
* // "gcaConfig": {},
|
|
6117
|
+
* // "gceZone": "my_gceZone",
|
|
6118
|
+
* // "geminiConfig": {},
|
|
6119
|
+
* // "instanceType": "my_instanceType",
|
|
6120
|
+
* // "ipAddress": "my_ipAddress",
|
|
6121
|
+
* // "labels": {},
|
|
6122
|
+
* // "machineConfig": {},
|
|
6123
|
+
* // "name": "my_name",
|
|
6124
|
+
* // "networkConfig": {},
|
|
6125
|
+
* // "nodes": [],
|
|
6126
|
+
* // "observabilityConfig": {},
|
|
6127
|
+
* // "outboundPublicIpAddresses": [],
|
|
6128
|
+
* // "pscInstanceConfig": {},
|
|
6129
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6130
|
+
* // "queryInsightsConfig": {},
|
|
6131
|
+
* // "readPoolConfig": {},
|
|
6132
|
+
* // "reconciling": false,
|
|
6133
|
+
* // "satisfiesPzs": false,
|
|
6134
|
+
* // "state": "my_state",
|
|
6135
|
+
* // "uid": "my_uid",
|
|
6136
|
+
* // "updatePolicy": {},
|
|
6137
|
+
* // "updateTime": "my_updateTime",
|
|
6138
|
+
* // "writableNode": {}
|
|
6139
|
+
* // }
|
|
6140
|
+
* },
|
|
6141
|
+
* });
|
|
6142
|
+
* console.log(res.data);
|
|
6143
|
+
*
|
|
6144
|
+
* // Example response
|
|
6145
|
+
* // {
|
|
6146
|
+
* // "done": false,
|
|
6147
|
+
* // "error": {},
|
|
6148
|
+
* // "metadata": {},
|
|
6149
|
+
* // "name": "my_name",
|
|
6150
|
+
* // "response": {}
|
|
6151
|
+
* // }
|
|
6152
|
+
* }
|
|
6153
|
+
*
|
|
6154
|
+
* main().catch(e => {
|
|
6155
|
+
* console.error(e);
|
|
6156
|
+
* throw e;
|
|
6157
|
+
* });
|
|
6158
|
+
*
|
|
6159
|
+
* ```
|
|
4660
6160
|
*
|
|
4661
6161
|
* @param params - Parameters for request
|
|
4662
6162
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4749,6 +6249,103 @@ export namespace alloydb_v1beta {
|
|
|
4749
6249
|
|
|
4750
6250
|
/**
|
|
4751
6251
|
* Creates a new SECONDARY Instance in a given project and location.
|
|
6252
|
+
* @example
|
|
6253
|
+
* ```js
|
|
6254
|
+
* // Before running the sample:
|
|
6255
|
+
* // - Enable the API at:
|
|
6256
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6257
|
+
* // - Login into gcloud by running:
|
|
6258
|
+
* // ```sh
|
|
6259
|
+
* // $ gcloud auth application-default login
|
|
6260
|
+
* // ```
|
|
6261
|
+
* // - Install the npm module by running:
|
|
6262
|
+
* // ```sh
|
|
6263
|
+
* // $ npm install googleapis
|
|
6264
|
+
* // ```
|
|
6265
|
+
*
|
|
6266
|
+
* const {google} = require('googleapis');
|
|
6267
|
+
* const alloydb = google.alloydb('v1beta');
|
|
6268
|
+
*
|
|
6269
|
+
* async function main() {
|
|
6270
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6271
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6272
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6273
|
+
* });
|
|
6274
|
+
*
|
|
6275
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6276
|
+
* const authClient = await auth.getClient();
|
|
6277
|
+
* google.options({auth: authClient});
|
|
6278
|
+
*
|
|
6279
|
+
* // Do the magic
|
|
6280
|
+
* const res =
|
|
6281
|
+
* await alloydb.projects.locations.clusters.instances.createsecondary({
|
|
6282
|
+
* // Required. ID of the requesting object.
|
|
6283
|
+
* instanceId: 'placeholder-value',
|
|
6284
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6285
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6286
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
6287
|
+
* requestId: 'placeholder-value',
|
|
6288
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6289
|
+
* validateOnly: 'placeholder-value',
|
|
6290
|
+
*
|
|
6291
|
+
* // Request body metadata
|
|
6292
|
+
* requestBody: {
|
|
6293
|
+
* // request body parameters
|
|
6294
|
+
* // {
|
|
6295
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6296
|
+
* // "annotations": {},
|
|
6297
|
+
* // "availabilityType": "my_availabilityType",
|
|
6298
|
+
* // "clientConnectionConfig": {},
|
|
6299
|
+
* // "connectionPoolConfig": {},
|
|
6300
|
+
* // "createTime": "my_createTime",
|
|
6301
|
+
* // "databaseFlags": {},
|
|
6302
|
+
* // "deleteTime": "my_deleteTime",
|
|
6303
|
+
* // "displayName": "my_displayName",
|
|
6304
|
+
* // "etag": "my_etag",
|
|
6305
|
+
* // "gcaConfig": {},
|
|
6306
|
+
* // "gceZone": "my_gceZone",
|
|
6307
|
+
* // "geminiConfig": {},
|
|
6308
|
+
* // "instanceType": "my_instanceType",
|
|
6309
|
+
* // "ipAddress": "my_ipAddress",
|
|
6310
|
+
* // "labels": {},
|
|
6311
|
+
* // "machineConfig": {},
|
|
6312
|
+
* // "name": "my_name",
|
|
6313
|
+
* // "networkConfig": {},
|
|
6314
|
+
* // "nodes": [],
|
|
6315
|
+
* // "observabilityConfig": {},
|
|
6316
|
+
* // "outboundPublicIpAddresses": [],
|
|
6317
|
+
* // "pscInstanceConfig": {},
|
|
6318
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6319
|
+
* // "queryInsightsConfig": {},
|
|
6320
|
+
* // "readPoolConfig": {},
|
|
6321
|
+
* // "reconciling": false,
|
|
6322
|
+
* // "satisfiesPzs": false,
|
|
6323
|
+
* // "state": "my_state",
|
|
6324
|
+
* // "uid": "my_uid",
|
|
6325
|
+
* // "updatePolicy": {},
|
|
6326
|
+
* // "updateTime": "my_updateTime",
|
|
6327
|
+
* // "writableNode": {}
|
|
6328
|
+
* // }
|
|
6329
|
+
* },
|
|
6330
|
+
* });
|
|
6331
|
+
* console.log(res.data);
|
|
6332
|
+
*
|
|
6333
|
+
* // Example response
|
|
6334
|
+
* // {
|
|
6335
|
+
* // "done": false,
|
|
6336
|
+
* // "error": {},
|
|
6337
|
+
* // "metadata": {},
|
|
6338
|
+
* // "name": "my_name",
|
|
6339
|
+
* // "response": {}
|
|
6340
|
+
* // }
|
|
6341
|
+
* }
|
|
6342
|
+
*
|
|
6343
|
+
* main().catch(e => {
|
|
6344
|
+
* console.error(e);
|
|
6345
|
+
* throw e;
|
|
6346
|
+
* });
|
|
6347
|
+
*
|
|
6348
|
+
* ```
|
|
4752
6349
|
*
|
|
4753
6350
|
* @param params - Parameters for request
|
|
4754
6351
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4840,6 +6437,62 @@ export namespace alloydb_v1beta {
|
|
|
4840
6437
|
|
|
4841
6438
|
/**
|
|
4842
6439
|
* Deletes a single Instance.
|
|
6440
|
+
* @example
|
|
6441
|
+
* ```js
|
|
6442
|
+
* // Before running the sample:
|
|
6443
|
+
* // - Enable the API at:
|
|
6444
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6445
|
+
* // - Login into gcloud by running:
|
|
6446
|
+
* // ```sh
|
|
6447
|
+
* // $ gcloud auth application-default login
|
|
6448
|
+
* // ```
|
|
6449
|
+
* // - Install the npm module by running:
|
|
6450
|
+
* // ```sh
|
|
6451
|
+
* // $ npm install googleapis
|
|
6452
|
+
* // ```
|
|
6453
|
+
*
|
|
6454
|
+
* const {google} = require('googleapis');
|
|
6455
|
+
* const alloydb = google.alloydb('v1beta');
|
|
6456
|
+
*
|
|
6457
|
+
* async function main() {
|
|
6458
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6459
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6460
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6461
|
+
* });
|
|
6462
|
+
*
|
|
6463
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6464
|
+
* const authClient = await auth.getClient();
|
|
6465
|
+
* google.options({auth: authClient});
|
|
6466
|
+
*
|
|
6467
|
+
* // Do the magic
|
|
6468
|
+
* const res = await alloydb.projects.locations.clusters.instances.delete({
|
|
6469
|
+
* // Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.
|
|
6470
|
+
* etag: 'placeholder-value',
|
|
6471
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6472
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6473
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
6474
|
+
* requestId: 'placeholder-value',
|
|
6475
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6476
|
+
* validateOnly: 'placeholder-value',
|
|
6477
|
+
* });
|
|
6478
|
+
* console.log(res.data);
|
|
6479
|
+
*
|
|
6480
|
+
* // Example response
|
|
6481
|
+
* // {
|
|
6482
|
+
* // "done": false,
|
|
6483
|
+
* // "error": {},
|
|
6484
|
+
* // "metadata": {},
|
|
6485
|
+
* // "name": "my_name",
|
|
6486
|
+
* // "response": {}
|
|
6487
|
+
* // }
|
|
6488
|
+
* }
|
|
6489
|
+
*
|
|
6490
|
+
* main().catch(e => {
|
|
6491
|
+
* console.error(e);
|
|
6492
|
+
* throw e;
|
|
6493
|
+
* });
|
|
6494
|
+
*
|
|
6495
|
+
* ```
|
|
4843
6496
|
*
|
|
4844
6497
|
* @param params - Parameters for request
|
|
4845
6498
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4929,6 +6582,65 @@ export namespace alloydb_v1beta {
|
|
|
4929
6582
|
|
|
4930
6583
|
/**
|
|
4931
6584
|
* Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.
|
|
6585
|
+
* @example
|
|
6586
|
+
* ```js
|
|
6587
|
+
* // Before running the sample:
|
|
6588
|
+
* // - Enable the API at:
|
|
6589
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6590
|
+
* // - Login into gcloud by running:
|
|
6591
|
+
* // ```sh
|
|
6592
|
+
* // $ gcloud auth application-default login
|
|
6593
|
+
* // ```
|
|
6594
|
+
* // - Install the npm module by running:
|
|
6595
|
+
* // ```sh
|
|
6596
|
+
* // $ npm install googleapis
|
|
6597
|
+
* // ```
|
|
6598
|
+
*
|
|
6599
|
+
* const {google} = require('googleapis');
|
|
6600
|
+
* const alloydb = google.alloydb('v1beta');
|
|
6601
|
+
*
|
|
6602
|
+
* async function main() {
|
|
6603
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6604
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6605
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6606
|
+
* });
|
|
6607
|
+
*
|
|
6608
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6609
|
+
* const authClient = await auth.getClient();
|
|
6610
|
+
* google.options({auth: authClient});
|
|
6611
|
+
*
|
|
6612
|
+
* // Do the magic
|
|
6613
|
+
* const res = await alloydb.projects.locations.clusters.instances.failover({
|
|
6614
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6615
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6616
|
+
*
|
|
6617
|
+
* // Request body metadata
|
|
6618
|
+
* requestBody: {
|
|
6619
|
+
* // request body parameters
|
|
6620
|
+
* // {
|
|
6621
|
+
* // "requestId": "my_requestId",
|
|
6622
|
+
* // "validateOnly": false
|
|
6623
|
+
* // }
|
|
6624
|
+
* },
|
|
6625
|
+
* });
|
|
6626
|
+
* console.log(res.data);
|
|
6627
|
+
*
|
|
6628
|
+
* // Example response
|
|
6629
|
+
* // {
|
|
6630
|
+
* // "done": false,
|
|
6631
|
+
* // "error": {},
|
|
6632
|
+
* // "metadata": {},
|
|
6633
|
+
* // "name": "my_name",
|
|
6634
|
+
* // "response": {}
|
|
6635
|
+
* // }
|
|
6636
|
+
* }
|
|
6637
|
+
*
|
|
6638
|
+
* main().catch(e => {
|
|
6639
|
+
* console.error(e);
|
|
6640
|
+
* throw e;
|
|
6641
|
+
* });
|
|
6642
|
+
*
|
|
6643
|
+
* ```
|
|
4932
6644
|
*
|
|
4933
6645
|
* @param params - Parameters for request
|
|
4934
6646
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5021,6 +6733,86 @@ export namespace alloydb_v1beta {
|
|
|
5021
6733
|
|
|
5022
6734
|
/**
|
|
5023
6735
|
* Gets details of a single Instance.
|
|
6736
|
+
* @example
|
|
6737
|
+
* ```js
|
|
6738
|
+
* // Before running the sample:
|
|
6739
|
+
* // - Enable the API at:
|
|
6740
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6741
|
+
* // - Login into gcloud by running:
|
|
6742
|
+
* // ```sh
|
|
6743
|
+
* // $ gcloud auth application-default login
|
|
6744
|
+
* // ```
|
|
6745
|
+
* // - Install the npm module by running:
|
|
6746
|
+
* // ```sh
|
|
6747
|
+
* // $ npm install googleapis
|
|
6748
|
+
* // ```
|
|
6749
|
+
*
|
|
6750
|
+
* const {google} = require('googleapis');
|
|
6751
|
+
* const alloydb = google.alloydb('v1beta');
|
|
6752
|
+
*
|
|
6753
|
+
* async function main() {
|
|
6754
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6755
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6756
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6757
|
+
* });
|
|
6758
|
+
*
|
|
6759
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6760
|
+
* const authClient = await auth.getClient();
|
|
6761
|
+
* google.options({auth: authClient});
|
|
6762
|
+
*
|
|
6763
|
+
* // Do the magic
|
|
6764
|
+
* const res = await alloydb.projects.locations.clusters.instances.get({
|
|
6765
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6766
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6767
|
+
* // The view of the instance to return.
|
|
6768
|
+
* view: 'placeholder-value',
|
|
6769
|
+
* });
|
|
6770
|
+
* console.log(res.data);
|
|
6771
|
+
*
|
|
6772
|
+
* // Example response
|
|
6773
|
+
* // {
|
|
6774
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6775
|
+
* // "annotations": {},
|
|
6776
|
+
* // "availabilityType": "my_availabilityType",
|
|
6777
|
+
* // "clientConnectionConfig": {},
|
|
6778
|
+
* // "connectionPoolConfig": {},
|
|
6779
|
+
* // "createTime": "my_createTime",
|
|
6780
|
+
* // "databaseFlags": {},
|
|
6781
|
+
* // "deleteTime": "my_deleteTime",
|
|
6782
|
+
* // "displayName": "my_displayName",
|
|
6783
|
+
* // "etag": "my_etag",
|
|
6784
|
+
* // "gcaConfig": {},
|
|
6785
|
+
* // "gceZone": "my_gceZone",
|
|
6786
|
+
* // "geminiConfig": {},
|
|
6787
|
+
* // "instanceType": "my_instanceType",
|
|
6788
|
+
* // "ipAddress": "my_ipAddress",
|
|
6789
|
+
* // "labels": {},
|
|
6790
|
+
* // "machineConfig": {},
|
|
6791
|
+
* // "name": "my_name",
|
|
6792
|
+
* // "networkConfig": {},
|
|
6793
|
+
* // "nodes": [],
|
|
6794
|
+
* // "observabilityConfig": {},
|
|
6795
|
+
* // "outboundPublicIpAddresses": [],
|
|
6796
|
+
* // "pscInstanceConfig": {},
|
|
6797
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6798
|
+
* // "queryInsightsConfig": {},
|
|
6799
|
+
* // "readPoolConfig": {},
|
|
6800
|
+
* // "reconciling": false,
|
|
6801
|
+
* // "satisfiesPzs": false,
|
|
6802
|
+
* // "state": "my_state",
|
|
6803
|
+
* // "uid": "my_uid",
|
|
6804
|
+
* // "updatePolicy": {},
|
|
6805
|
+
* // "updateTime": "my_updateTime",
|
|
6806
|
+
* // "writableNode": {}
|
|
6807
|
+
* // }
|
|
6808
|
+
* }
|
|
6809
|
+
*
|
|
6810
|
+
* main().catch(e => {
|
|
6811
|
+
* console.error(e);
|
|
6812
|
+
* throw e;
|
|
6813
|
+
* });
|
|
6814
|
+
*
|
|
6815
|
+
* ```
|
|
5024
6816
|
*
|
|
5025
6817
|
* @param params - Parameters for request
|
|
5026
6818
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5110,6 +6902,61 @@ export namespace alloydb_v1beta {
|
|
|
5110
6902
|
|
|
5111
6903
|
/**
|
|
5112
6904
|
* Get instance metadata used for a connection.
|
|
6905
|
+
* @example
|
|
6906
|
+
* ```js
|
|
6907
|
+
* // Before running the sample:
|
|
6908
|
+
* // - Enable the API at:
|
|
6909
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6910
|
+
* // - Login into gcloud by running:
|
|
6911
|
+
* // ```sh
|
|
6912
|
+
* // $ gcloud auth application-default login
|
|
6913
|
+
* // ```
|
|
6914
|
+
* // - Install the npm module by running:
|
|
6915
|
+
* // ```sh
|
|
6916
|
+
* // $ npm install googleapis
|
|
6917
|
+
* // ```
|
|
6918
|
+
*
|
|
6919
|
+
* const {google} = require('googleapis');
|
|
6920
|
+
* const alloydb = google.alloydb('v1beta');
|
|
6921
|
+
*
|
|
6922
|
+
* async function main() {
|
|
6923
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6924
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6925
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6926
|
+
* });
|
|
6927
|
+
*
|
|
6928
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6929
|
+
* const authClient = await auth.getClient();
|
|
6930
|
+
* google.options({auth: authClient});
|
|
6931
|
+
*
|
|
6932
|
+
* // Do the magic
|
|
6933
|
+
* const res =
|
|
6934
|
+
* await alloydb.projects.locations.clusters.instances.getConnectionInfo({
|
|
6935
|
+
* // Required. The name of the parent resource. The required format is: projects/{project\}/locations/{location\}/clusters/{cluster\}/instances/{instance\}
|
|
6936
|
+
* parent:
|
|
6937
|
+
* 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6938
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
6939
|
+
* requestId: 'placeholder-value',
|
|
6940
|
+
* });
|
|
6941
|
+
* console.log(res.data);
|
|
6942
|
+
*
|
|
6943
|
+
* // Example response
|
|
6944
|
+
* // {
|
|
6945
|
+
* // "instanceUid": "my_instanceUid",
|
|
6946
|
+
* // "ipAddress": "my_ipAddress",
|
|
6947
|
+
* // "name": "my_name",
|
|
6948
|
+
* // "pemCertificateChain": [],
|
|
6949
|
+
* // "pscDnsName": "my_pscDnsName",
|
|
6950
|
+
* // "publicIpAddress": "my_publicIpAddress"
|
|
6951
|
+
* // }
|
|
6952
|
+
* }
|
|
6953
|
+
*
|
|
6954
|
+
* main().catch(e => {
|
|
6955
|
+
* console.error(e);
|
|
6956
|
+
* throw e;
|
|
6957
|
+
* });
|
|
6958
|
+
*
|
|
6959
|
+
* ```
|
|
5113
6960
|
*
|
|
5114
6961
|
* @param params - Parameters for request
|
|
5115
6962
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5204,6 +7051,66 @@ export namespace alloydb_v1beta {
|
|
|
5204
7051
|
|
|
5205
7052
|
/**
|
|
5206
7053
|
* Injects fault in an instance. Imperative only.
|
|
7054
|
+
* @example
|
|
7055
|
+
* ```js
|
|
7056
|
+
* // Before running the sample:
|
|
7057
|
+
* // - Enable the API at:
|
|
7058
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7059
|
+
* // - Login into gcloud by running:
|
|
7060
|
+
* // ```sh
|
|
7061
|
+
* // $ gcloud auth application-default login
|
|
7062
|
+
* // ```
|
|
7063
|
+
* // - Install the npm module by running:
|
|
7064
|
+
* // ```sh
|
|
7065
|
+
* // $ npm install googleapis
|
|
7066
|
+
* // ```
|
|
7067
|
+
*
|
|
7068
|
+
* const {google} = require('googleapis');
|
|
7069
|
+
* const alloydb = google.alloydb('v1beta');
|
|
7070
|
+
*
|
|
7071
|
+
* async function main() {
|
|
7072
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7073
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7074
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7075
|
+
* });
|
|
7076
|
+
*
|
|
7077
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7078
|
+
* const authClient = await auth.getClient();
|
|
7079
|
+
* google.options({auth: authClient});
|
|
7080
|
+
*
|
|
7081
|
+
* // Do the magic
|
|
7082
|
+
* const res = await alloydb.projects.locations.clusters.instances.injectFault({
|
|
7083
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7084
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7085
|
+
*
|
|
7086
|
+
* // Request body metadata
|
|
7087
|
+
* requestBody: {
|
|
7088
|
+
* // request body parameters
|
|
7089
|
+
* // {
|
|
7090
|
+
* // "faultType": "my_faultType",
|
|
7091
|
+
* // "requestId": "my_requestId",
|
|
7092
|
+
* // "validateOnly": false
|
|
7093
|
+
* // }
|
|
7094
|
+
* },
|
|
7095
|
+
* });
|
|
7096
|
+
* console.log(res.data);
|
|
7097
|
+
*
|
|
7098
|
+
* // Example response
|
|
7099
|
+
* // {
|
|
7100
|
+
* // "done": false,
|
|
7101
|
+
* // "error": {},
|
|
7102
|
+
* // "metadata": {},
|
|
7103
|
+
* // "name": "my_name",
|
|
7104
|
+
* // "response": {}
|
|
7105
|
+
* // }
|
|
7106
|
+
* }
|
|
7107
|
+
*
|
|
7108
|
+
* main().catch(e => {
|
|
7109
|
+
* console.error(e);
|
|
7110
|
+
* throw e;
|
|
7111
|
+
* });
|
|
7112
|
+
*
|
|
7113
|
+
* ```
|
|
5207
7114
|
*
|
|
5208
7115
|
* @param params - Parameters for request
|
|
5209
7116
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5296,6 +7203,62 @@ export namespace alloydb_v1beta {
|
|
|
5296
7203
|
|
|
5297
7204
|
/**
|
|
5298
7205
|
* Lists Instances in a given project and location.
|
|
7206
|
+
* @example
|
|
7207
|
+
* ```js
|
|
7208
|
+
* // Before running the sample:
|
|
7209
|
+
* // - Enable the API at:
|
|
7210
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7211
|
+
* // - Login into gcloud by running:
|
|
7212
|
+
* // ```sh
|
|
7213
|
+
* // $ gcloud auth application-default login
|
|
7214
|
+
* // ```
|
|
7215
|
+
* // - Install the npm module by running:
|
|
7216
|
+
* // ```sh
|
|
7217
|
+
* // $ npm install googleapis
|
|
7218
|
+
* // ```
|
|
7219
|
+
*
|
|
7220
|
+
* const {google} = require('googleapis');
|
|
7221
|
+
* const alloydb = google.alloydb('v1beta');
|
|
7222
|
+
*
|
|
7223
|
+
* async function main() {
|
|
7224
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7225
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7226
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7227
|
+
* });
|
|
7228
|
+
*
|
|
7229
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7230
|
+
* const authClient = await auth.getClient();
|
|
7231
|
+
* google.options({auth: authClient});
|
|
7232
|
+
*
|
|
7233
|
+
* // Do the magic
|
|
7234
|
+
* const res = await alloydb.projects.locations.clusters.instances.list({
|
|
7235
|
+
* // Optional. Filtering results
|
|
7236
|
+
* filter: 'placeholder-value',
|
|
7237
|
+
* // Optional. Hint for how to order the results
|
|
7238
|
+
* orderBy: 'placeholder-value',
|
|
7239
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
7240
|
+
* pageSize: 'placeholder-value',
|
|
7241
|
+
* // A token identifying a page of results the server should return.
|
|
7242
|
+
* pageToken: 'placeholder-value',
|
|
7243
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field. Additionally, you can perform an aggregated list operation by specifying a value with one of the following formats: * projects/{project\}/locations/-/clusters/- * projects/{project\}/locations/{region\}/clusters/-
|
|
7244
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
7245
|
+
* });
|
|
7246
|
+
* console.log(res.data);
|
|
7247
|
+
*
|
|
7248
|
+
* // Example response
|
|
7249
|
+
* // {
|
|
7250
|
+
* // "instances": [],
|
|
7251
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
7252
|
+
* // "unreachable": []
|
|
7253
|
+
* // }
|
|
7254
|
+
* }
|
|
7255
|
+
*
|
|
7256
|
+
* main().catch(e => {
|
|
7257
|
+
* console.error(e);
|
|
7258
|
+
* throw e;
|
|
7259
|
+
* });
|
|
7260
|
+
*
|
|
7261
|
+
* ```
|
|
5299
7262
|
*
|
|
5300
7263
|
* @param params - Parameters for request
|
|
5301
7264
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5390,6 +7353,104 @@ export namespace alloydb_v1beta {
|
|
|
5390
7353
|
|
|
5391
7354
|
/**
|
|
5392
7355
|
* Updates the parameters of a single Instance.
|
|
7356
|
+
* @example
|
|
7357
|
+
* ```js
|
|
7358
|
+
* // Before running the sample:
|
|
7359
|
+
* // - Enable the API at:
|
|
7360
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7361
|
+
* // - Login into gcloud by running:
|
|
7362
|
+
* // ```sh
|
|
7363
|
+
* // $ gcloud auth application-default login
|
|
7364
|
+
* // ```
|
|
7365
|
+
* // - Install the npm module by running:
|
|
7366
|
+
* // ```sh
|
|
7367
|
+
* // $ npm install googleapis
|
|
7368
|
+
* // ```
|
|
7369
|
+
*
|
|
7370
|
+
* const {google} = require('googleapis');
|
|
7371
|
+
* const alloydb = google.alloydb('v1beta');
|
|
7372
|
+
*
|
|
7373
|
+
* async function main() {
|
|
7374
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7375
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7376
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7377
|
+
* });
|
|
7378
|
+
*
|
|
7379
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7380
|
+
* const authClient = await auth.getClient();
|
|
7381
|
+
* google.options({auth: authClient});
|
|
7382
|
+
*
|
|
7383
|
+
* // Do the magic
|
|
7384
|
+
* const res = await alloydb.projects.locations.clusters.instances.patch({
|
|
7385
|
+
* // Optional. If set to true, update succeeds even if instance is not found. In that case, a new instance is created and `update_mask` is ignored.
|
|
7386
|
+
* allowMissing: 'placeholder-value',
|
|
7387
|
+
* // Output only. The name of the instance resource with the format: * projects/{project\}/locations/{region\}/clusters/{cluster_id\}/instances/{instance_id\} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61\}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/{project\}/locations/{region\}/clusters/{cluster_id\}
|
|
7388
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7389
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
7390
|
+
* requestId: 'placeholder-value',
|
|
7391
|
+
* // Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
|
|
7392
|
+
* updateMask: 'placeholder-value',
|
|
7393
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
7394
|
+
* validateOnly: 'placeholder-value',
|
|
7395
|
+
*
|
|
7396
|
+
* // Request body metadata
|
|
7397
|
+
* requestBody: {
|
|
7398
|
+
* // request body parameters
|
|
7399
|
+
* // {
|
|
7400
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
7401
|
+
* // "annotations": {},
|
|
7402
|
+
* // "availabilityType": "my_availabilityType",
|
|
7403
|
+
* // "clientConnectionConfig": {},
|
|
7404
|
+
* // "connectionPoolConfig": {},
|
|
7405
|
+
* // "createTime": "my_createTime",
|
|
7406
|
+
* // "databaseFlags": {},
|
|
7407
|
+
* // "deleteTime": "my_deleteTime",
|
|
7408
|
+
* // "displayName": "my_displayName",
|
|
7409
|
+
* // "etag": "my_etag",
|
|
7410
|
+
* // "gcaConfig": {},
|
|
7411
|
+
* // "gceZone": "my_gceZone",
|
|
7412
|
+
* // "geminiConfig": {},
|
|
7413
|
+
* // "instanceType": "my_instanceType",
|
|
7414
|
+
* // "ipAddress": "my_ipAddress",
|
|
7415
|
+
* // "labels": {},
|
|
7416
|
+
* // "machineConfig": {},
|
|
7417
|
+
* // "name": "my_name",
|
|
7418
|
+
* // "networkConfig": {},
|
|
7419
|
+
* // "nodes": [],
|
|
7420
|
+
* // "observabilityConfig": {},
|
|
7421
|
+
* // "outboundPublicIpAddresses": [],
|
|
7422
|
+
* // "pscInstanceConfig": {},
|
|
7423
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
7424
|
+
* // "queryInsightsConfig": {},
|
|
7425
|
+
* // "readPoolConfig": {},
|
|
7426
|
+
* // "reconciling": false,
|
|
7427
|
+
* // "satisfiesPzs": false,
|
|
7428
|
+
* // "state": "my_state",
|
|
7429
|
+
* // "uid": "my_uid",
|
|
7430
|
+
* // "updatePolicy": {},
|
|
7431
|
+
* // "updateTime": "my_updateTime",
|
|
7432
|
+
* // "writableNode": {}
|
|
7433
|
+
* // }
|
|
7434
|
+
* },
|
|
7435
|
+
* });
|
|
7436
|
+
* console.log(res.data);
|
|
7437
|
+
*
|
|
7438
|
+
* // Example response
|
|
7439
|
+
* // {
|
|
7440
|
+
* // "done": false,
|
|
7441
|
+
* // "error": {},
|
|
7442
|
+
* // "metadata": {},
|
|
7443
|
+
* // "name": "my_name",
|
|
7444
|
+
* // "response": {}
|
|
7445
|
+
* // }
|
|
7446
|
+
* }
|
|
7447
|
+
*
|
|
7448
|
+
* main().catch(e => {
|
|
7449
|
+
* console.error(e);
|
|
7450
|
+
* throw e;
|
|
7451
|
+
* });
|
|
7452
|
+
*
|
|
7453
|
+
* ```
|
|
5393
7454
|
*
|
|
5394
7455
|
* @param params - Parameters for request
|
|
5395
7456
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5479,6 +7540,66 @@ export namespace alloydb_v1beta {
|
|
|
5479
7540
|
|
|
5480
7541
|
/**
|
|
5481
7542
|
* Restart an Instance in a cluster. Imperative only.
|
|
7543
|
+
* @example
|
|
7544
|
+
* ```js
|
|
7545
|
+
* // Before running the sample:
|
|
7546
|
+
* // - Enable the API at:
|
|
7547
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7548
|
+
* // - Login into gcloud by running:
|
|
7549
|
+
* // ```sh
|
|
7550
|
+
* // $ gcloud auth application-default login
|
|
7551
|
+
* // ```
|
|
7552
|
+
* // - Install the npm module by running:
|
|
7553
|
+
* // ```sh
|
|
7554
|
+
* // $ npm install googleapis
|
|
7555
|
+
* // ```
|
|
7556
|
+
*
|
|
7557
|
+
* const {google} = require('googleapis');
|
|
7558
|
+
* const alloydb = google.alloydb('v1beta');
|
|
7559
|
+
*
|
|
7560
|
+
* async function main() {
|
|
7561
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7562
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7563
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7564
|
+
* });
|
|
7565
|
+
*
|
|
7566
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7567
|
+
* const authClient = await auth.getClient();
|
|
7568
|
+
* google.options({auth: authClient});
|
|
7569
|
+
*
|
|
7570
|
+
* // Do the magic
|
|
7571
|
+
* const res = await alloydb.projects.locations.clusters.instances.restart({
|
|
7572
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7573
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7574
|
+
*
|
|
7575
|
+
* // Request body metadata
|
|
7576
|
+
* requestBody: {
|
|
7577
|
+
* // request body parameters
|
|
7578
|
+
* // {
|
|
7579
|
+
* // "nodeIds": [],
|
|
7580
|
+
* // "requestId": "my_requestId",
|
|
7581
|
+
* // "validateOnly": false
|
|
7582
|
+
* // }
|
|
7583
|
+
* },
|
|
7584
|
+
* });
|
|
7585
|
+
* console.log(res.data);
|
|
7586
|
+
*
|
|
7587
|
+
* // Example response
|
|
7588
|
+
* // {
|
|
7589
|
+
* // "done": false,
|
|
7590
|
+
* // "error": {},
|
|
7591
|
+
* // "metadata": {},
|
|
7592
|
+
* // "name": "my_name",
|
|
7593
|
+
* // "response": {}
|
|
7594
|
+
* // }
|
|
7595
|
+
* }
|
|
7596
|
+
*
|
|
7597
|
+
* main().catch(e => {
|
|
7598
|
+
* console.error(e);
|
|
7599
|
+
* throw e;
|
|
7600
|
+
* });
|
|
7601
|
+
*
|
|
7602
|
+
* ```
|
|
5482
7603
|
*
|
|
5483
7604
|
* @param params - Parameters for request
|
|
5484
7605
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5755,6 +7876,74 @@ export namespace alloydb_v1beta {
|
|
|
5755
7876
|
|
|
5756
7877
|
/**
|
|
5757
7878
|
* Creates a new User in a given project, location, and cluster.
|
|
7879
|
+
* @example
|
|
7880
|
+
* ```js
|
|
7881
|
+
* // Before running the sample:
|
|
7882
|
+
* // - Enable the API at:
|
|
7883
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7884
|
+
* // - Login into gcloud by running:
|
|
7885
|
+
* // ```sh
|
|
7886
|
+
* // $ gcloud auth application-default login
|
|
7887
|
+
* // ```
|
|
7888
|
+
* // - Install the npm module by running:
|
|
7889
|
+
* // ```sh
|
|
7890
|
+
* // $ npm install googleapis
|
|
7891
|
+
* // ```
|
|
7892
|
+
*
|
|
7893
|
+
* const {google} = require('googleapis');
|
|
7894
|
+
* const alloydb = google.alloydb('v1beta');
|
|
7895
|
+
*
|
|
7896
|
+
* async function main() {
|
|
7897
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7898
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7899
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7900
|
+
* });
|
|
7901
|
+
*
|
|
7902
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7903
|
+
* const authClient = await auth.getClient();
|
|
7904
|
+
* google.options({auth: authClient});
|
|
7905
|
+
*
|
|
7906
|
+
* // Do the magic
|
|
7907
|
+
* const res = await alloydb.projects.locations.clusters.users.create({
|
|
7908
|
+
* // Required. Value for parent.
|
|
7909
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
7910
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
7911
|
+
* requestId: 'placeholder-value',
|
|
7912
|
+
* // Required. ID of the requesting object.
|
|
7913
|
+
* userId: 'placeholder-value',
|
|
7914
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
7915
|
+
* validateOnly: 'placeholder-value',
|
|
7916
|
+
*
|
|
7917
|
+
* // Request body metadata
|
|
7918
|
+
* requestBody: {
|
|
7919
|
+
* // request body parameters
|
|
7920
|
+
* // {
|
|
7921
|
+
* // "databaseRoles": [],
|
|
7922
|
+
* // "keepExtraRoles": false,
|
|
7923
|
+
* // "name": "my_name",
|
|
7924
|
+
* // "password": "my_password",
|
|
7925
|
+
* // "userType": "my_userType"
|
|
7926
|
+
* // }
|
|
7927
|
+
* },
|
|
7928
|
+
* });
|
|
7929
|
+
* console.log(res.data);
|
|
7930
|
+
*
|
|
7931
|
+
* // Example response
|
|
7932
|
+
* // {
|
|
7933
|
+
* // "databaseRoles": [],
|
|
7934
|
+
* // "keepExtraRoles": false,
|
|
7935
|
+
* // "name": "my_name",
|
|
7936
|
+
* // "password": "my_password",
|
|
7937
|
+
* // "userType": "my_userType"
|
|
7938
|
+
* // }
|
|
7939
|
+
* }
|
|
7940
|
+
*
|
|
7941
|
+
* main().catch(e => {
|
|
7942
|
+
* console.error(e);
|
|
7943
|
+
* throw e;
|
|
7944
|
+
* });
|
|
7945
|
+
*
|
|
7946
|
+
* ```
|
|
5758
7947
|
*
|
|
5759
7948
|
* @param params - Parameters for request
|
|
5760
7949
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5846,6 +8035,54 @@ export namespace alloydb_v1beta {
|
|
|
5846
8035
|
|
|
5847
8036
|
/**
|
|
5848
8037
|
* Deletes a single User.
|
|
8038
|
+
* @example
|
|
8039
|
+
* ```js
|
|
8040
|
+
* // Before running the sample:
|
|
8041
|
+
* // - Enable the API at:
|
|
8042
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8043
|
+
* // - Login into gcloud by running:
|
|
8044
|
+
* // ```sh
|
|
8045
|
+
* // $ gcloud auth application-default login
|
|
8046
|
+
* // ```
|
|
8047
|
+
* // - Install the npm module by running:
|
|
8048
|
+
* // ```sh
|
|
8049
|
+
* // $ npm install googleapis
|
|
8050
|
+
* // ```
|
|
8051
|
+
*
|
|
8052
|
+
* const {google} = require('googleapis');
|
|
8053
|
+
* const alloydb = google.alloydb('v1beta');
|
|
8054
|
+
*
|
|
8055
|
+
* async function main() {
|
|
8056
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8057
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8058
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8059
|
+
* });
|
|
8060
|
+
*
|
|
8061
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8062
|
+
* const authClient = await auth.getClient();
|
|
8063
|
+
* google.options({auth: authClient});
|
|
8064
|
+
*
|
|
8065
|
+
* // Do the magic
|
|
8066
|
+
* const res = await alloydb.projects.locations.clusters.users.delete({
|
|
8067
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
8068
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8069
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
8070
|
+
* requestId: 'placeholder-value',
|
|
8071
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8072
|
+
* validateOnly: 'placeholder-value',
|
|
8073
|
+
* });
|
|
8074
|
+
* console.log(res.data);
|
|
8075
|
+
*
|
|
8076
|
+
* // Example response
|
|
8077
|
+
* // {}
|
|
8078
|
+
* }
|
|
8079
|
+
*
|
|
8080
|
+
* main().catch(e => {
|
|
8081
|
+
* console.error(e);
|
|
8082
|
+
* throw e;
|
|
8083
|
+
* });
|
|
8084
|
+
*
|
|
8085
|
+
* ```
|
|
5849
8086
|
*
|
|
5850
8087
|
* @param params - Parameters for request
|
|
5851
8088
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5934,6 +8171,56 @@ export namespace alloydb_v1beta {
|
|
|
5934
8171
|
|
|
5935
8172
|
/**
|
|
5936
8173
|
* Gets details of a single User.
|
|
8174
|
+
* @example
|
|
8175
|
+
* ```js
|
|
8176
|
+
* // Before running the sample:
|
|
8177
|
+
* // - Enable the API at:
|
|
8178
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8179
|
+
* // - Login into gcloud by running:
|
|
8180
|
+
* // ```sh
|
|
8181
|
+
* // $ gcloud auth application-default login
|
|
8182
|
+
* // ```
|
|
8183
|
+
* // - Install the npm module by running:
|
|
8184
|
+
* // ```sh
|
|
8185
|
+
* // $ npm install googleapis
|
|
8186
|
+
* // ```
|
|
8187
|
+
*
|
|
8188
|
+
* const {google} = require('googleapis');
|
|
8189
|
+
* const alloydb = google.alloydb('v1beta');
|
|
8190
|
+
*
|
|
8191
|
+
* async function main() {
|
|
8192
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8193
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8194
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8195
|
+
* });
|
|
8196
|
+
*
|
|
8197
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8198
|
+
* const authClient = await auth.getClient();
|
|
8199
|
+
* google.options({auth: authClient});
|
|
8200
|
+
*
|
|
8201
|
+
* // Do the magic
|
|
8202
|
+
* const res = await alloydb.projects.locations.clusters.users.get({
|
|
8203
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
8204
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8205
|
+
* });
|
|
8206
|
+
* console.log(res.data);
|
|
8207
|
+
*
|
|
8208
|
+
* // Example response
|
|
8209
|
+
* // {
|
|
8210
|
+
* // "databaseRoles": [],
|
|
8211
|
+
* // "keepExtraRoles": false,
|
|
8212
|
+
* // "name": "my_name",
|
|
8213
|
+
* // "password": "my_password",
|
|
8214
|
+
* // "userType": "my_userType"
|
|
8215
|
+
* // }
|
|
8216
|
+
* }
|
|
8217
|
+
*
|
|
8218
|
+
* main().catch(e => {
|
|
8219
|
+
* console.error(e);
|
|
8220
|
+
* throw e;
|
|
8221
|
+
* });
|
|
8222
|
+
*
|
|
8223
|
+
* ```
|
|
5937
8224
|
*
|
|
5938
8225
|
* @param params - Parameters for request
|
|
5939
8226
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6022,6 +8309,62 @@ export namespace alloydb_v1beta {
|
|
|
6022
8309
|
|
|
6023
8310
|
/**
|
|
6024
8311
|
* Lists Users in a given project and location.
|
|
8312
|
+
* @example
|
|
8313
|
+
* ```js
|
|
8314
|
+
* // Before running the sample:
|
|
8315
|
+
* // - Enable the API at:
|
|
8316
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8317
|
+
* // - Login into gcloud by running:
|
|
8318
|
+
* // ```sh
|
|
8319
|
+
* // $ gcloud auth application-default login
|
|
8320
|
+
* // ```
|
|
8321
|
+
* // - Install the npm module by running:
|
|
8322
|
+
* // ```sh
|
|
8323
|
+
* // $ npm install googleapis
|
|
8324
|
+
* // ```
|
|
8325
|
+
*
|
|
8326
|
+
* const {google} = require('googleapis');
|
|
8327
|
+
* const alloydb = google.alloydb('v1beta');
|
|
8328
|
+
*
|
|
8329
|
+
* async function main() {
|
|
8330
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8331
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8332
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8333
|
+
* });
|
|
8334
|
+
*
|
|
8335
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8336
|
+
* const authClient = await auth.getClient();
|
|
8337
|
+
* google.options({auth: authClient});
|
|
8338
|
+
*
|
|
8339
|
+
* // Do the magic
|
|
8340
|
+
* const res = await alloydb.projects.locations.clusters.users.list({
|
|
8341
|
+
* // Optional. Filtering results
|
|
8342
|
+
* filter: 'placeholder-value',
|
|
8343
|
+
* // Optional. Hint for how to order the results
|
|
8344
|
+
* orderBy: 'placeholder-value',
|
|
8345
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
8346
|
+
* pageSize: 'placeholder-value',
|
|
8347
|
+
* // Optional. A token identifying a page of results the server should return.
|
|
8348
|
+
* pageToken: 'placeholder-value',
|
|
8349
|
+
* // Required. Parent value for ListUsersRequest
|
|
8350
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
8351
|
+
* });
|
|
8352
|
+
* console.log(res.data);
|
|
8353
|
+
*
|
|
8354
|
+
* // Example response
|
|
8355
|
+
* // {
|
|
8356
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
8357
|
+
* // "unreachable": [],
|
|
8358
|
+
* // "users": []
|
|
8359
|
+
* // }
|
|
8360
|
+
* }
|
|
8361
|
+
*
|
|
8362
|
+
* main().catch(e => {
|
|
8363
|
+
* console.error(e);
|
|
8364
|
+
* throw e;
|
|
8365
|
+
* });
|
|
8366
|
+
*
|
|
8367
|
+
* ```
|
|
6025
8368
|
*
|
|
6026
8369
|
* @param params - Parameters for request
|
|
6027
8370
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6113,6 +8456,76 @@ export namespace alloydb_v1beta {
|
|
|
6113
8456
|
|
|
6114
8457
|
/**
|
|
6115
8458
|
* Updates the parameters of a single User.
|
|
8459
|
+
* @example
|
|
8460
|
+
* ```js
|
|
8461
|
+
* // Before running the sample:
|
|
8462
|
+
* // - Enable the API at:
|
|
8463
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8464
|
+
* // - Login into gcloud by running:
|
|
8465
|
+
* // ```sh
|
|
8466
|
+
* // $ gcloud auth application-default login
|
|
8467
|
+
* // ```
|
|
8468
|
+
* // - Install the npm module by running:
|
|
8469
|
+
* // ```sh
|
|
8470
|
+
* // $ npm install googleapis
|
|
8471
|
+
* // ```
|
|
8472
|
+
*
|
|
8473
|
+
* const {google} = require('googleapis');
|
|
8474
|
+
* const alloydb = google.alloydb('v1beta');
|
|
8475
|
+
*
|
|
8476
|
+
* async function main() {
|
|
8477
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8478
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8479
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8480
|
+
* });
|
|
8481
|
+
*
|
|
8482
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8483
|
+
* const authClient = await auth.getClient();
|
|
8484
|
+
* google.options({auth: authClient});
|
|
8485
|
+
*
|
|
8486
|
+
* // Do the magic
|
|
8487
|
+
* const res = await alloydb.projects.locations.clusters.users.patch({
|
|
8488
|
+
* // Optional. Allow missing fields in the update mask.
|
|
8489
|
+
* allowMissing: 'placeholder-value',
|
|
8490
|
+
* // Output only. Name of the resource in the form of projects/{project\}/locations/{location\}/cluster/{cluster\}/users/{user\}.
|
|
8491
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8492
|
+
* // Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
8493
|
+
* requestId: 'placeholder-value',
|
|
8494
|
+
* // Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
|
|
8495
|
+
* updateMask: 'placeholder-value',
|
|
8496
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8497
|
+
* validateOnly: 'placeholder-value',
|
|
8498
|
+
*
|
|
8499
|
+
* // Request body metadata
|
|
8500
|
+
* requestBody: {
|
|
8501
|
+
* // request body parameters
|
|
8502
|
+
* // {
|
|
8503
|
+
* // "databaseRoles": [],
|
|
8504
|
+
* // "keepExtraRoles": false,
|
|
8505
|
+
* // "name": "my_name",
|
|
8506
|
+
* // "password": "my_password",
|
|
8507
|
+
* // "userType": "my_userType"
|
|
8508
|
+
* // }
|
|
8509
|
+
* },
|
|
8510
|
+
* });
|
|
8511
|
+
* console.log(res.data);
|
|
8512
|
+
*
|
|
8513
|
+
* // Example response
|
|
8514
|
+
* // {
|
|
8515
|
+
* // "databaseRoles": [],
|
|
8516
|
+
* // "keepExtraRoles": false,
|
|
8517
|
+
* // "name": "my_name",
|
|
8518
|
+
* // "password": "my_password",
|
|
8519
|
+
* // "userType": "my_userType"
|
|
8520
|
+
* // }
|
|
8521
|
+
* }
|
|
8522
|
+
*
|
|
8523
|
+
* main().catch(e => {
|
|
8524
|
+
* console.error(e);
|
|
8525
|
+
* throw e;
|
|
8526
|
+
* });
|
|
8527
|
+
*
|
|
8528
|
+
* ```
|
|
6116
8529
|
*
|
|
6117
8530
|
* @param params - Parameters for request
|
|
6118
8531
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6306,6 +8719,50 @@ export namespace alloydb_v1beta {
|
|
|
6306
8719
|
|
|
6307
8720
|
/**
|
|
6308
8721
|
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
|
|
8722
|
+
* @example
|
|
8723
|
+
* ```js
|
|
8724
|
+
* // Before running the sample:
|
|
8725
|
+
* // - Enable the API at:
|
|
8726
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8727
|
+
* // - Login into gcloud by running:
|
|
8728
|
+
* // ```sh
|
|
8729
|
+
* // $ gcloud auth application-default login
|
|
8730
|
+
* // ```
|
|
8731
|
+
* // - Install the npm module by running:
|
|
8732
|
+
* // ```sh
|
|
8733
|
+
* // $ npm install googleapis
|
|
8734
|
+
* // ```
|
|
8735
|
+
*
|
|
8736
|
+
* const {google} = require('googleapis');
|
|
8737
|
+
* const alloydb = google.alloydb('v1beta');
|
|
8738
|
+
*
|
|
8739
|
+
* async function main() {
|
|
8740
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8741
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8742
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8743
|
+
* });
|
|
8744
|
+
*
|
|
8745
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8746
|
+
* const authClient = await auth.getClient();
|
|
8747
|
+
* google.options({auth: authClient});
|
|
8748
|
+
*
|
|
8749
|
+
* // Do the magic
|
|
8750
|
+
* const res = await alloydb.projects.locations.operations.cancel({
|
|
8751
|
+
* // The name of the operation resource to be cancelled.
|
|
8752
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8753
|
+
* });
|
|
8754
|
+
* console.log(res.data);
|
|
8755
|
+
*
|
|
8756
|
+
* // Example response
|
|
8757
|
+
* // {}
|
|
8758
|
+
* }
|
|
8759
|
+
*
|
|
8760
|
+
* main().catch(e => {
|
|
8761
|
+
* console.error(e);
|
|
8762
|
+
* throw e;
|
|
8763
|
+
* });
|
|
8764
|
+
*
|
|
8765
|
+
* ```
|
|
6309
8766
|
*
|
|
6310
8767
|
* @param params - Parameters for request
|
|
6311
8768
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6397,6 +8854,50 @@ export namespace alloydb_v1beta {
|
|
|
6397
8854
|
|
|
6398
8855
|
/**
|
|
6399
8856
|
* Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
8857
|
+
* @example
|
|
8858
|
+
* ```js
|
|
8859
|
+
* // Before running the sample:
|
|
8860
|
+
* // - Enable the API at:
|
|
8861
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8862
|
+
* // - Login into gcloud by running:
|
|
8863
|
+
* // ```sh
|
|
8864
|
+
* // $ gcloud auth application-default login
|
|
8865
|
+
* // ```
|
|
8866
|
+
* // - Install the npm module by running:
|
|
8867
|
+
* // ```sh
|
|
8868
|
+
* // $ npm install googleapis
|
|
8869
|
+
* // ```
|
|
8870
|
+
*
|
|
8871
|
+
* const {google} = require('googleapis');
|
|
8872
|
+
* const alloydb = google.alloydb('v1beta');
|
|
8873
|
+
*
|
|
8874
|
+
* async function main() {
|
|
8875
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8876
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8877
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8878
|
+
* });
|
|
8879
|
+
*
|
|
8880
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8881
|
+
* const authClient = await auth.getClient();
|
|
8882
|
+
* google.options({auth: authClient});
|
|
8883
|
+
*
|
|
8884
|
+
* // Do the magic
|
|
8885
|
+
* const res = await alloydb.projects.locations.operations.delete({
|
|
8886
|
+
* // The name of the operation resource to be deleted.
|
|
8887
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8888
|
+
* });
|
|
8889
|
+
* console.log(res.data);
|
|
8890
|
+
*
|
|
8891
|
+
* // Example response
|
|
8892
|
+
* // {}
|
|
8893
|
+
* }
|
|
8894
|
+
*
|
|
8895
|
+
* main().catch(e => {
|
|
8896
|
+
* console.error(e);
|
|
8897
|
+
* throw e;
|
|
8898
|
+
* });
|
|
8899
|
+
*
|
|
8900
|
+
* ```
|
|
6400
8901
|
*
|
|
6401
8902
|
* @param params - Parameters for request
|
|
6402
8903
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6485,6 +8986,56 @@ export namespace alloydb_v1beta {
|
|
|
6485
8986
|
|
|
6486
8987
|
/**
|
|
6487
8988
|
* Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
|
|
8989
|
+
* @example
|
|
8990
|
+
* ```js
|
|
8991
|
+
* // Before running the sample:
|
|
8992
|
+
* // - Enable the API at:
|
|
8993
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8994
|
+
* // - Login into gcloud by running:
|
|
8995
|
+
* // ```sh
|
|
8996
|
+
* // $ gcloud auth application-default login
|
|
8997
|
+
* // ```
|
|
8998
|
+
* // - Install the npm module by running:
|
|
8999
|
+
* // ```sh
|
|
9000
|
+
* // $ npm install googleapis
|
|
9001
|
+
* // ```
|
|
9002
|
+
*
|
|
9003
|
+
* const {google} = require('googleapis');
|
|
9004
|
+
* const alloydb = google.alloydb('v1beta');
|
|
9005
|
+
*
|
|
9006
|
+
* async function main() {
|
|
9007
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9008
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9009
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9010
|
+
* });
|
|
9011
|
+
*
|
|
9012
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9013
|
+
* const authClient = await auth.getClient();
|
|
9014
|
+
* google.options({auth: authClient});
|
|
9015
|
+
*
|
|
9016
|
+
* // Do the magic
|
|
9017
|
+
* const res = await alloydb.projects.locations.operations.get({
|
|
9018
|
+
* // The name of the operation resource.
|
|
9019
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
9020
|
+
* });
|
|
9021
|
+
* console.log(res.data);
|
|
9022
|
+
*
|
|
9023
|
+
* // Example response
|
|
9024
|
+
* // {
|
|
9025
|
+
* // "done": false,
|
|
9026
|
+
* // "error": {},
|
|
9027
|
+
* // "metadata": {},
|
|
9028
|
+
* // "name": "my_name",
|
|
9029
|
+
* // "response": {}
|
|
9030
|
+
* // }
|
|
9031
|
+
* }
|
|
9032
|
+
*
|
|
9033
|
+
* main().catch(e => {
|
|
9034
|
+
* console.error(e);
|
|
9035
|
+
* throw e;
|
|
9036
|
+
* });
|
|
9037
|
+
*
|
|
9038
|
+
* ```
|
|
6488
9039
|
*
|
|
6489
9040
|
* @param params - Parameters for request
|
|
6490
9041
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6573,6 +9124,59 @@ export namespace alloydb_v1beta {
|
|
|
6573
9124
|
|
|
6574
9125
|
/**
|
|
6575
9126
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
9127
|
+
* @example
|
|
9128
|
+
* ```js
|
|
9129
|
+
* // Before running the sample:
|
|
9130
|
+
* // - Enable the API at:
|
|
9131
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9132
|
+
* // - Login into gcloud by running:
|
|
9133
|
+
* // ```sh
|
|
9134
|
+
* // $ gcloud auth application-default login
|
|
9135
|
+
* // ```
|
|
9136
|
+
* // - Install the npm module by running:
|
|
9137
|
+
* // ```sh
|
|
9138
|
+
* // $ npm install googleapis
|
|
9139
|
+
* // ```
|
|
9140
|
+
*
|
|
9141
|
+
* const {google} = require('googleapis');
|
|
9142
|
+
* const alloydb = google.alloydb('v1beta');
|
|
9143
|
+
*
|
|
9144
|
+
* async function main() {
|
|
9145
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9146
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9147
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9148
|
+
* });
|
|
9149
|
+
*
|
|
9150
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9151
|
+
* const authClient = await auth.getClient();
|
|
9152
|
+
* google.options({auth: authClient});
|
|
9153
|
+
*
|
|
9154
|
+
* // Do the magic
|
|
9155
|
+
* const res = await alloydb.projects.locations.operations.list({
|
|
9156
|
+
* // The standard list filter.
|
|
9157
|
+
* filter: 'placeholder-value',
|
|
9158
|
+
* // The name of the operation's parent resource.
|
|
9159
|
+
* name: 'projects/my-project/locations/my-location',
|
|
9160
|
+
* // The standard list page size.
|
|
9161
|
+
* pageSize: 'placeholder-value',
|
|
9162
|
+
* // The standard list page token.
|
|
9163
|
+
* pageToken: 'placeholder-value',
|
|
9164
|
+
* });
|
|
9165
|
+
* console.log(res.data);
|
|
9166
|
+
*
|
|
9167
|
+
* // Example response
|
|
9168
|
+
* // {
|
|
9169
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9170
|
+
* // "operations": []
|
|
9171
|
+
* // }
|
|
9172
|
+
* }
|
|
9173
|
+
*
|
|
9174
|
+
* main().catch(e => {
|
|
9175
|
+
* console.error(e);
|
|
9176
|
+
* throw e;
|
|
9177
|
+
* });
|
|
9178
|
+
*
|
|
9179
|
+
* ```
|
|
6576
9180
|
*
|
|
6577
9181
|
* @param params - Parameters for request
|
|
6578
9182
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6714,6 +9318,59 @@ export namespace alloydb_v1beta {
|
|
|
6714
9318
|
|
|
6715
9319
|
/**
|
|
6716
9320
|
* Lists SupportedDatabaseFlags for a given project and location.
|
|
9321
|
+
* @example
|
|
9322
|
+
* ```js
|
|
9323
|
+
* // Before running the sample:
|
|
9324
|
+
* // - Enable the API at:
|
|
9325
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9326
|
+
* // - Login into gcloud by running:
|
|
9327
|
+
* // ```sh
|
|
9328
|
+
* // $ gcloud auth application-default login
|
|
9329
|
+
* // ```
|
|
9330
|
+
* // - Install the npm module by running:
|
|
9331
|
+
* // ```sh
|
|
9332
|
+
* // $ npm install googleapis
|
|
9333
|
+
* // ```
|
|
9334
|
+
*
|
|
9335
|
+
* const {google} = require('googleapis');
|
|
9336
|
+
* const alloydb = google.alloydb('v1beta');
|
|
9337
|
+
*
|
|
9338
|
+
* async function main() {
|
|
9339
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9340
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9341
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9342
|
+
* });
|
|
9343
|
+
*
|
|
9344
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9345
|
+
* const authClient = await auth.getClient();
|
|
9346
|
+
* google.options({auth: authClient});
|
|
9347
|
+
*
|
|
9348
|
+
* // Do the magic
|
|
9349
|
+
* const res = await alloydb.projects.locations.supportedDatabaseFlags.list({
|
|
9350
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
9351
|
+
* pageSize: 'placeholder-value',
|
|
9352
|
+
* // A token identifying a page of results the server should return.
|
|
9353
|
+
* pageToken: 'placeholder-value',
|
|
9354
|
+
* // Required. The name of the parent resource. The required format is: * projects/{project\}/locations/{location\} Regardless of the parent specified here, as long it is contains a valid project and location, the service will return a static list of supported flags resources. Note that we do not yet support region-specific flags.
|
|
9355
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
9356
|
+
* // Optional. The scope for which supported flags are requested. If not specified, default is DATABASE.
|
|
9357
|
+
* scope: 'placeholder-value',
|
|
9358
|
+
* });
|
|
9359
|
+
* console.log(res.data);
|
|
9360
|
+
*
|
|
9361
|
+
* // Example response
|
|
9362
|
+
* // {
|
|
9363
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9364
|
+
* // "supportedDatabaseFlags": []
|
|
9365
|
+
* // }
|
|
9366
|
+
* }
|
|
9367
|
+
*
|
|
9368
|
+
* main().catch(e => {
|
|
9369
|
+
* console.error(e);
|
|
9370
|
+
* throw e;
|
|
9371
|
+
* });
|
|
9372
|
+
*
|
|
9373
|
+
* ```
|
|
6717
9374
|
*
|
|
6718
9375
|
* @param params - Parameters for request
|
|
6719
9376
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|