@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/v1alpha.ts
CHANGED
|
@@ -452,6 +452,10 @@ export namespace alloydb_v1alpha {
|
|
|
452
452
|
* Cross Region replication config specific to SECONDARY cluster.
|
|
453
453
|
*/
|
|
454
454
|
secondaryConfig?: Schema$SecondaryConfig;
|
|
455
|
+
/**
|
|
456
|
+
* 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.
|
|
457
|
+
*/
|
|
458
|
+
serviceAccountEmail?: string | null;
|
|
455
459
|
/**
|
|
456
460
|
* SSL configuration for this AlloyDB cluster.
|
|
457
461
|
*/
|
|
@@ -544,7 +548,7 @@ export namespace alloydb_v1alpha {
|
|
|
544
548
|
*/
|
|
545
549
|
export interface Schema$ConnectionPoolConfig {
|
|
546
550
|
/**
|
|
547
|
-
* Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to 20.
|
|
551
|
+
* 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.
|
|
548
552
|
*/
|
|
549
553
|
defaultPoolSize?: string | null;
|
|
550
554
|
/**
|
|
@@ -560,35 +564,39 @@ export namespace alloydb_v1alpha {
|
|
|
560
564
|
*/
|
|
561
565
|
flags?: {[key: string]: string} | null;
|
|
562
566
|
/**
|
|
563
|
-
* Optional. Deprecated. Use 'flags' instead. The list of startup parameters to ignore. Defaults to ["extra_float_digits"]
|
|
567
|
+
* 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.
|
|
564
568
|
*/
|
|
565
569
|
ignoreStartupParameters?: string[] | null;
|
|
566
570
|
/**
|
|
567
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of client connections allowed.
|
|
571
|
+
* 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.
|
|
568
572
|
*/
|
|
569
573
|
maxClientConn?: string | null;
|
|
570
574
|
/**
|
|
571
|
-
* 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.
|
|
575
|
+
* 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.
|
|
572
576
|
*/
|
|
573
577
|
maxPreparedStatements?: string | null;
|
|
574
578
|
/**
|
|
575
|
-
* Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to 0.
|
|
579
|
+
* 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.
|
|
576
580
|
*/
|
|
577
581
|
minPoolSize?: string | null;
|
|
578
582
|
/**
|
|
579
|
-
*
|
|
583
|
+
* Output only. The number of running poolers per instance.
|
|
584
|
+
*/
|
|
585
|
+
poolerCount?: number | null;
|
|
586
|
+
/**
|
|
587
|
+
* 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.
|
|
580
588
|
*/
|
|
581
589
|
poolMode?: string | null;
|
|
582
590
|
/**
|
|
583
|
-
* 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.
|
|
591
|
+
* 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.
|
|
584
592
|
*/
|
|
585
593
|
queryWaitTimeout?: string | null;
|
|
586
594
|
/**
|
|
587
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a server is allowed to be idle before it is disconnected. 0 disables.
|
|
595
|
+
* 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.
|
|
588
596
|
*/
|
|
589
597
|
serverIdleTimeout?: string | null;
|
|
590
598
|
/**
|
|
591
|
-
* 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.
|
|
599
|
+
* 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.
|
|
592
600
|
*/
|
|
593
601
|
statsUsers?: string[] | null;
|
|
594
602
|
}
|
|
@@ -785,7 +793,7 @@ export namespace alloydb_v1alpha {
|
|
|
785
793
|
uri?: string | null;
|
|
786
794
|
}
|
|
787
795
|
/**
|
|
788
|
-
* Deprecated and unused. This
|
|
796
|
+
* Deprecated and unused. This message will be removed in the near future.
|
|
789
797
|
*/
|
|
790
798
|
export interface Schema$GeminiClusterConfig {
|
|
791
799
|
/**
|
|
@@ -794,7 +802,7 @@ export namespace alloydb_v1alpha {
|
|
|
794
802
|
entitled?: boolean | null;
|
|
795
803
|
}
|
|
796
804
|
/**
|
|
797
|
-
* Deprecated and unused. This
|
|
805
|
+
* Deprecated and unused. This message will be removed in the near future.
|
|
798
806
|
*/
|
|
799
807
|
export interface Schema$GeminiInstanceConfig {
|
|
800
808
|
/**
|
|
@@ -1066,7 +1074,7 @@ export namespace alloydb_v1alpha {
|
|
|
1066
1074
|
*/
|
|
1067
1075
|
export interface Schema$InstanceNetworkConfig {
|
|
1068
1076
|
/**
|
|
1069
|
-
* 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://
|
|
1077
|
+
* 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])?.
|
|
1070
1078
|
*/
|
|
1071
1079
|
allocatedIpRangeOverride?: string | null;
|
|
1072
1080
|
/**
|
|
@@ -1087,7 +1095,7 @@ export namespace alloydb_v1alpha {
|
|
|
1087
1095
|
network?: string | null;
|
|
1088
1096
|
}
|
|
1089
1097
|
/**
|
|
1090
|
-
* Details regarding the upgrade of
|
|
1098
|
+
* Details regarding the upgrade of instances associated with a cluster.
|
|
1091
1099
|
*/
|
|
1092
1100
|
export interface Schema$InstanceUpgradeDetails {
|
|
1093
1101
|
/**
|
|
@@ -1341,6 +1349,10 @@ export namespace alloydb_v1alpha {
|
|
|
1341
1349
|
* Track actively running queries on the instance. If not set, this flag is "off" by default.
|
|
1342
1350
|
*/
|
|
1343
1351
|
trackActiveQueries?: boolean | null;
|
|
1352
|
+
/**
|
|
1353
|
+
* Track client address for an instance. If not set, default value is "off".
|
|
1354
|
+
*/
|
|
1355
|
+
trackClientAddress?: boolean | null;
|
|
1344
1356
|
/**
|
|
1345
1357
|
* 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.
|
|
1346
1358
|
*/
|
|
@@ -1830,7 +1842,7 @@ export namespace alloydb_v1alpha {
|
|
|
1830
1842
|
internalResourceMetadata?: Schema$StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata[];
|
|
1831
1843
|
}
|
|
1832
1844
|
/**
|
|
1833
|
-
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.
|
|
1845
|
+
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 8
|
|
1834
1846
|
*/
|
|
1835
1847
|
export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed {
|
|
1836
1848
|
/**
|
|
@@ -1874,6 +1886,10 @@ export namespace alloydb_v1alpha {
|
|
|
1874
1886
|
* 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.
|
|
1875
1887
|
*/
|
|
1876
1888
|
externalUri?: string | null;
|
|
1889
|
+
/**
|
|
1890
|
+
* This is used to identify the location of the resource. Example: "us-central1"
|
|
1891
|
+
*/
|
|
1892
|
+
location?: string | null;
|
|
1877
1893
|
/**
|
|
1878
1894
|
* Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.
|
|
1879
1895
|
*/
|
|
@@ -1921,7 +1937,7 @@ export namespace alloydb_v1alpha {
|
|
|
1921
1937
|
*/
|
|
1922
1938
|
providerDescription?: string | null;
|
|
1923
1939
|
/**
|
|
1924
|
-
* Required. The type of resource this ID is identifying. Ex
|
|
1940
|
+
* 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
|
|
1925
1941
|
*/
|
|
1926
1942
|
resourceType?: string | null;
|
|
1927
1943
|
/**
|
|
@@ -2484,6 +2500,56 @@ export namespace alloydb_v1alpha {
|
|
|
2484
2500
|
|
|
2485
2501
|
/**
|
|
2486
2502
|
* Gets information about a location.
|
|
2503
|
+
* @example
|
|
2504
|
+
* ```js
|
|
2505
|
+
* // Before running the sample:
|
|
2506
|
+
* // - Enable the API at:
|
|
2507
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2508
|
+
* // - Login into gcloud by running:
|
|
2509
|
+
* // ```sh
|
|
2510
|
+
* // $ gcloud auth application-default login
|
|
2511
|
+
* // ```
|
|
2512
|
+
* // - Install the npm module by running:
|
|
2513
|
+
* // ```sh
|
|
2514
|
+
* // $ npm install googleapis
|
|
2515
|
+
* // ```
|
|
2516
|
+
*
|
|
2517
|
+
* const {google} = require('googleapis');
|
|
2518
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
2519
|
+
*
|
|
2520
|
+
* async function main() {
|
|
2521
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2522
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2523
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2524
|
+
* });
|
|
2525
|
+
*
|
|
2526
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2527
|
+
* const authClient = await auth.getClient();
|
|
2528
|
+
* google.options({auth: authClient});
|
|
2529
|
+
*
|
|
2530
|
+
* // Do the magic
|
|
2531
|
+
* const res = await alloydb.projects.locations.get({
|
|
2532
|
+
* // Resource name for the location.
|
|
2533
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2534
|
+
* });
|
|
2535
|
+
* console.log(res.data);
|
|
2536
|
+
*
|
|
2537
|
+
* // Example response
|
|
2538
|
+
* // {
|
|
2539
|
+
* // "displayName": "my_displayName",
|
|
2540
|
+
* // "labels": {},
|
|
2541
|
+
* // "locationId": "my_locationId",
|
|
2542
|
+
* // "metadata": {},
|
|
2543
|
+
* // "name": "my_name"
|
|
2544
|
+
* // }
|
|
2545
|
+
* }
|
|
2546
|
+
*
|
|
2547
|
+
* main().catch(e => {
|
|
2548
|
+
* console.error(e);
|
|
2549
|
+
* throw e;
|
|
2550
|
+
* });
|
|
2551
|
+
*
|
|
2552
|
+
* ```
|
|
2487
2553
|
*
|
|
2488
2554
|
* @param params - Parameters for request
|
|
2489
2555
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2576,6 +2642,61 @@ export namespace alloydb_v1alpha {
|
|
|
2576
2642
|
|
|
2577
2643
|
/**
|
|
2578
2644
|
* Lists information about the supported locations for this service.
|
|
2645
|
+
* @example
|
|
2646
|
+
* ```js
|
|
2647
|
+
* // Before running the sample:
|
|
2648
|
+
* // - Enable the API at:
|
|
2649
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2650
|
+
* // - Login into gcloud by running:
|
|
2651
|
+
* // ```sh
|
|
2652
|
+
* // $ gcloud auth application-default login
|
|
2653
|
+
* // ```
|
|
2654
|
+
* // - Install the npm module by running:
|
|
2655
|
+
* // ```sh
|
|
2656
|
+
* // $ npm install googleapis
|
|
2657
|
+
* // ```
|
|
2658
|
+
*
|
|
2659
|
+
* const {google} = require('googleapis');
|
|
2660
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
2661
|
+
*
|
|
2662
|
+
* async function main() {
|
|
2663
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2664
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2665
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2666
|
+
* });
|
|
2667
|
+
*
|
|
2668
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2669
|
+
* const authClient = await auth.getClient();
|
|
2670
|
+
* google.options({auth: authClient});
|
|
2671
|
+
*
|
|
2672
|
+
* // Do the magic
|
|
2673
|
+
* const res = await alloydb.projects.locations.list({
|
|
2674
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
2675
|
+
* extraLocationTypes: 'placeholder-value',
|
|
2676
|
+
* // 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).
|
|
2677
|
+
* filter: 'placeholder-value',
|
|
2678
|
+
* // The resource that owns the locations collection, if applicable.
|
|
2679
|
+
* name: 'projects/my-project',
|
|
2680
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
2681
|
+
* pageSize: 'placeholder-value',
|
|
2682
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
2683
|
+
* pageToken: 'placeholder-value',
|
|
2684
|
+
* });
|
|
2685
|
+
* console.log(res.data);
|
|
2686
|
+
*
|
|
2687
|
+
* // Example response
|
|
2688
|
+
* // {
|
|
2689
|
+
* // "locations": [],
|
|
2690
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
2691
|
+
* // }
|
|
2692
|
+
* }
|
|
2693
|
+
*
|
|
2694
|
+
* main().catch(e => {
|
|
2695
|
+
* console.error(e);
|
|
2696
|
+
* throw e;
|
|
2697
|
+
* });
|
|
2698
|
+
*
|
|
2699
|
+
* ```
|
|
2579
2700
|
*
|
|
2580
2701
|
* @param params - Parameters for request
|
|
2581
2702
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2715,6 +2836,94 @@ export namespace alloydb_v1alpha {
|
|
|
2715
2836
|
|
|
2716
2837
|
/**
|
|
2717
2838
|
* Creates a new Backup in a given project and location.
|
|
2839
|
+
* @example
|
|
2840
|
+
* ```js
|
|
2841
|
+
* // Before running the sample:
|
|
2842
|
+
* // - Enable the API at:
|
|
2843
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2844
|
+
* // - Login into gcloud by running:
|
|
2845
|
+
* // ```sh
|
|
2846
|
+
* // $ gcloud auth application-default login
|
|
2847
|
+
* // ```
|
|
2848
|
+
* // - Install the npm module by running:
|
|
2849
|
+
* // ```sh
|
|
2850
|
+
* // $ npm install googleapis
|
|
2851
|
+
* // ```
|
|
2852
|
+
*
|
|
2853
|
+
* const {google} = require('googleapis');
|
|
2854
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
2855
|
+
*
|
|
2856
|
+
* async function main() {
|
|
2857
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2858
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2859
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2860
|
+
* });
|
|
2861
|
+
*
|
|
2862
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2863
|
+
* const authClient = await auth.getClient();
|
|
2864
|
+
* google.options({auth: authClient});
|
|
2865
|
+
*
|
|
2866
|
+
* // Do the magic
|
|
2867
|
+
* const res = await alloydb.projects.locations.backups.create({
|
|
2868
|
+
* // Required. ID of the requesting object.
|
|
2869
|
+
* backupId: 'placeholder-value',
|
|
2870
|
+
* // Required. Value for parent.
|
|
2871
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2872
|
+
* // 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).
|
|
2873
|
+
* requestId: 'placeholder-value',
|
|
2874
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2875
|
+
* validateOnly: 'placeholder-value',
|
|
2876
|
+
*
|
|
2877
|
+
* // Request body metadata
|
|
2878
|
+
* requestBody: {
|
|
2879
|
+
* // request body parameters
|
|
2880
|
+
* // {
|
|
2881
|
+
* // "annotations": {},
|
|
2882
|
+
* // "clusterName": "my_clusterName",
|
|
2883
|
+
* // "clusterUid": "my_clusterUid",
|
|
2884
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
2885
|
+
* // "createTime": "my_createTime",
|
|
2886
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
2887
|
+
* // "deleteTime": "my_deleteTime",
|
|
2888
|
+
* // "description": "my_description",
|
|
2889
|
+
* // "displayName": "my_displayName",
|
|
2890
|
+
* // "encryptionConfig": {},
|
|
2891
|
+
* // "encryptionInfo": {},
|
|
2892
|
+
* // "etag": "my_etag",
|
|
2893
|
+
* // "expiryQuantity": {},
|
|
2894
|
+
* // "expiryTime": "my_expiryTime",
|
|
2895
|
+
* // "labels": {},
|
|
2896
|
+
* // "name": "my_name",
|
|
2897
|
+
* // "reconciling": false,
|
|
2898
|
+
* // "satisfiesPzi": false,
|
|
2899
|
+
* // "satisfiesPzs": false,
|
|
2900
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
2901
|
+
* // "state": "my_state",
|
|
2902
|
+
* // "tags": {},
|
|
2903
|
+
* // "type": "my_type",
|
|
2904
|
+
* // "uid": "my_uid",
|
|
2905
|
+
* // "updateTime": "my_updateTime"
|
|
2906
|
+
* // }
|
|
2907
|
+
* },
|
|
2908
|
+
* });
|
|
2909
|
+
* console.log(res.data);
|
|
2910
|
+
*
|
|
2911
|
+
* // Example response
|
|
2912
|
+
* // {
|
|
2913
|
+
* // "done": false,
|
|
2914
|
+
* // "error": {},
|
|
2915
|
+
* // "metadata": {},
|
|
2916
|
+
* // "name": "my_name",
|
|
2917
|
+
* // "response": {}
|
|
2918
|
+
* // }
|
|
2919
|
+
* }
|
|
2920
|
+
*
|
|
2921
|
+
* main().catch(e => {
|
|
2922
|
+
* console.error(e);
|
|
2923
|
+
* throw e;
|
|
2924
|
+
* });
|
|
2925
|
+
*
|
|
2926
|
+
* ```
|
|
2718
2927
|
*
|
|
2719
2928
|
* @param params - Parameters for request
|
|
2720
2929
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2806,6 +3015,62 @@ export namespace alloydb_v1alpha {
|
|
|
2806
3015
|
|
|
2807
3016
|
/**
|
|
2808
3017
|
* Deletes a single Backup.
|
|
3018
|
+
* @example
|
|
3019
|
+
* ```js
|
|
3020
|
+
* // Before running the sample:
|
|
3021
|
+
* // - Enable the API at:
|
|
3022
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3023
|
+
* // - Login into gcloud by running:
|
|
3024
|
+
* // ```sh
|
|
3025
|
+
* // $ gcloud auth application-default login
|
|
3026
|
+
* // ```
|
|
3027
|
+
* // - Install the npm module by running:
|
|
3028
|
+
* // ```sh
|
|
3029
|
+
* // $ npm install googleapis
|
|
3030
|
+
* // ```
|
|
3031
|
+
*
|
|
3032
|
+
* const {google} = require('googleapis');
|
|
3033
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3034
|
+
*
|
|
3035
|
+
* async function main() {
|
|
3036
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3037
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3038
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3039
|
+
* });
|
|
3040
|
+
*
|
|
3041
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3042
|
+
* const authClient = await auth.getClient();
|
|
3043
|
+
* google.options({auth: authClient});
|
|
3044
|
+
*
|
|
3045
|
+
* // Do the magic
|
|
3046
|
+
* const res = await alloydb.projects.locations.backups.delete({
|
|
3047
|
+
* // 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.
|
|
3048
|
+
* etag: 'placeholder-value',
|
|
3049
|
+
* // Required. Name of the resource. For the required format, see the comment on the Backup.name field.
|
|
3050
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3051
|
+
* // 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).
|
|
3052
|
+
* requestId: 'placeholder-value',
|
|
3053
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
3054
|
+
* validateOnly: 'placeholder-value',
|
|
3055
|
+
* });
|
|
3056
|
+
* console.log(res.data);
|
|
3057
|
+
*
|
|
3058
|
+
* // Example response
|
|
3059
|
+
* // {
|
|
3060
|
+
* // "done": false,
|
|
3061
|
+
* // "error": {},
|
|
3062
|
+
* // "metadata": {},
|
|
3063
|
+
* // "name": "my_name",
|
|
3064
|
+
* // "response": {}
|
|
3065
|
+
* // }
|
|
3066
|
+
* }
|
|
3067
|
+
*
|
|
3068
|
+
* main().catch(e => {
|
|
3069
|
+
* console.error(e);
|
|
3070
|
+
* throw e;
|
|
3071
|
+
* });
|
|
3072
|
+
*
|
|
3073
|
+
* ```
|
|
2809
3074
|
*
|
|
2810
3075
|
* @param params - Parameters for request
|
|
2811
3076
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2894,6 +3159,76 @@ export namespace alloydb_v1alpha {
|
|
|
2894
3159
|
|
|
2895
3160
|
/**
|
|
2896
3161
|
* Gets details of a single Backup.
|
|
3162
|
+
* @example
|
|
3163
|
+
* ```js
|
|
3164
|
+
* // Before running the sample:
|
|
3165
|
+
* // - Enable the API at:
|
|
3166
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3167
|
+
* // - Login into gcloud by running:
|
|
3168
|
+
* // ```sh
|
|
3169
|
+
* // $ gcloud auth application-default login
|
|
3170
|
+
* // ```
|
|
3171
|
+
* // - Install the npm module by running:
|
|
3172
|
+
* // ```sh
|
|
3173
|
+
* // $ npm install googleapis
|
|
3174
|
+
* // ```
|
|
3175
|
+
*
|
|
3176
|
+
* const {google} = require('googleapis');
|
|
3177
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3178
|
+
*
|
|
3179
|
+
* async function main() {
|
|
3180
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3181
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3182
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3183
|
+
* });
|
|
3184
|
+
*
|
|
3185
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3186
|
+
* const authClient = await auth.getClient();
|
|
3187
|
+
* google.options({auth: authClient});
|
|
3188
|
+
*
|
|
3189
|
+
* // Do the magic
|
|
3190
|
+
* const res = await alloydb.projects.locations.backups.get({
|
|
3191
|
+
* // Required. Name of the resource
|
|
3192
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3193
|
+
* });
|
|
3194
|
+
* console.log(res.data);
|
|
3195
|
+
*
|
|
3196
|
+
* // Example response
|
|
3197
|
+
* // {
|
|
3198
|
+
* // "annotations": {},
|
|
3199
|
+
* // "clusterName": "my_clusterName",
|
|
3200
|
+
* // "clusterUid": "my_clusterUid",
|
|
3201
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3202
|
+
* // "createTime": "my_createTime",
|
|
3203
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3204
|
+
* // "deleteTime": "my_deleteTime",
|
|
3205
|
+
* // "description": "my_description",
|
|
3206
|
+
* // "displayName": "my_displayName",
|
|
3207
|
+
* // "encryptionConfig": {},
|
|
3208
|
+
* // "encryptionInfo": {},
|
|
3209
|
+
* // "etag": "my_etag",
|
|
3210
|
+
* // "expiryQuantity": {},
|
|
3211
|
+
* // "expiryTime": "my_expiryTime",
|
|
3212
|
+
* // "labels": {},
|
|
3213
|
+
* // "name": "my_name",
|
|
3214
|
+
* // "reconciling": false,
|
|
3215
|
+
* // "satisfiesPzi": false,
|
|
3216
|
+
* // "satisfiesPzs": false,
|
|
3217
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3218
|
+
* // "state": "my_state",
|
|
3219
|
+
* // "tags": {},
|
|
3220
|
+
* // "type": "my_type",
|
|
3221
|
+
* // "uid": "my_uid",
|
|
3222
|
+
* // "updateTime": "my_updateTime"
|
|
3223
|
+
* // }
|
|
3224
|
+
* }
|
|
3225
|
+
*
|
|
3226
|
+
* main().catch(e => {
|
|
3227
|
+
* console.error(e);
|
|
3228
|
+
* throw e;
|
|
3229
|
+
* });
|
|
3230
|
+
*
|
|
3231
|
+
* ```
|
|
2897
3232
|
*
|
|
2898
3233
|
* @param params - Parameters for request
|
|
2899
3234
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2982,6 +3317,62 @@ export namespace alloydb_v1alpha {
|
|
|
2982
3317
|
|
|
2983
3318
|
/**
|
|
2984
3319
|
* Lists Backups in a given project and location.
|
|
3320
|
+
* @example
|
|
3321
|
+
* ```js
|
|
3322
|
+
* // Before running the sample:
|
|
3323
|
+
* // - Enable the API at:
|
|
3324
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3325
|
+
* // - Login into gcloud by running:
|
|
3326
|
+
* // ```sh
|
|
3327
|
+
* // $ gcloud auth application-default login
|
|
3328
|
+
* // ```
|
|
3329
|
+
* // - Install the npm module by running:
|
|
3330
|
+
* // ```sh
|
|
3331
|
+
* // $ npm install googleapis
|
|
3332
|
+
* // ```
|
|
3333
|
+
*
|
|
3334
|
+
* const {google} = require('googleapis');
|
|
3335
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3336
|
+
*
|
|
3337
|
+
* async function main() {
|
|
3338
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3339
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3340
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3341
|
+
* });
|
|
3342
|
+
*
|
|
3343
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3344
|
+
* const authClient = await auth.getClient();
|
|
3345
|
+
* google.options({auth: authClient});
|
|
3346
|
+
*
|
|
3347
|
+
* // Do the magic
|
|
3348
|
+
* const res = await alloydb.projects.locations.backups.list({
|
|
3349
|
+
* // Filtering results
|
|
3350
|
+
* filter: 'placeholder-value',
|
|
3351
|
+
* // Hint for how to order the results
|
|
3352
|
+
* orderBy: 'placeholder-value',
|
|
3353
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
3354
|
+
* pageSize: 'placeholder-value',
|
|
3355
|
+
* // A token identifying a page of results the server should return.
|
|
3356
|
+
* pageToken: 'placeholder-value',
|
|
3357
|
+
* // Required. Parent value for ListBackupsRequest
|
|
3358
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3359
|
+
* });
|
|
3360
|
+
* console.log(res.data);
|
|
3361
|
+
*
|
|
3362
|
+
* // Example response
|
|
3363
|
+
* // {
|
|
3364
|
+
* // "backups": [],
|
|
3365
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3366
|
+
* // "unreachable": []
|
|
3367
|
+
* // }
|
|
3368
|
+
* }
|
|
3369
|
+
*
|
|
3370
|
+
* main().catch(e => {
|
|
3371
|
+
* console.error(e);
|
|
3372
|
+
* throw e;
|
|
3373
|
+
* });
|
|
3374
|
+
*
|
|
3375
|
+
* ```
|
|
2985
3376
|
*
|
|
2986
3377
|
* @param params - Parameters for request
|
|
2987
3378
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3073,6 +3464,96 @@ export namespace alloydb_v1alpha {
|
|
|
3073
3464
|
|
|
3074
3465
|
/**
|
|
3075
3466
|
* Updates the parameters of a single Backup.
|
|
3467
|
+
* @example
|
|
3468
|
+
* ```js
|
|
3469
|
+
* // Before running the sample:
|
|
3470
|
+
* // - Enable the API at:
|
|
3471
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3472
|
+
* // - Login into gcloud by running:
|
|
3473
|
+
* // ```sh
|
|
3474
|
+
* // $ gcloud auth application-default login
|
|
3475
|
+
* // ```
|
|
3476
|
+
* // - Install the npm module by running:
|
|
3477
|
+
* // ```sh
|
|
3478
|
+
* // $ npm install googleapis
|
|
3479
|
+
* // ```
|
|
3480
|
+
*
|
|
3481
|
+
* const {google} = require('googleapis');
|
|
3482
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3483
|
+
*
|
|
3484
|
+
* async function main() {
|
|
3485
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3486
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3487
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3488
|
+
* });
|
|
3489
|
+
*
|
|
3490
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3491
|
+
* const authClient = await auth.getClient();
|
|
3492
|
+
* google.options({auth: authClient});
|
|
3493
|
+
*
|
|
3494
|
+
* // Do the magic
|
|
3495
|
+
* const res = await alloydb.projects.locations.backups.patch({
|
|
3496
|
+
* // 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.
|
|
3497
|
+
* allowMissing: 'placeholder-value',
|
|
3498
|
+
* // 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\}
|
|
3499
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3500
|
+
* // 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).
|
|
3501
|
+
* requestId: 'placeholder-value',
|
|
3502
|
+
* // 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.
|
|
3503
|
+
* updateMask: 'placeholder-value',
|
|
3504
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
3505
|
+
* validateOnly: 'placeholder-value',
|
|
3506
|
+
*
|
|
3507
|
+
* // Request body metadata
|
|
3508
|
+
* requestBody: {
|
|
3509
|
+
* // request body parameters
|
|
3510
|
+
* // {
|
|
3511
|
+
* // "annotations": {},
|
|
3512
|
+
* // "clusterName": "my_clusterName",
|
|
3513
|
+
* // "clusterUid": "my_clusterUid",
|
|
3514
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3515
|
+
* // "createTime": "my_createTime",
|
|
3516
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3517
|
+
* // "deleteTime": "my_deleteTime",
|
|
3518
|
+
* // "description": "my_description",
|
|
3519
|
+
* // "displayName": "my_displayName",
|
|
3520
|
+
* // "encryptionConfig": {},
|
|
3521
|
+
* // "encryptionInfo": {},
|
|
3522
|
+
* // "etag": "my_etag",
|
|
3523
|
+
* // "expiryQuantity": {},
|
|
3524
|
+
* // "expiryTime": "my_expiryTime",
|
|
3525
|
+
* // "labels": {},
|
|
3526
|
+
* // "name": "my_name",
|
|
3527
|
+
* // "reconciling": false,
|
|
3528
|
+
* // "satisfiesPzi": false,
|
|
3529
|
+
* // "satisfiesPzs": false,
|
|
3530
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3531
|
+
* // "state": "my_state",
|
|
3532
|
+
* // "tags": {},
|
|
3533
|
+
* // "type": "my_type",
|
|
3534
|
+
* // "uid": "my_uid",
|
|
3535
|
+
* // "updateTime": "my_updateTime"
|
|
3536
|
+
* // }
|
|
3537
|
+
* },
|
|
3538
|
+
* });
|
|
3539
|
+
* console.log(res.data);
|
|
3540
|
+
*
|
|
3541
|
+
* // Example response
|
|
3542
|
+
* // {
|
|
3543
|
+
* // "done": false,
|
|
3544
|
+
* // "error": {},
|
|
3545
|
+
* // "metadata": {},
|
|
3546
|
+
* // "name": "my_name",
|
|
3547
|
+
* // "response": {}
|
|
3548
|
+
* // }
|
|
3549
|
+
* }
|
|
3550
|
+
*
|
|
3551
|
+
* main().catch(e => {
|
|
3552
|
+
* console.error(e);
|
|
3553
|
+
* throw e;
|
|
3554
|
+
* });
|
|
3555
|
+
*
|
|
3556
|
+
* ```
|
|
3076
3557
|
*
|
|
3077
3558
|
* @param params - Parameters for request
|
|
3078
3559
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3276,6 +3757,106 @@ export namespace alloydb_v1alpha {
|
|
|
3276
3757
|
|
|
3277
3758
|
/**
|
|
3278
3759
|
* Creates a new Cluster in a given project and location.
|
|
3760
|
+
* @example
|
|
3761
|
+
* ```js
|
|
3762
|
+
* // Before running the sample:
|
|
3763
|
+
* // - Enable the API at:
|
|
3764
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3765
|
+
* // - Login into gcloud by running:
|
|
3766
|
+
* // ```sh
|
|
3767
|
+
* // $ gcloud auth application-default login
|
|
3768
|
+
* // ```
|
|
3769
|
+
* // - Install the npm module by running:
|
|
3770
|
+
* // ```sh
|
|
3771
|
+
* // $ npm install googleapis
|
|
3772
|
+
* // ```
|
|
3773
|
+
*
|
|
3774
|
+
* const {google} = require('googleapis');
|
|
3775
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3776
|
+
*
|
|
3777
|
+
* async function main() {
|
|
3778
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3779
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3780
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3781
|
+
* });
|
|
3782
|
+
*
|
|
3783
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3784
|
+
* const authClient = await auth.getClient();
|
|
3785
|
+
* google.options({auth: authClient});
|
|
3786
|
+
*
|
|
3787
|
+
* // Do the magic
|
|
3788
|
+
* const res = await alloydb.projects.locations.clusters.create({
|
|
3789
|
+
* // Required. ID of the requesting object.
|
|
3790
|
+
* clusterId: 'placeholder-value',
|
|
3791
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3792
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3793
|
+
* // 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).
|
|
3794
|
+
* requestId: 'placeholder-value',
|
|
3795
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3796
|
+
* validateOnly: 'placeholder-value',
|
|
3797
|
+
*
|
|
3798
|
+
* // Request body metadata
|
|
3799
|
+
* requestBody: {
|
|
3800
|
+
* // request body parameters
|
|
3801
|
+
* // {
|
|
3802
|
+
* // "annotations": {},
|
|
3803
|
+
* // "automatedBackupPolicy": {},
|
|
3804
|
+
* // "backupSource": {},
|
|
3805
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3806
|
+
* // "clusterType": "my_clusterType",
|
|
3807
|
+
* // "continuousBackupConfig": {},
|
|
3808
|
+
* // "continuousBackupInfo": {},
|
|
3809
|
+
* // "createTime": "my_createTime",
|
|
3810
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3811
|
+
* // "deleteTime": "my_deleteTime",
|
|
3812
|
+
* // "displayName": "my_displayName",
|
|
3813
|
+
* // "encryptionConfig": {},
|
|
3814
|
+
* // "encryptionInfo": {},
|
|
3815
|
+
* // "etag": "my_etag",
|
|
3816
|
+
* // "geminiConfig": {},
|
|
3817
|
+
* // "initialUser": {},
|
|
3818
|
+
* // "labels": {},
|
|
3819
|
+
* // "maintenanceSchedule": {},
|
|
3820
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3821
|
+
* // "migrationSource": {},
|
|
3822
|
+
* // "name": "my_name",
|
|
3823
|
+
* // "network": "my_network",
|
|
3824
|
+
* // "networkConfig": {},
|
|
3825
|
+
* // "primaryConfig": {},
|
|
3826
|
+
* // "pscConfig": {},
|
|
3827
|
+
* // "reconciling": false,
|
|
3828
|
+
* // "satisfiesPzi": false,
|
|
3829
|
+
* // "satisfiesPzs": false,
|
|
3830
|
+
* // "secondaryConfig": {},
|
|
3831
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
3832
|
+
* // "sslConfig": {},
|
|
3833
|
+
* // "state": "my_state",
|
|
3834
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3835
|
+
* // "tags": {},
|
|
3836
|
+
* // "trialMetadata": {},
|
|
3837
|
+
* // "uid": "my_uid",
|
|
3838
|
+
* // "updateTime": "my_updateTime"
|
|
3839
|
+
* // }
|
|
3840
|
+
* },
|
|
3841
|
+
* });
|
|
3842
|
+
* console.log(res.data);
|
|
3843
|
+
*
|
|
3844
|
+
* // Example response
|
|
3845
|
+
* // {
|
|
3846
|
+
* // "done": false,
|
|
3847
|
+
* // "error": {},
|
|
3848
|
+
* // "metadata": {},
|
|
3849
|
+
* // "name": "my_name",
|
|
3850
|
+
* // "response": {}
|
|
3851
|
+
* // }
|
|
3852
|
+
* }
|
|
3853
|
+
*
|
|
3854
|
+
* main().catch(e => {
|
|
3855
|
+
* console.error(e);
|
|
3856
|
+
* throw e;
|
|
3857
|
+
* });
|
|
3858
|
+
*
|
|
3859
|
+
* ```
|
|
3279
3860
|
*
|
|
3280
3861
|
* @param params - Parameters for request
|
|
3281
3862
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3367,6 +3948,106 @@ export namespace alloydb_v1alpha {
|
|
|
3367
3948
|
|
|
3368
3949
|
/**
|
|
3369
3950
|
* Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
|
|
3951
|
+
* @example
|
|
3952
|
+
* ```js
|
|
3953
|
+
* // Before running the sample:
|
|
3954
|
+
* // - Enable the API at:
|
|
3955
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3956
|
+
* // - Login into gcloud by running:
|
|
3957
|
+
* // ```sh
|
|
3958
|
+
* // $ gcloud auth application-default login
|
|
3959
|
+
* // ```
|
|
3960
|
+
* // - Install the npm module by running:
|
|
3961
|
+
* // ```sh
|
|
3962
|
+
* // $ npm install googleapis
|
|
3963
|
+
* // ```
|
|
3964
|
+
*
|
|
3965
|
+
* const {google} = require('googleapis');
|
|
3966
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3967
|
+
*
|
|
3968
|
+
* async function main() {
|
|
3969
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3970
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3971
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3972
|
+
* });
|
|
3973
|
+
*
|
|
3974
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3975
|
+
* const authClient = await auth.getClient();
|
|
3976
|
+
* google.options({auth: authClient});
|
|
3977
|
+
*
|
|
3978
|
+
* // Do the magic
|
|
3979
|
+
* const res = await alloydb.projects.locations.clusters.createsecondary({
|
|
3980
|
+
* // Required. ID of the requesting object (the secondary cluster).
|
|
3981
|
+
* clusterId: 'placeholder-value',
|
|
3982
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3983
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3984
|
+
* // 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).
|
|
3985
|
+
* requestId: 'placeholder-value',
|
|
3986
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3987
|
+
* validateOnly: 'placeholder-value',
|
|
3988
|
+
*
|
|
3989
|
+
* // Request body metadata
|
|
3990
|
+
* requestBody: {
|
|
3991
|
+
* // request body parameters
|
|
3992
|
+
* // {
|
|
3993
|
+
* // "annotations": {},
|
|
3994
|
+
* // "automatedBackupPolicy": {},
|
|
3995
|
+
* // "backupSource": {},
|
|
3996
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3997
|
+
* // "clusterType": "my_clusterType",
|
|
3998
|
+
* // "continuousBackupConfig": {},
|
|
3999
|
+
* // "continuousBackupInfo": {},
|
|
4000
|
+
* // "createTime": "my_createTime",
|
|
4001
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4002
|
+
* // "deleteTime": "my_deleteTime",
|
|
4003
|
+
* // "displayName": "my_displayName",
|
|
4004
|
+
* // "encryptionConfig": {},
|
|
4005
|
+
* // "encryptionInfo": {},
|
|
4006
|
+
* // "etag": "my_etag",
|
|
4007
|
+
* // "geminiConfig": {},
|
|
4008
|
+
* // "initialUser": {},
|
|
4009
|
+
* // "labels": {},
|
|
4010
|
+
* // "maintenanceSchedule": {},
|
|
4011
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4012
|
+
* // "migrationSource": {},
|
|
4013
|
+
* // "name": "my_name",
|
|
4014
|
+
* // "network": "my_network",
|
|
4015
|
+
* // "networkConfig": {},
|
|
4016
|
+
* // "primaryConfig": {},
|
|
4017
|
+
* // "pscConfig": {},
|
|
4018
|
+
* // "reconciling": false,
|
|
4019
|
+
* // "satisfiesPzi": false,
|
|
4020
|
+
* // "satisfiesPzs": false,
|
|
4021
|
+
* // "secondaryConfig": {},
|
|
4022
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4023
|
+
* // "sslConfig": {},
|
|
4024
|
+
* // "state": "my_state",
|
|
4025
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4026
|
+
* // "tags": {},
|
|
4027
|
+
* // "trialMetadata": {},
|
|
4028
|
+
* // "uid": "my_uid",
|
|
4029
|
+
* // "updateTime": "my_updateTime"
|
|
4030
|
+
* // }
|
|
4031
|
+
* },
|
|
4032
|
+
* });
|
|
4033
|
+
* console.log(res.data);
|
|
4034
|
+
*
|
|
4035
|
+
* // Example response
|
|
4036
|
+
* // {
|
|
4037
|
+
* // "done": false,
|
|
4038
|
+
* // "error": {},
|
|
4039
|
+
* // "metadata": {},
|
|
4040
|
+
* // "name": "my_name",
|
|
4041
|
+
* // "response": {}
|
|
4042
|
+
* // }
|
|
4043
|
+
* }
|
|
4044
|
+
*
|
|
4045
|
+
* main().catch(e => {
|
|
4046
|
+
* console.error(e);
|
|
4047
|
+
* throw e;
|
|
4048
|
+
* });
|
|
4049
|
+
*
|
|
4050
|
+
* ```
|
|
3370
4051
|
*
|
|
3371
4052
|
* @param params - Parameters for request
|
|
3372
4053
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3458,6 +4139,64 @@ export namespace alloydb_v1alpha {
|
|
|
3458
4139
|
|
|
3459
4140
|
/**
|
|
3460
4141
|
* Deletes a single Cluster.
|
|
4142
|
+
* @example
|
|
4143
|
+
* ```js
|
|
4144
|
+
* // Before running the sample:
|
|
4145
|
+
* // - Enable the API at:
|
|
4146
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4147
|
+
* // - Login into gcloud by running:
|
|
4148
|
+
* // ```sh
|
|
4149
|
+
* // $ gcloud auth application-default login
|
|
4150
|
+
* // ```
|
|
4151
|
+
* // - Install the npm module by running:
|
|
4152
|
+
* // ```sh
|
|
4153
|
+
* // $ npm install googleapis
|
|
4154
|
+
* // ```
|
|
4155
|
+
*
|
|
4156
|
+
* const {google} = require('googleapis');
|
|
4157
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4158
|
+
*
|
|
4159
|
+
* async function main() {
|
|
4160
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4161
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4162
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4163
|
+
* });
|
|
4164
|
+
*
|
|
4165
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4166
|
+
* const authClient = await auth.getClient();
|
|
4167
|
+
* google.options({auth: authClient});
|
|
4168
|
+
*
|
|
4169
|
+
* // Do the magic
|
|
4170
|
+
* const res = await alloydb.projects.locations.clusters.delete({
|
|
4171
|
+
* // 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.
|
|
4172
|
+
* etag: 'placeholder-value',
|
|
4173
|
+
* // Optional. Whether to cascade delete child instances for given cluster.
|
|
4174
|
+
* force: 'placeholder-value',
|
|
4175
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4176
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4177
|
+
* // 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).
|
|
4178
|
+
* requestId: 'placeholder-value',
|
|
4179
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4180
|
+
* validateOnly: 'placeholder-value',
|
|
4181
|
+
* });
|
|
4182
|
+
* console.log(res.data);
|
|
4183
|
+
*
|
|
4184
|
+
* // Example response
|
|
4185
|
+
* // {
|
|
4186
|
+
* // "done": false,
|
|
4187
|
+
* // "error": {},
|
|
4188
|
+
* // "metadata": {},
|
|
4189
|
+
* // "name": "my_name",
|
|
4190
|
+
* // "response": {}
|
|
4191
|
+
* // }
|
|
4192
|
+
* }
|
|
4193
|
+
*
|
|
4194
|
+
* main().catch(e => {
|
|
4195
|
+
* console.error(e);
|
|
4196
|
+
* throw e;
|
|
4197
|
+
* });
|
|
4198
|
+
*
|
|
4199
|
+
* ```
|
|
3461
4200
|
*
|
|
3462
4201
|
* @param params - Parameters for request
|
|
3463
4202
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3546,6 +4285,67 @@ export namespace alloydb_v1alpha {
|
|
|
3546
4285
|
|
|
3547
4286
|
/**
|
|
3548
4287
|
* Exports data from the cluster. Imperative only.
|
|
4288
|
+
* @example
|
|
4289
|
+
* ```js
|
|
4290
|
+
* // Before running the sample:
|
|
4291
|
+
* // - Enable the API at:
|
|
4292
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4293
|
+
* // - Login into gcloud by running:
|
|
4294
|
+
* // ```sh
|
|
4295
|
+
* // $ gcloud auth application-default login
|
|
4296
|
+
* // ```
|
|
4297
|
+
* // - Install the npm module by running:
|
|
4298
|
+
* // ```sh
|
|
4299
|
+
* // $ npm install googleapis
|
|
4300
|
+
* // ```
|
|
4301
|
+
*
|
|
4302
|
+
* const {google} = require('googleapis');
|
|
4303
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4304
|
+
*
|
|
4305
|
+
* async function main() {
|
|
4306
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4307
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4308
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4309
|
+
* });
|
|
4310
|
+
*
|
|
4311
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4312
|
+
* const authClient = await auth.getClient();
|
|
4313
|
+
* google.options({auth: authClient});
|
|
4314
|
+
*
|
|
4315
|
+
* // Do the magic
|
|
4316
|
+
* const res = await alloydb.projects.locations.clusters.export({
|
|
4317
|
+
* // Required. The resource name of the cluster.
|
|
4318
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4319
|
+
*
|
|
4320
|
+
* // Request body metadata
|
|
4321
|
+
* requestBody: {
|
|
4322
|
+
* // request body parameters
|
|
4323
|
+
* // {
|
|
4324
|
+
* // "csvExportOptions": {},
|
|
4325
|
+
* // "database": "my_database",
|
|
4326
|
+
* // "gcsDestination": {},
|
|
4327
|
+
* // "sqlExportOptions": {}
|
|
4328
|
+
* // }
|
|
4329
|
+
* },
|
|
4330
|
+
* });
|
|
4331
|
+
* console.log(res.data);
|
|
4332
|
+
*
|
|
4333
|
+
* // Example response
|
|
4334
|
+
* // {
|
|
4335
|
+
* // "done": false,
|
|
4336
|
+
* // "error": {},
|
|
4337
|
+
* // "metadata": {},
|
|
4338
|
+
* // "name": "my_name",
|
|
4339
|
+
* // "response": {}
|
|
4340
|
+
* // }
|
|
4341
|
+
* }
|
|
4342
|
+
*
|
|
4343
|
+
* main().catch(e => {
|
|
4344
|
+
* console.error(e);
|
|
4345
|
+
* throw e;
|
|
4346
|
+
* });
|
|
4347
|
+
*
|
|
4348
|
+
* ```
|
|
3549
4349
|
*
|
|
3550
4350
|
* @param params - Parameters for request
|
|
3551
4351
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3637,6 +4437,90 @@ export namespace alloydb_v1alpha {
|
|
|
3637
4437
|
|
|
3638
4438
|
/**
|
|
3639
4439
|
* Gets details of a single Cluster.
|
|
4440
|
+
* @example
|
|
4441
|
+
* ```js
|
|
4442
|
+
* // Before running the sample:
|
|
4443
|
+
* // - Enable the API at:
|
|
4444
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4445
|
+
* // - Login into gcloud by running:
|
|
4446
|
+
* // ```sh
|
|
4447
|
+
* // $ gcloud auth application-default login
|
|
4448
|
+
* // ```
|
|
4449
|
+
* // - Install the npm module by running:
|
|
4450
|
+
* // ```sh
|
|
4451
|
+
* // $ npm install googleapis
|
|
4452
|
+
* // ```
|
|
4453
|
+
*
|
|
4454
|
+
* const {google} = require('googleapis');
|
|
4455
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4456
|
+
*
|
|
4457
|
+
* async function main() {
|
|
4458
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4459
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4460
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4461
|
+
* });
|
|
4462
|
+
*
|
|
4463
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4464
|
+
* const authClient = await auth.getClient();
|
|
4465
|
+
* google.options({auth: authClient});
|
|
4466
|
+
*
|
|
4467
|
+
* // Do the magic
|
|
4468
|
+
* const res = await alloydb.projects.locations.clusters.get({
|
|
4469
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4470
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4471
|
+
* // Optional. The view of the cluster to return. Returns all default fields if not set.
|
|
4472
|
+
* view: 'placeholder-value',
|
|
4473
|
+
* });
|
|
4474
|
+
* console.log(res.data);
|
|
4475
|
+
*
|
|
4476
|
+
* // Example response
|
|
4477
|
+
* // {
|
|
4478
|
+
* // "annotations": {},
|
|
4479
|
+
* // "automatedBackupPolicy": {},
|
|
4480
|
+
* // "backupSource": {},
|
|
4481
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4482
|
+
* // "clusterType": "my_clusterType",
|
|
4483
|
+
* // "continuousBackupConfig": {},
|
|
4484
|
+
* // "continuousBackupInfo": {},
|
|
4485
|
+
* // "createTime": "my_createTime",
|
|
4486
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4487
|
+
* // "deleteTime": "my_deleteTime",
|
|
4488
|
+
* // "displayName": "my_displayName",
|
|
4489
|
+
* // "encryptionConfig": {},
|
|
4490
|
+
* // "encryptionInfo": {},
|
|
4491
|
+
* // "etag": "my_etag",
|
|
4492
|
+
* // "geminiConfig": {},
|
|
4493
|
+
* // "initialUser": {},
|
|
4494
|
+
* // "labels": {},
|
|
4495
|
+
* // "maintenanceSchedule": {},
|
|
4496
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4497
|
+
* // "migrationSource": {},
|
|
4498
|
+
* // "name": "my_name",
|
|
4499
|
+
* // "network": "my_network",
|
|
4500
|
+
* // "networkConfig": {},
|
|
4501
|
+
* // "primaryConfig": {},
|
|
4502
|
+
* // "pscConfig": {},
|
|
4503
|
+
* // "reconciling": false,
|
|
4504
|
+
* // "satisfiesPzi": false,
|
|
4505
|
+
* // "satisfiesPzs": false,
|
|
4506
|
+
* // "secondaryConfig": {},
|
|
4507
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4508
|
+
* // "sslConfig": {},
|
|
4509
|
+
* // "state": "my_state",
|
|
4510
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4511
|
+
* // "tags": {},
|
|
4512
|
+
* // "trialMetadata": {},
|
|
4513
|
+
* // "uid": "my_uid",
|
|
4514
|
+
* // "updateTime": "my_updateTime"
|
|
4515
|
+
* // }
|
|
4516
|
+
* }
|
|
4517
|
+
*
|
|
4518
|
+
* main().catch(e => {
|
|
4519
|
+
* console.error(e);
|
|
4520
|
+
* throw e;
|
|
4521
|
+
* });
|
|
4522
|
+
*
|
|
4523
|
+
* ```
|
|
3640
4524
|
*
|
|
3641
4525
|
* @param params - Parameters for request
|
|
3642
4526
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3725,6 +4609,68 @@ export namespace alloydb_v1alpha {
|
|
|
3725
4609
|
|
|
3726
4610
|
/**
|
|
3727
4611
|
* Imports data to the cluster. Imperative only.
|
|
4612
|
+
* @example
|
|
4613
|
+
* ```js
|
|
4614
|
+
* // Before running the sample:
|
|
4615
|
+
* // - Enable the API at:
|
|
4616
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4617
|
+
* // - Login into gcloud by running:
|
|
4618
|
+
* // ```sh
|
|
4619
|
+
* // $ gcloud auth application-default login
|
|
4620
|
+
* // ```
|
|
4621
|
+
* // - Install the npm module by running:
|
|
4622
|
+
* // ```sh
|
|
4623
|
+
* // $ npm install googleapis
|
|
4624
|
+
* // ```
|
|
4625
|
+
*
|
|
4626
|
+
* const {google} = require('googleapis');
|
|
4627
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4628
|
+
*
|
|
4629
|
+
* async function main() {
|
|
4630
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4631
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4632
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4633
|
+
* });
|
|
4634
|
+
*
|
|
4635
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4636
|
+
* const authClient = await auth.getClient();
|
|
4637
|
+
* google.options({auth: authClient});
|
|
4638
|
+
*
|
|
4639
|
+
* // Do the magic
|
|
4640
|
+
* const res = await alloydb.projects.locations.clusters.import({
|
|
4641
|
+
* // Required. The resource name of the cluster.
|
|
4642
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4643
|
+
*
|
|
4644
|
+
* // Request body metadata
|
|
4645
|
+
* requestBody: {
|
|
4646
|
+
* // request body parameters
|
|
4647
|
+
* // {
|
|
4648
|
+
* // "csvImportOptions": {},
|
|
4649
|
+
* // "database": "my_database",
|
|
4650
|
+
* // "gcsUri": "my_gcsUri",
|
|
4651
|
+
* // "sqlImportOptions": {},
|
|
4652
|
+
* // "user": "my_user"
|
|
4653
|
+
* // }
|
|
4654
|
+
* },
|
|
4655
|
+
* });
|
|
4656
|
+
* console.log(res.data);
|
|
4657
|
+
*
|
|
4658
|
+
* // Example response
|
|
4659
|
+
* // {
|
|
4660
|
+
* // "done": false,
|
|
4661
|
+
* // "error": {},
|
|
4662
|
+
* // "metadata": {},
|
|
4663
|
+
* // "name": "my_name",
|
|
4664
|
+
* // "response": {}
|
|
4665
|
+
* // }
|
|
4666
|
+
* }
|
|
4667
|
+
*
|
|
4668
|
+
* main().catch(e => {
|
|
4669
|
+
* console.error(e);
|
|
4670
|
+
* throw e;
|
|
4671
|
+
* });
|
|
4672
|
+
*
|
|
4673
|
+
* ```
|
|
3728
4674
|
*
|
|
3729
4675
|
* @param params - Parameters for request
|
|
3730
4676
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3816,6 +4762,62 @@ export namespace alloydb_v1alpha {
|
|
|
3816
4762
|
|
|
3817
4763
|
/**
|
|
3818
4764
|
* Lists Clusters in a given project and location.
|
|
4765
|
+
* @example
|
|
4766
|
+
* ```js
|
|
4767
|
+
* // Before running the sample:
|
|
4768
|
+
* // - Enable the API at:
|
|
4769
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4770
|
+
* // - Login into gcloud by running:
|
|
4771
|
+
* // ```sh
|
|
4772
|
+
* // $ gcloud auth application-default login
|
|
4773
|
+
* // ```
|
|
4774
|
+
* // - Install the npm module by running:
|
|
4775
|
+
* // ```sh
|
|
4776
|
+
* // $ npm install googleapis
|
|
4777
|
+
* // ```
|
|
4778
|
+
*
|
|
4779
|
+
* const {google} = require('googleapis');
|
|
4780
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4781
|
+
*
|
|
4782
|
+
* async function main() {
|
|
4783
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4784
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4785
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4786
|
+
* });
|
|
4787
|
+
*
|
|
4788
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4789
|
+
* const authClient = await auth.getClient();
|
|
4790
|
+
* google.options({auth: authClient});
|
|
4791
|
+
*
|
|
4792
|
+
* // Do the magic
|
|
4793
|
+
* const res = await alloydb.projects.locations.clusters.list({
|
|
4794
|
+
* // Optional. Filtering results
|
|
4795
|
+
* filter: 'placeholder-value',
|
|
4796
|
+
* // Optional. Hint for how to order the results
|
|
4797
|
+
* orderBy: 'placeholder-value',
|
|
4798
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
4799
|
+
* pageSize: 'placeholder-value',
|
|
4800
|
+
* // A token identifying a page of results the server should return.
|
|
4801
|
+
* pageToken: 'placeholder-value',
|
|
4802
|
+
* // 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/-
|
|
4803
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
4804
|
+
* });
|
|
4805
|
+
* console.log(res.data);
|
|
4806
|
+
*
|
|
4807
|
+
* // Example response
|
|
4808
|
+
* // {
|
|
4809
|
+
* // "clusters": [],
|
|
4810
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4811
|
+
* // "unreachable": []
|
|
4812
|
+
* // }
|
|
4813
|
+
* }
|
|
4814
|
+
*
|
|
4815
|
+
* main().catch(e => {
|
|
4816
|
+
* console.error(e);
|
|
4817
|
+
* throw e;
|
|
4818
|
+
* });
|
|
4819
|
+
*
|
|
4820
|
+
* ```
|
|
3819
4821
|
*
|
|
3820
4822
|
* @param params - Parameters for request
|
|
3821
4823
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3909,6 +4911,108 @@ export namespace alloydb_v1alpha {
|
|
|
3909
4911
|
|
|
3910
4912
|
/**
|
|
3911
4913
|
* Updates the parameters of a single Cluster.
|
|
4914
|
+
* @example
|
|
4915
|
+
* ```js
|
|
4916
|
+
* // Before running the sample:
|
|
4917
|
+
* // - Enable the API at:
|
|
4918
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4919
|
+
* // - Login into gcloud by running:
|
|
4920
|
+
* // ```sh
|
|
4921
|
+
* // $ gcloud auth application-default login
|
|
4922
|
+
* // ```
|
|
4923
|
+
* // - Install the npm module by running:
|
|
4924
|
+
* // ```sh
|
|
4925
|
+
* // $ npm install googleapis
|
|
4926
|
+
* // ```
|
|
4927
|
+
*
|
|
4928
|
+
* const {google} = require('googleapis');
|
|
4929
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4930
|
+
*
|
|
4931
|
+
* async function main() {
|
|
4932
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4933
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4934
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4935
|
+
* });
|
|
4936
|
+
*
|
|
4937
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4938
|
+
* const authClient = await auth.getClient();
|
|
4939
|
+
* google.options({auth: authClient});
|
|
4940
|
+
*
|
|
4941
|
+
* // Do the magic
|
|
4942
|
+
* const res = await alloydb.projects.locations.clusters.patch({
|
|
4943
|
+
* // 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.
|
|
4944
|
+
* allowMissing: 'placeholder-value',
|
|
4945
|
+
* // 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\}
|
|
4946
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4947
|
+
* // 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).
|
|
4948
|
+
* requestId: 'placeholder-value',
|
|
4949
|
+
* // 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.
|
|
4950
|
+
* updateMask: 'placeholder-value',
|
|
4951
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4952
|
+
* validateOnly: 'placeholder-value',
|
|
4953
|
+
*
|
|
4954
|
+
* // Request body metadata
|
|
4955
|
+
* requestBody: {
|
|
4956
|
+
* // request body parameters
|
|
4957
|
+
* // {
|
|
4958
|
+
* // "annotations": {},
|
|
4959
|
+
* // "automatedBackupPolicy": {},
|
|
4960
|
+
* // "backupSource": {},
|
|
4961
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4962
|
+
* // "clusterType": "my_clusterType",
|
|
4963
|
+
* // "continuousBackupConfig": {},
|
|
4964
|
+
* // "continuousBackupInfo": {},
|
|
4965
|
+
* // "createTime": "my_createTime",
|
|
4966
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4967
|
+
* // "deleteTime": "my_deleteTime",
|
|
4968
|
+
* // "displayName": "my_displayName",
|
|
4969
|
+
* // "encryptionConfig": {},
|
|
4970
|
+
* // "encryptionInfo": {},
|
|
4971
|
+
* // "etag": "my_etag",
|
|
4972
|
+
* // "geminiConfig": {},
|
|
4973
|
+
* // "initialUser": {},
|
|
4974
|
+
* // "labels": {},
|
|
4975
|
+
* // "maintenanceSchedule": {},
|
|
4976
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4977
|
+
* // "migrationSource": {},
|
|
4978
|
+
* // "name": "my_name",
|
|
4979
|
+
* // "network": "my_network",
|
|
4980
|
+
* // "networkConfig": {},
|
|
4981
|
+
* // "primaryConfig": {},
|
|
4982
|
+
* // "pscConfig": {},
|
|
4983
|
+
* // "reconciling": false,
|
|
4984
|
+
* // "satisfiesPzi": false,
|
|
4985
|
+
* // "satisfiesPzs": false,
|
|
4986
|
+
* // "secondaryConfig": {},
|
|
4987
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4988
|
+
* // "sslConfig": {},
|
|
4989
|
+
* // "state": "my_state",
|
|
4990
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4991
|
+
* // "tags": {},
|
|
4992
|
+
* // "trialMetadata": {},
|
|
4993
|
+
* // "uid": "my_uid",
|
|
4994
|
+
* // "updateTime": "my_updateTime"
|
|
4995
|
+
* // }
|
|
4996
|
+
* },
|
|
4997
|
+
* });
|
|
4998
|
+
* console.log(res.data);
|
|
4999
|
+
*
|
|
5000
|
+
* // Example response
|
|
5001
|
+
* // {
|
|
5002
|
+
* // "done": false,
|
|
5003
|
+
* // "error": {},
|
|
5004
|
+
* // "metadata": {},
|
|
5005
|
+
* // "name": "my_name",
|
|
5006
|
+
* // "response": {}
|
|
5007
|
+
* // }
|
|
5008
|
+
* }
|
|
5009
|
+
*
|
|
5010
|
+
* main().catch(e => {
|
|
5011
|
+
* console.error(e);
|
|
5012
|
+
* throw e;
|
|
5013
|
+
* });
|
|
5014
|
+
*
|
|
5015
|
+
* ```
|
|
3912
5016
|
*
|
|
3913
5017
|
* @param params - Parameters for request
|
|
3914
5018
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3997,6 +5101,66 @@ export namespace alloydb_v1alpha {
|
|
|
3997
5101
|
|
|
3998
5102
|
/**
|
|
3999
5103
|
* Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.
|
|
5104
|
+
* @example
|
|
5105
|
+
* ```js
|
|
5106
|
+
* // Before running the sample:
|
|
5107
|
+
* // - Enable the API at:
|
|
5108
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5109
|
+
* // - Login into gcloud by running:
|
|
5110
|
+
* // ```sh
|
|
5111
|
+
* // $ gcloud auth application-default login
|
|
5112
|
+
* // ```
|
|
5113
|
+
* // - Install the npm module by running:
|
|
5114
|
+
* // ```sh
|
|
5115
|
+
* // $ npm install googleapis
|
|
5116
|
+
* // ```
|
|
5117
|
+
*
|
|
5118
|
+
* const {google} = require('googleapis');
|
|
5119
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5120
|
+
*
|
|
5121
|
+
* async function main() {
|
|
5122
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5123
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5124
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5125
|
+
* });
|
|
5126
|
+
*
|
|
5127
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5128
|
+
* const authClient = await auth.getClient();
|
|
5129
|
+
* google.options({auth: authClient});
|
|
5130
|
+
*
|
|
5131
|
+
* // Do the magic
|
|
5132
|
+
* const res = await alloydb.projects.locations.clusters.promote({
|
|
5133
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5134
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5135
|
+
*
|
|
5136
|
+
* // Request body metadata
|
|
5137
|
+
* requestBody: {
|
|
5138
|
+
* // request body parameters
|
|
5139
|
+
* // {
|
|
5140
|
+
* // "etag": "my_etag",
|
|
5141
|
+
* // "requestId": "my_requestId",
|
|
5142
|
+
* // "validateOnly": false
|
|
5143
|
+
* // }
|
|
5144
|
+
* },
|
|
5145
|
+
* });
|
|
5146
|
+
* console.log(res.data);
|
|
5147
|
+
*
|
|
5148
|
+
* // Example response
|
|
5149
|
+
* // {
|
|
5150
|
+
* // "done": false,
|
|
5151
|
+
* // "error": {},
|
|
5152
|
+
* // "metadata": {},
|
|
5153
|
+
* // "name": "my_name",
|
|
5154
|
+
* // "response": {}
|
|
5155
|
+
* // }
|
|
5156
|
+
* }
|
|
5157
|
+
*
|
|
5158
|
+
* main().catch(e => {
|
|
5159
|
+
* console.error(e);
|
|
5160
|
+
* throw e;
|
|
5161
|
+
* });
|
|
5162
|
+
*
|
|
5163
|
+
* ```
|
|
4000
5164
|
*
|
|
4001
5165
|
* @param params - Parameters for request
|
|
4002
5166
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4088,6 +5252,69 @@ export namespace alloydb_v1alpha {
|
|
|
4088
5252
|
|
|
4089
5253
|
/**
|
|
4090
5254
|
* 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.
|
|
5255
|
+
* @example
|
|
5256
|
+
* ```js
|
|
5257
|
+
* // Before running the sample:
|
|
5258
|
+
* // - Enable the API at:
|
|
5259
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5260
|
+
* // - Login into gcloud by running:
|
|
5261
|
+
* // ```sh
|
|
5262
|
+
* // $ gcloud auth application-default login
|
|
5263
|
+
* // ```
|
|
5264
|
+
* // - Install the npm module by running:
|
|
5265
|
+
* // ```sh
|
|
5266
|
+
* // $ npm install googleapis
|
|
5267
|
+
* // ```
|
|
5268
|
+
*
|
|
5269
|
+
* const {google} = require('googleapis');
|
|
5270
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5271
|
+
*
|
|
5272
|
+
* async function main() {
|
|
5273
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5274
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5275
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5276
|
+
* });
|
|
5277
|
+
*
|
|
5278
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5279
|
+
* const authClient = await auth.getClient();
|
|
5280
|
+
* google.options({auth: authClient});
|
|
5281
|
+
*
|
|
5282
|
+
* // Do the magic
|
|
5283
|
+
* const res = await alloydb.projects.locations.clusters.restore({
|
|
5284
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.
|
|
5285
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5286
|
+
*
|
|
5287
|
+
* // Request body metadata
|
|
5288
|
+
* requestBody: {
|
|
5289
|
+
* // request body parameters
|
|
5290
|
+
* // {
|
|
5291
|
+
* // "backupSource": {},
|
|
5292
|
+
* // "cluster": {},
|
|
5293
|
+
* // "clusterId": "my_clusterId",
|
|
5294
|
+
* // "continuousBackupSource": {},
|
|
5295
|
+
* // "requestId": "my_requestId",
|
|
5296
|
+
* // "validateOnly": false
|
|
5297
|
+
* // }
|
|
5298
|
+
* },
|
|
5299
|
+
* });
|
|
5300
|
+
* console.log(res.data);
|
|
5301
|
+
*
|
|
5302
|
+
* // Example response
|
|
5303
|
+
* // {
|
|
5304
|
+
* // "done": false,
|
|
5305
|
+
* // "error": {},
|
|
5306
|
+
* // "metadata": {},
|
|
5307
|
+
* // "name": "my_name",
|
|
5308
|
+
* // "response": {}
|
|
5309
|
+
* // }
|
|
5310
|
+
* }
|
|
5311
|
+
*
|
|
5312
|
+
* main().catch(e => {
|
|
5313
|
+
* console.error(e);
|
|
5314
|
+
* throw e;
|
|
5315
|
+
* });
|
|
5316
|
+
*
|
|
5317
|
+
* ```
|
|
4091
5318
|
*
|
|
4092
5319
|
* @param params - Parameters for request
|
|
4093
5320
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4179,6 +5406,66 @@ export namespace alloydb_v1alpha {
|
|
|
4179
5406
|
|
|
4180
5407
|
/**
|
|
4181
5408
|
* Restores an AlloyDB cluster from a CloudSQL resource.
|
|
5409
|
+
* @example
|
|
5410
|
+
* ```js
|
|
5411
|
+
* // Before running the sample:
|
|
5412
|
+
* // - Enable the API at:
|
|
5413
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5414
|
+
* // - Login into gcloud by running:
|
|
5415
|
+
* // ```sh
|
|
5416
|
+
* // $ gcloud auth application-default login
|
|
5417
|
+
* // ```
|
|
5418
|
+
* // - Install the npm module by running:
|
|
5419
|
+
* // ```sh
|
|
5420
|
+
* // $ npm install googleapis
|
|
5421
|
+
* // ```
|
|
5422
|
+
*
|
|
5423
|
+
* const {google} = require('googleapis');
|
|
5424
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5425
|
+
*
|
|
5426
|
+
* async function main() {
|
|
5427
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5428
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5429
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5430
|
+
* });
|
|
5431
|
+
*
|
|
5432
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5433
|
+
* const authClient = await auth.getClient();
|
|
5434
|
+
* google.options({auth: authClient});
|
|
5435
|
+
*
|
|
5436
|
+
* // Do the magic
|
|
5437
|
+
* const res = await alloydb.projects.locations.clusters.restoreFromCloudSQL({
|
|
5438
|
+
* // Required. The location of the new cluster. For the required format, see the comment on Cluster.name field.
|
|
5439
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5440
|
+
*
|
|
5441
|
+
* // Request body metadata
|
|
5442
|
+
* requestBody: {
|
|
5443
|
+
* // request body parameters
|
|
5444
|
+
* // {
|
|
5445
|
+
* // "cloudsqlBackupRunSource": {},
|
|
5446
|
+
* // "cluster": {},
|
|
5447
|
+
* // "clusterId": "my_clusterId"
|
|
5448
|
+
* // }
|
|
5449
|
+
* },
|
|
5450
|
+
* });
|
|
5451
|
+
* console.log(res.data);
|
|
5452
|
+
*
|
|
5453
|
+
* // Example response
|
|
5454
|
+
* // {
|
|
5455
|
+
* // "done": false,
|
|
5456
|
+
* // "error": {},
|
|
5457
|
+
* // "metadata": {},
|
|
5458
|
+
* // "name": "my_name",
|
|
5459
|
+
* // "response": {}
|
|
5460
|
+
* // }
|
|
5461
|
+
* }
|
|
5462
|
+
*
|
|
5463
|
+
* main().catch(e => {
|
|
5464
|
+
* console.error(e);
|
|
5465
|
+
* throw e;
|
|
5466
|
+
* });
|
|
5467
|
+
*
|
|
5468
|
+
* ```
|
|
4182
5469
|
*
|
|
4183
5470
|
* @param params - Parameters for request
|
|
4184
5471
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4270,6 +5557,65 @@ export namespace alloydb_v1alpha {
|
|
|
4270
5557
|
|
|
4271
5558
|
/**
|
|
4272
5559
|
* 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.
|
|
5560
|
+
* @example
|
|
5561
|
+
* ```js
|
|
5562
|
+
* // Before running the sample:
|
|
5563
|
+
* // - Enable the API at:
|
|
5564
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5565
|
+
* // - Login into gcloud by running:
|
|
5566
|
+
* // ```sh
|
|
5567
|
+
* // $ gcloud auth application-default login
|
|
5568
|
+
* // ```
|
|
5569
|
+
* // - Install the npm module by running:
|
|
5570
|
+
* // ```sh
|
|
5571
|
+
* // $ npm install googleapis
|
|
5572
|
+
* // ```
|
|
5573
|
+
*
|
|
5574
|
+
* const {google} = require('googleapis');
|
|
5575
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5576
|
+
*
|
|
5577
|
+
* async function main() {
|
|
5578
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5579
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5580
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5581
|
+
* });
|
|
5582
|
+
*
|
|
5583
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5584
|
+
* const authClient = await auth.getClient();
|
|
5585
|
+
* google.options({auth: authClient});
|
|
5586
|
+
*
|
|
5587
|
+
* // Do the magic
|
|
5588
|
+
* const res = await alloydb.projects.locations.clusters.switchover({
|
|
5589
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5590
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5591
|
+
*
|
|
5592
|
+
* // Request body metadata
|
|
5593
|
+
* requestBody: {
|
|
5594
|
+
* // request body parameters
|
|
5595
|
+
* // {
|
|
5596
|
+
* // "requestId": "my_requestId",
|
|
5597
|
+
* // "validateOnly": false
|
|
5598
|
+
* // }
|
|
5599
|
+
* },
|
|
5600
|
+
* });
|
|
5601
|
+
* console.log(res.data);
|
|
5602
|
+
*
|
|
5603
|
+
* // Example response
|
|
5604
|
+
* // {
|
|
5605
|
+
* // "done": false,
|
|
5606
|
+
* // "error": {},
|
|
5607
|
+
* // "metadata": {},
|
|
5608
|
+
* // "name": "my_name",
|
|
5609
|
+
* // "response": {}
|
|
5610
|
+
* // }
|
|
5611
|
+
* }
|
|
5612
|
+
*
|
|
5613
|
+
* main().catch(e => {
|
|
5614
|
+
* console.error(e);
|
|
5615
|
+
* throw e;
|
|
5616
|
+
* });
|
|
5617
|
+
*
|
|
5618
|
+
* ```
|
|
4273
5619
|
*
|
|
4274
5620
|
* @param params - Parameters for request
|
|
4275
5621
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4361,6 +5707,67 @@ export namespace alloydb_v1alpha {
|
|
|
4361
5707
|
|
|
4362
5708
|
/**
|
|
4363
5709
|
* Upgrades a single Cluster. Imperative only.
|
|
5710
|
+
* @example
|
|
5711
|
+
* ```js
|
|
5712
|
+
* // Before running the sample:
|
|
5713
|
+
* // - Enable the API at:
|
|
5714
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5715
|
+
* // - Login into gcloud by running:
|
|
5716
|
+
* // ```sh
|
|
5717
|
+
* // $ gcloud auth application-default login
|
|
5718
|
+
* // ```
|
|
5719
|
+
* // - Install the npm module by running:
|
|
5720
|
+
* // ```sh
|
|
5721
|
+
* // $ npm install googleapis
|
|
5722
|
+
* // ```
|
|
5723
|
+
*
|
|
5724
|
+
* const {google} = require('googleapis');
|
|
5725
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5726
|
+
*
|
|
5727
|
+
* async function main() {
|
|
5728
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5729
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5730
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5731
|
+
* });
|
|
5732
|
+
*
|
|
5733
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5734
|
+
* const authClient = await auth.getClient();
|
|
5735
|
+
* google.options({auth: authClient});
|
|
5736
|
+
*
|
|
5737
|
+
* // Do the magic
|
|
5738
|
+
* const res = await alloydb.projects.locations.clusters.upgrade({
|
|
5739
|
+
* // Required. The resource name of the cluster.
|
|
5740
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5741
|
+
*
|
|
5742
|
+
* // Request body metadata
|
|
5743
|
+
* requestBody: {
|
|
5744
|
+
* // request body parameters
|
|
5745
|
+
* // {
|
|
5746
|
+
* // "etag": "my_etag",
|
|
5747
|
+
* // "requestId": "my_requestId",
|
|
5748
|
+
* // "validateOnly": false,
|
|
5749
|
+
* // "version": "my_version"
|
|
5750
|
+
* // }
|
|
5751
|
+
* },
|
|
5752
|
+
* });
|
|
5753
|
+
* console.log(res.data);
|
|
5754
|
+
*
|
|
5755
|
+
* // Example response
|
|
5756
|
+
* // {
|
|
5757
|
+
* // "done": false,
|
|
5758
|
+
* // "error": {},
|
|
5759
|
+
* // "metadata": {},
|
|
5760
|
+
* // "name": "my_name",
|
|
5761
|
+
* // "response": {}
|
|
5762
|
+
* // }
|
|
5763
|
+
* }
|
|
5764
|
+
*
|
|
5765
|
+
* main().catch(e => {
|
|
5766
|
+
* console.error(e);
|
|
5767
|
+
* throw e;
|
|
5768
|
+
* });
|
|
5769
|
+
*
|
|
5770
|
+
* ```
|
|
4364
5771
|
*
|
|
4365
5772
|
* @param params - Parameters for request
|
|
4366
5773
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4677,6 +6084,103 @@ export namespace alloydb_v1alpha {
|
|
|
4677
6084
|
|
|
4678
6085
|
/**
|
|
4679
6086
|
* Creates a new Instance in a given project and location.
|
|
6087
|
+
* @example
|
|
6088
|
+
* ```js
|
|
6089
|
+
* // Before running the sample:
|
|
6090
|
+
* // - Enable the API at:
|
|
6091
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6092
|
+
* // - Login into gcloud by running:
|
|
6093
|
+
* // ```sh
|
|
6094
|
+
* // $ gcloud auth application-default login
|
|
6095
|
+
* // ```
|
|
6096
|
+
* // - Install the npm module by running:
|
|
6097
|
+
* // ```sh
|
|
6098
|
+
* // $ npm install googleapis
|
|
6099
|
+
* // ```
|
|
6100
|
+
*
|
|
6101
|
+
* const {google} = require('googleapis');
|
|
6102
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6103
|
+
*
|
|
6104
|
+
* async function main() {
|
|
6105
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6106
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6107
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6108
|
+
* });
|
|
6109
|
+
*
|
|
6110
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6111
|
+
* const authClient = await auth.getClient();
|
|
6112
|
+
* google.options({auth: authClient});
|
|
6113
|
+
*
|
|
6114
|
+
* // Do the magic
|
|
6115
|
+
* const res = await alloydb.projects.locations.clusters.instances.create({
|
|
6116
|
+
* // Required. ID of the requesting object.
|
|
6117
|
+
* instanceId: 'placeholder-value',
|
|
6118
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6119
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6120
|
+
* // 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).
|
|
6121
|
+
* requestId: 'placeholder-value',
|
|
6122
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6123
|
+
* validateOnly: 'placeholder-value',
|
|
6124
|
+
*
|
|
6125
|
+
* // Request body metadata
|
|
6126
|
+
* requestBody: {
|
|
6127
|
+
* // request body parameters
|
|
6128
|
+
* // {
|
|
6129
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6130
|
+
* // "annotations": {},
|
|
6131
|
+
* // "availabilityType": "my_availabilityType",
|
|
6132
|
+
* // "clientConnectionConfig": {},
|
|
6133
|
+
* // "connectionPoolConfig": {},
|
|
6134
|
+
* // "createTime": "my_createTime",
|
|
6135
|
+
* // "databaseFlags": {},
|
|
6136
|
+
* // "deleteTime": "my_deleteTime",
|
|
6137
|
+
* // "displayName": "my_displayName",
|
|
6138
|
+
* // "etag": "my_etag",
|
|
6139
|
+
* // "gcaConfig": {},
|
|
6140
|
+
* // "gceZone": "my_gceZone",
|
|
6141
|
+
* // "geminiConfig": {},
|
|
6142
|
+
* // "instanceType": "my_instanceType",
|
|
6143
|
+
* // "ipAddress": "my_ipAddress",
|
|
6144
|
+
* // "labels": {},
|
|
6145
|
+
* // "machineConfig": {},
|
|
6146
|
+
* // "name": "my_name",
|
|
6147
|
+
* // "networkConfig": {},
|
|
6148
|
+
* // "nodes": [],
|
|
6149
|
+
* // "observabilityConfig": {},
|
|
6150
|
+
* // "outboundPublicIpAddresses": [],
|
|
6151
|
+
* // "pscInstanceConfig": {},
|
|
6152
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6153
|
+
* // "queryInsightsConfig": {},
|
|
6154
|
+
* // "readPoolConfig": {},
|
|
6155
|
+
* // "reconciling": false,
|
|
6156
|
+
* // "satisfiesPzi": false,
|
|
6157
|
+
* // "satisfiesPzs": false,
|
|
6158
|
+
* // "state": "my_state",
|
|
6159
|
+
* // "uid": "my_uid",
|
|
6160
|
+
* // "updatePolicy": {},
|
|
6161
|
+
* // "updateTime": "my_updateTime",
|
|
6162
|
+
* // "writableNode": {}
|
|
6163
|
+
* // }
|
|
6164
|
+
* },
|
|
6165
|
+
* });
|
|
6166
|
+
* console.log(res.data);
|
|
6167
|
+
*
|
|
6168
|
+
* // Example response
|
|
6169
|
+
* // {
|
|
6170
|
+
* // "done": false,
|
|
6171
|
+
* // "error": {},
|
|
6172
|
+
* // "metadata": {},
|
|
6173
|
+
* // "name": "my_name",
|
|
6174
|
+
* // "response": {}
|
|
6175
|
+
* // }
|
|
6176
|
+
* }
|
|
6177
|
+
*
|
|
6178
|
+
* main().catch(e => {
|
|
6179
|
+
* console.error(e);
|
|
6180
|
+
* throw e;
|
|
6181
|
+
* });
|
|
6182
|
+
*
|
|
6183
|
+
* ```
|
|
4680
6184
|
*
|
|
4681
6185
|
* @param params - Parameters for request
|
|
4682
6186
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4769,6 +6273,104 @@ export namespace alloydb_v1alpha {
|
|
|
4769
6273
|
|
|
4770
6274
|
/**
|
|
4771
6275
|
* Creates a new SECONDARY Instance in a given project and location.
|
|
6276
|
+
* @example
|
|
6277
|
+
* ```js
|
|
6278
|
+
* // Before running the sample:
|
|
6279
|
+
* // - Enable the API at:
|
|
6280
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6281
|
+
* // - Login into gcloud by running:
|
|
6282
|
+
* // ```sh
|
|
6283
|
+
* // $ gcloud auth application-default login
|
|
6284
|
+
* // ```
|
|
6285
|
+
* // - Install the npm module by running:
|
|
6286
|
+
* // ```sh
|
|
6287
|
+
* // $ npm install googleapis
|
|
6288
|
+
* // ```
|
|
6289
|
+
*
|
|
6290
|
+
* const {google} = require('googleapis');
|
|
6291
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6292
|
+
*
|
|
6293
|
+
* async function main() {
|
|
6294
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6295
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6296
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6297
|
+
* });
|
|
6298
|
+
*
|
|
6299
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6300
|
+
* const authClient = await auth.getClient();
|
|
6301
|
+
* google.options({auth: authClient});
|
|
6302
|
+
*
|
|
6303
|
+
* // Do the magic
|
|
6304
|
+
* const res =
|
|
6305
|
+
* await alloydb.projects.locations.clusters.instances.createsecondary({
|
|
6306
|
+
* // Required. ID of the requesting object.
|
|
6307
|
+
* instanceId: 'placeholder-value',
|
|
6308
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6309
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6310
|
+
* // 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).
|
|
6311
|
+
* requestId: 'placeholder-value',
|
|
6312
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6313
|
+
* validateOnly: 'placeholder-value',
|
|
6314
|
+
*
|
|
6315
|
+
* // Request body metadata
|
|
6316
|
+
* requestBody: {
|
|
6317
|
+
* // request body parameters
|
|
6318
|
+
* // {
|
|
6319
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6320
|
+
* // "annotations": {},
|
|
6321
|
+
* // "availabilityType": "my_availabilityType",
|
|
6322
|
+
* // "clientConnectionConfig": {},
|
|
6323
|
+
* // "connectionPoolConfig": {},
|
|
6324
|
+
* // "createTime": "my_createTime",
|
|
6325
|
+
* // "databaseFlags": {},
|
|
6326
|
+
* // "deleteTime": "my_deleteTime",
|
|
6327
|
+
* // "displayName": "my_displayName",
|
|
6328
|
+
* // "etag": "my_etag",
|
|
6329
|
+
* // "gcaConfig": {},
|
|
6330
|
+
* // "gceZone": "my_gceZone",
|
|
6331
|
+
* // "geminiConfig": {},
|
|
6332
|
+
* // "instanceType": "my_instanceType",
|
|
6333
|
+
* // "ipAddress": "my_ipAddress",
|
|
6334
|
+
* // "labels": {},
|
|
6335
|
+
* // "machineConfig": {},
|
|
6336
|
+
* // "name": "my_name",
|
|
6337
|
+
* // "networkConfig": {},
|
|
6338
|
+
* // "nodes": [],
|
|
6339
|
+
* // "observabilityConfig": {},
|
|
6340
|
+
* // "outboundPublicIpAddresses": [],
|
|
6341
|
+
* // "pscInstanceConfig": {},
|
|
6342
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6343
|
+
* // "queryInsightsConfig": {},
|
|
6344
|
+
* // "readPoolConfig": {},
|
|
6345
|
+
* // "reconciling": false,
|
|
6346
|
+
* // "satisfiesPzi": false,
|
|
6347
|
+
* // "satisfiesPzs": false,
|
|
6348
|
+
* // "state": "my_state",
|
|
6349
|
+
* // "uid": "my_uid",
|
|
6350
|
+
* // "updatePolicy": {},
|
|
6351
|
+
* // "updateTime": "my_updateTime",
|
|
6352
|
+
* // "writableNode": {}
|
|
6353
|
+
* // }
|
|
6354
|
+
* },
|
|
6355
|
+
* });
|
|
6356
|
+
* console.log(res.data);
|
|
6357
|
+
*
|
|
6358
|
+
* // Example response
|
|
6359
|
+
* // {
|
|
6360
|
+
* // "done": false,
|
|
6361
|
+
* // "error": {},
|
|
6362
|
+
* // "metadata": {},
|
|
6363
|
+
* // "name": "my_name",
|
|
6364
|
+
* // "response": {}
|
|
6365
|
+
* // }
|
|
6366
|
+
* }
|
|
6367
|
+
*
|
|
6368
|
+
* main().catch(e => {
|
|
6369
|
+
* console.error(e);
|
|
6370
|
+
* throw e;
|
|
6371
|
+
* });
|
|
6372
|
+
*
|
|
6373
|
+
* ```
|
|
4772
6374
|
*
|
|
4773
6375
|
* @param params - Parameters for request
|
|
4774
6376
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4860,6 +6462,62 @@ export namespace alloydb_v1alpha {
|
|
|
4860
6462
|
|
|
4861
6463
|
/**
|
|
4862
6464
|
* Deletes a single Instance.
|
|
6465
|
+
* @example
|
|
6466
|
+
* ```js
|
|
6467
|
+
* // Before running the sample:
|
|
6468
|
+
* // - Enable the API at:
|
|
6469
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6470
|
+
* // - Login into gcloud by running:
|
|
6471
|
+
* // ```sh
|
|
6472
|
+
* // $ gcloud auth application-default login
|
|
6473
|
+
* // ```
|
|
6474
|
+
* // - Install the npm module by running:
|
|
6475
|
+
* // ```sh
|
|
6476
|
+
* // $ npm install googleapis
|
|
6477
|
+
* // ```
|
|
6478
|
+
*
|
|
6479
|
+
* const {google} = require('googleapis');
|
|
6480
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6481
|
+
*
|
|
6482
|
+
* async function main() {
|
|
6483
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6484
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6485
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6486
|
+
* });
|
|
6487
|
+
*
|
|
6488
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6489
|
+
* const authClient = await auth.getClient();
|
|
6490
|
+
* google.options({auth: authClient});
|
|
6491
|
+
*
|
|
6492
|
+
* // Do the magic
|
|
6493
|
+
* const res = await alloydb.projects.locations.clusters.instances.delete({
|
|
6494
|
+
* // 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.
|
|
6495
|
+
* etag: 'placeholder-value',
|
|
6496
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6497
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6498
|
+
* // 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).
|
|
6499
|
+
* requestId: 'placeholder-value',
|
|
6500
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6501
|
+
* validateOnly: 'placeholder-value',
|
|
6502
|
+
* });
|
|
6503
|
+
* console.log(res.data);
|
|
6504
|
+
*
|
|
6505
|
+
* // Example response
|
|
6506
|
+
* // {
|
|
6507
|
+
* // "done": false,
|
|
6508
|
+
* // "error": {},
|
|
6509
|
+
* // "metadata": {},
|
|
6510
|
+
* // "name": "my_name",
|
|
6511
|
+
* // "response": {}
|
|
6512
|
+
* // }
|
|
6513
|
+
* }
|
|
6514
|
+
*
|
|
6515
|
+
* main().catch(e => {
|
|
6516
|
+
* console.error(e);
|
|
6517
|
+
* throw e;
|
|
6518
|
+
* });
|
|
6519
|
+
*
|
|
6520
|
+
* ```
|
|
4863
6521
|
*
|
|
4864
6522
|
* @param params - Parameters for request
|
|
4865
6523
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4949,6 +6607,65 @@ export namespace alloydb_v1alpha {
|
|
|
4949
6607
|
|
|
4950
6608
|
/**
|
|
4951
6609
|
* Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.
|
|
6610
|
+
* @example
|
|
6611
|
+
* ```js
|
|
6612
|
+
* // Before running the sample:
|
|
6613
|
+
* // - Enable the API at:
|
|
6614
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6615
|
+
* // - Login into gcloud by running:
|
|
6616
|
+
* // ```sh
|
|
6617
|
+
* // $ gcloud auth application-default login
|
|
6618
|
+
* // ```
|
|
6619
|
+
* // - Install the npm module by running:
|
|
6620
|
+
* // ```sh
|
|
6621
|
+
* // $ npm install googleapis
|
|
6622
|
+
* // ```
|
|
6623
|
+
*
|
|
6624
|
+
* const {google} = require('googleapis');
|
|
6625
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6626
|
+
*
|
|
6627
|
+
* async function main() {
|
|
6628
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6629
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6630
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6631
|
+
* });
|
|
6632
|
+
*
|
|
6633
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6634
|
+
* const authClient = await auth.getClient();
|
|
6635
|
+
* google.options({auth: authClient});
|
|
6636
|
+
*
|
|
6637
|
+
* // Do the magic
|
|
6638
|
+
* const res = await alloydb.projects.locations.clusters.instances.failover({
|
|
6639
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6640
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6641
|
+
*
|
|
6642
|
+
* // Request body metadata
|
|
6643
|
+
* requestBody: {
|
|
6644
|
+
* // request body parameters
|
|
6645
|
+
* // {
|
|
6646
|
+
* // "requestId": "my_requestId",
|
|
6647
|
+
* // "validateOnly": false
|
|
6648
|
+
* // }
|
|
6649
|
+
* },
|
|
6650
|
+
* });
|
|
6651
|
+
* console.log(res.data);
|
|
6652
|
+
*
|
|
6653
|
+
* // Example response
|
|
6654
|
+
* // {
|
|
6655
|
+
* // "done": false,
|
|
6656
|
+
* // "error": {},
|
|
6657
|
+
* // "metadata": {},
|
|
6658
|
+
* // "name": "my_name",
|
|
6659
|
+
* // "response": {}
|
|
6660
|
+
* // }
|
|
6661
|
+
* }
|
|
6662
|
+
*
|
|
6663
|
+
* main().catch(e => {
|
|
6664
|
+
* console.error(e);
|
|
6665
|
+
* throw e;
|
|
6666
|
+
* });
|
|
6667
|
+
*
|
|
6668
|
+
* ```
|
|
4952
6669
|
*
|
|
4953
6670
|
* @param params - Parameters for request
|
|
4954
6671
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5041,6 +6758,87 @@ export namespace alloydb_v1alpha {
|
|
|
5041
6758
|
|
|
5042
6759
|
/**
|
|
5043
6760
|
* Gets details of a single Instance.
|
|
6761
|
+
* @example
|
|
6762
|
+
* ```js
|
|
6763
|
+
* // Before running the sample:
|
|
6764
|
+
* // - Enable the API at:
|
|
6765
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6766
|
+
* // - Login into gcloud by running:
|
|
6767
|
+
* // ```sh
|
|
6768
|
+
* // $ gcloud auth application-default login
|
|
6769
|
+
* // ```
|
|
6770
|
+
* // - Install the npm module by running:
|
|
6771
|
+
* // ```sh
|
|
6772
|
+
* // $ npm install googleapis
|
|
6773
|
+
* // ```
|
|
6774
|
+
*
|
|
6775
|
+
* const {google} = require('googleapis');
|
|
6776
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6777
|
+
*
|
|
6778
|
+
* async function main() {
|
|
6779
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6780
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6781
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6782
|
+
* });
|
|
6783
|
+
*
|
|
6784
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6785
|
+
* const authClient = await auth.getClient();
|
|
6786
|
+
* google.options({auth: authClient});
|
|
6787
|
+
*
|
|
6788
|
+
* // Do the magic
|
|
6789
|
+
* const res = await alloydb.projects.locations.clusters.instances.get({
|
|
6790
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6791
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6792
|
+
* // The view of the instance to return.
|
|
6793
|
+
* view: 'placeholder-value',
|
|
6794
|
+
* });
|
|
6795
|
+
* console.log(res.data);
|
|
6796
|
+
*
|
|
6797
|
+
* // Example response
|
|
6798
|
+
* // {
|
|
6799
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6800
|
+
* // "annotations": {},
|
|
6801
|
+
* // "availabilityType": "my_availabilityType",
|
|
6802
|
+
* // "clientConnectionConfig": {},
|
|
6803
|
+
* // "connectionPoolConfig": {},
|
|
6804
|
+
* // "createTime": "my_createTime",
|
|
6805
|
+
* // "databaseFlags": {},
|
|
6806
|
+
* // "deleteTime": "my_deleteTime",
|
|
6807
|
+
* // "displayName": "my_displayName",
|
|
6808
|
+
* // "etag": "my_etag",
|
|
6809
|
+
* // "gcaConfig": {},
|
|
6810
|
+
* // "gceZone": "my_gceZone",
|
|
6811
|
+
* // "geminiConfig": {},
|
|
6812
|
+
* // "instanceType": "my_instanceType",
|
|
6813
|
+
* // "ipAddress": "my_ipAddress",
|
|
6814
|
+
* // "labels": {},
|
|
6815
|
+
* // "machineConfig": {},
|
|
6816
|
+
* // "name": "my_name",
|
|
6817
|
+
* // "networkConfig": {},
|
|
6818
|
+
* // "nodes": [],
|
|
6819
|
+
* // "observabilityConfig": {},
|
|
6820
|
+
* // "outboundPublicIpAddresses": [],
|
|
6821
|
+
* // "pscInstanceConfig": {},
|
|
6822
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6823
|
+
* // "queryInsightsConfig": {},
|
|
6824
|
+
* // "readPoolConfig": {},
|
|
6825
|
+
* // "reconciling": false,
|
|
6826
|
+
* // "satisfiesPzi": false,
|
|
6827
|
+
* // "satisfiesPzs": false,
|
|
6828
|
+
* // "state": "my_state",
|
|
6829
|
+
* // "uid": "my_uid",
|
|
6830
|
+
* // "updatePolicy": {},
|
|
6831
|
+
* // "updateTime": "my_updateTime",
|
|
6832
|
+
* // "writableNode": {}
|
|
6833
|
+
* // }
|
|
6834
|
+
* }
|
|
6835
|
+
*
|
|
6836
|
+
* main().catch(e => {
|
|
6837
|
+
* console.error(e);
|
|
6838
|
+
* throw e;
|
|
6839
|
+
* });
|
|
6840
|
+
*
|
|
6841
|
+
* ```
|
|
5044
6842
|
*
|
|
5045
6843
|
* @param params - Parameters for request
|
|
5046
6844
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5130,6 +6928,61 @@ export namespace alloydb_v1alpha {
|
|
|
5130
6928
|
|
|
5131
6929
|
/**
|
|
5132
6930
|
* Get instance metadata used for a connection.
|
|
6931
|
+
* @example
|
|
6932
|
+
* ```js
|
|
6933
|
+
* // Before running the sample:
|
|
6934
|
+
* // - Enable the API at:
|
|
6935
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6936
|
+
* // - Login into gcloud by running:
|
|
6937
|
+
* // ```sh
|
|
6938
|
+
* // $ gcloud auth application-default login
|
|
6939
|
+
* // ```
|
|
6940
|
+
* // - Install the npm module by running:
|
|
6941
|
+
* // ```sh
|
|
6942
|
+
* // $ npm install googleapis
|
|
6943
|
+
* // ```
|
|
6944
|
+
*
|
|
6945
|
+
* const {google} = require('googleapis');
|
|
6946
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6947
|
+
*
|
|
6948
|
+
* async function main() {
|
|
6949
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6950
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6951
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6952
|
+
* });
|
|
6953
|
+
*
|
|
6954
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6955
|
+
* const authClient = await auth.getClient();
|
|
6956
|
+
* google.options({auth: authClient});
|
|
6957
|
+
*
|
|
6958
|
+
* // Do the magic
|
|
6959
|
+
* const res =
|
|
6960
|
+
* await alloydb.projects.locations.clusters.instances.getConnectionInfo({
|
|
6961
|
+
* // Required. The name of the parent resource. The required format is: projects/{project\}/locations/{location\}/clusters/{cluster\}/instances/{instance\}
|
|
6962
|
+
* parent:
|
|
6963
|
+
* 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6964
|
+
* // 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).
|
|
6965
|
+
* requestId: 'placeholder-value',
|
|
6966
|
+
* });
|
|
6967
|
+
* console.log(res.data);
|
|
6968
|
+
*
|
|
6969
|
+
* // Example response
|
|
6970
|
+
* // {
|
|
6971
|
+
* // "instanceUid": "my_instanceUid",
|
|
6972
|
+
* // "ipAddress": "my_ipAddress",
|
|
6973
|
+
* // "name": "my_name",
|
|
6974
|
+
* // "pemCertificateChain": [],
|
|
6975
|
+
* // "pscDnsName": "my_pscDnsName",
|
|
6976
|
+
* // "publicIpAddress": "my_publicIpAddress"
|
|
6977
|
+
* // }
|
|
6978
|
+
* }
|
|
6979
|
+
*
|
|
6980
|
+
* main().catch(e => {
|
|
6981
|
+
* console.error(e);
|
|
6982
|
+
* throw e;
|
|
6983
|
+
* });
|
|
6984
|
+
*
|
|
6985
|
+
* ```
|
|
5133
6986
|
*
|
|
5134
6987
|
* @param params - Parameters for request
|
|
5135
6988
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5224,6 +7077,66 @@ export namespace alloydb_v1alpha {
|
|
|
5224
7077
|
|
|
5225
7078
|
/**
|
|
5226
7079
|
* Injects fault in an instance. Imperative only.
|
|
7080
|
+
* @example
|
|
7081
|
+
* ```js
|
|
7082
|
+
* // Before running the sample:
|
|
7083
|
+
* // - Enable the API at:
|
|
7084
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7085
|
+
* // - Login into gcloud by running:
|
|
7086
|
+
* // ```sh
|
|
7087
|
+
* // $ gcloud auth application-default login
|
|
7088
|
+
* // ```
|
|
7089
|
+
* // - Install the npm module by running:
|
|
7090
|
+
* // ```sh
|
|
7091
|
+
* // $ npm install googleapis
|
|
7092
|
+
* // ```
|
|
7093
|
+
*
|
|
7094
|
+
* const {google} = require('googleapis');
|
|
7095
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7096
|
+
*
|
|
7097
|
+
* async function main() {
|
|
7098
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7099
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7100
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7101
|
+
* });
|
|
7102
|
+
*
|
|
7103
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7104
|
+
* const authClient = await auth.getClient();
|
|
7105
|
+
* google.options({auth: authClient});
|
|
7106
|
+
*
|
|
7107
|
+
* // Do the magic
|
|
7108
|
+
* const res = await alloydb.projects.locations.clusters.instances.injectFault({
|
|
7109
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7110
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7111
|
+
*
|
|
7112
|
+
* // Request body metadata
|
|
7113
|
+
* requestBody: {
|
|
7114
|
+
* // request body parameters
|
|
7115
|
+
* // {
|
|
7116
|
+
* // "faultType": "my_faultType",
|
|
7117
|
+
* // "requestId": "my_requestId",
|
|
7118
|
+
* // "validateOnly": false
|
|
7119
|
+
* // }
|
|
7120
|
+
* },
|
|
7121
|
+
* });
|
|
7122
|
+
* console.log(res.data);
|
|
7123
|
+
*
|
|
7124
|
+
* // Example response
|
|
7125
|
+
* // {
|
|
7126
|
+
* // "done": false,
|
|
7127
|
+
* // "error": {},
|
|
7128
|
+
* // "metadata": {},
|
|
7129
|
+
* // "name": "my_name",
|
|
7130
|
+
* // "response": {}
|
|
7131
|
+
* // }
|
|
7132
|
+
* }
|
|
7133
|
+
*
|
|
7134
|
+
* main().catch(e => {
|
|
7135
|
+
* console.error(e);
|
|
7136
|
+
* throw e;
|
|
7137
|
+
* });
|
|
7138
|
+
*
|
|
7139
|
+
* ```
|
|
5227
7140
|
*
|
|
5228
7141
|
* @param params - Parameters for request
|
|
5229
7142
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5316,6 +7229,62 @@ export namespace alloydb_v1alpha {
|
|
|
5316
7229
|
|
|
5317
7230
|
/**
|
|
5318
7231
|
* Lists Instances in a given project and location.
|
|
7232
|
+
* @example
|
|
7233
|
+
* ```js
|
|
7234
|
+
* // Before running the sample:
|
|
7235
|
+
* // - Enable the API at:
|
|
7236
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7237
|
+
* // - Login into gcloud by running:
|
|
7238
|
+
* // ```sh
|
|
7239
|
+
* // $ gcloud auth application-default login
|
|
7240
|
+
* // ```
|
|
7241
|
+
* // - Install the npm module by running:
|
|
7242
|
+
* // ```sh
|
|
7243
|
+
* // $ npm install googleapis
|
|
7244
|
+
* // ```
|
|
7245
|
+
*
|
|
7246
|
+
* const {google} = require('googleapis');
|
|
7247
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7248
|
+
*
|
|
7249
|
+
* async function main() {
|
|
7250
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7251
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7252
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7253
|
+
* });
|
|
7254
|
+
*
|
|
7255
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7256
|
+
* const authClient = await auth.getClient();
|
|
7257
|
+
* google.options({auth: authClient});
|
|
7258
|
+
*
|
|
7259
|
+
* // Do the magic
|
|
7260
|
+
* const res = await alloydb.projects.locations.clusters.instances.list({
|
|
7261
|
+
* // Optional. Filtering results
|
|
7262
|
+
* filter: 'placeholder-value',
|
|
7263
|
+
* // Optional. Hint for how to order the results
|
|
7264
|
+
* orderBy: 'placeholder-value',
|
|
7265
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
7266
|
+
* pageSize: 'placeholder-value',
|
|
7267
|
+
* // A token identifying a page of results the server should return.
|
|
7268
|
+
* pageToken: 'placeholder-value',
|
|
7269
|
+
* // 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/-
|
|
7270
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
7271
|
+
* });
|
|
7272
|
+
* console.log(res.data);
|
|
7273
|
+
*
|
|
7274
|
+
* // Example response
|
|
7275
|
+
* // {
|
|
7276
|
+
* // "instances": [],
|
|
7277
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
7278
|
+
* // "unreachable": []
|
|
7279
|
+
* // }
|
|
7280
|
+
* }
|
|
7281
|
+
*
|
|
7282
|
+
* main().catch(e => {
|
|
7283
|
+
* console.error(e);
|
|
7284
|
+
* throw e;
|
|
7285
|
+
* });
|
|
7286
|
+
*
|
|
7287
|
+
* ```
|
|
5319
7288
|
*
|
|
5320
7289
|
* @param params - Parameters for request
|
|
5321
7290
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5410,6 +7379,105 @@ export namespace alloydb_v1alpha {
|
|
|
5410
7379
|
|
|
5411
7380
|
/**
|
|
5412
7381
|
* Updates the parameters of a single Instance.
|
|
7382
|
+
* @example
|
|
7383
|
+
* ```js
|
|
7384
|
+
* // Before running the sample:
|
|
7385
|
+
* // - Enable the API at:
|
|
7386
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7387
|
+
* // - Login into gcloud by running:
|
|
7388
|
+
* // ```sh
|
|
7389
|
+
* // $ gcloud auth application-default login
|
|
7390
|
+
* // ```
|
|
7391
|
+
* // - Install the npm module by running:
|
|
7392
|
+
* // ```sh
|
|
7393
|
+
* // $ npm install googleapis
|
|
7394
|
+
* // ```
|
|
7395
|
+
*
|
|
7396
|
+
* const {google} = require('googleapis');
|
|
7397
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7398
|
+
*
|
|
7399
|
+
* async function main() {
|
|
7400
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7401
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7402
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7403
|
+
* });
|
|
7404
|
+
*
|
|
7405
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7406
|
+
* const authClient = await auth.getClient();
|
|
7407
|
+
* google.options({auth: authClient});
|
|
7408
|
+
*
|
|
7409
|
+
* // Do the magic
|
|
7410
|
+
* const res = await alloydb.projects.locations.clusters.instances.patch({
|
|
7411
|
+
* // 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.
|
|
7412
|
+
* allowMissing: 'placeholder-value',
|
|
7413
|
+
* // 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\}
|
|
7414
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7415
|
+
* // 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).
|
|
7416
|
+
* requestId: 'placeholder-value',
|
|
7417
|
+
* // 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.
|
|
7418
|
+
* updateMask: 'placeholder-value',
|
|
7419
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
7420
|
+
* validateOnly: 'placeholder-value',
|
|
7421
|
+
*
|
|
7422
|
+
* // Request body metadata
|
|
7423
|
+
* requestBody: {
|
|
7424
|
+
* // request body parameters
|
|
7425
|
+
* // {
|
|
7426
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
7427
|
+
* // "annotations": {},
|
|
7428
|
+
* // "availabilityType": "my_availabilityType",
|
|
7429
|
+
* // "clientConnectionConfig": {},
|
|
7430
|
+
* // "connectionPoolConfig": {},
|
|
7431
|
+
* // "createTime": "my_createTime",
|
|
7432
|
+
* // "databaseFlags": {},
|
|
7433
|
+
* // "deleteTime": "my_deleteTime",
|
|
7434
|
+
* // "displayName": "my_displayName",
|
|
7435
|
+
* // "etag": "my_etag",
|
|
7436
|
+
* // "gcaConfig": {},
|
|
7437
|
+
* // "gceZone": "my_gceZone",
|
|
7438
|
+
* // "geminiConfig": {},
|
|
7439
|
+
* // "instanceType": "my_instanceType",
|
|
7440
|
+
* // "ipAddress": "my_ipAddress",
|
|
7441
|
+
* // "labels": {},
|
|
7442
|
+
* // "machineConfig": {},
|
|
7443
|
+
* // "name": "my_name",
|
|
7444
|
+
* // "networkConfig": {},
|
|
7445
|
+
* // "nodes": [],
|
|
7446
|
+
* // "observabilityConfig": {},
|
|
7447
|
+
* // "outboundPublicIpAddresses": [],
|
|
7448
|
+
* // "pscInstanceConfig": {},
|
|
7449
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
7450
|
+
* // "queryInsightsConfig": {},
|
|
7451
|
+
* // "readPoolConfig": {},
|
|
7452
|
+
* // "reconciling": false,
|
|
7453
|
+
* // "satisfiesPzi": false,
|
|
7454
|
+
* // "satisfiesPzs": false,
|
|
7455
|
+
* // "state": "my_state",
|
|
7456
|
+
* // "uid": "my_uid",
|
|
7457
|
+
* // "updatePolicy": {},
|
|
7458
|
+
* // "updateTime": "my_updateTime",
|
|
7459
|
+
* // "writableNode": {}
|
|
7460
|
+
* // }
|
|
7461
|
+
* },
|
|
7462
|
+
* });
|
|
7463
|
+
* console.log(res.data);
|
|
7464
|
+
*
|
|
7465
|
+
* // Example response
|
|
7466
|
+
* // {
|
|
7467
|
+
* // "done": false,
|
|
7468
|
+
* // "error": {},
|
|
7469
|
+
* // "metadata": {},
|
|
7470
|
+
* // "name": "my_name",
|
|
7471
|
+
* // "response": {}
|
|
7472
|
+
* // }
|
|
7473
|
+
* }
|
|
7474
|
+
*
|
|
7475
|
+
* main().catch(e => {
|
|
7476
|
+
* console.error(e);
|
|
7477
|
+
* throw e;
|
|
7478
|
+
* });
|
|
7479
|
+
*
|
|
7480
|
+
* ```
|
|
5413
7481
|
*
|
|
5414
7482
|
* @param params - Parameters for request
|
|
5415
7483
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5499,6 +7567,66 @@ export namespace alloydb_v1alpha {
|
|
|
5499
7567
|
|
|
5500
7568
|
/**
|
|
5501
7569
|
* Restart an Instance in a cluster. Imperative only.
|
|
7570
|
+
* @example
|
|
7571
|
+
* ```js
|
|
7572
|
+
* // Before running the sample:
|
|
7573
|
+
* // - Enable the API at:
|
|
7574
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7575
|
+
* // - Login into gcloud by running:
|
|
7576
|
+
* // ```sh
|
|
7577
|
+
* // $ gcloud auth application-default login
|
|
7578
|
+
* // ```
|
|
7579
|
+
* // - Install the npm module by running:
|
|
7580
|
+
* // ```sh
|
|
7581
|
+
* // $ npm install googleapis
|
|
7582
|
+
* // ```
|
|
7583
|
+
*
|
|
7584
|
+
* const {google} = require('googleapis');
|
|
7585
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7586
|
+
*
|
|
7587
|
+
* async function main() {
|
|
7588
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7589
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7590
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7591
|
+
* });
|
|
7592
|
+
*
|
|
7593
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7594
|
+
* const authClient = await auth.getClient();
|
|
7595
|
+
* google.options({auth: authClient});
|
|
7596
|
+
*
|
|
7597
|
+
* // Do the magic
|
|
7598
|
+
* const res = await alloydb.projects.locations.clusters.instances.restart({
|
|
7599
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7600
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7601
|
+
*
|
|
7602
|
+
* // Request body metadata
|
|
7603
|
+
* requestBody: {
|
|
7604
|
+
* // request body parameters
|
|
7605
|
+
* // {
|
|
7606
|
+
* // "nodeIds": [],
|
|
7607
|
+
* // "requestId": "my_requestId",
|
|
7608
|
+
* // "validateOnly": false
|
|
7609
|
+
* // }
|
|
7610
|
+
* },
|
|
7611
|
+
* });
|
|
7612
|
+
* console.log(res.data);
|
|
7613
|
+
*
|
|
7614
|
+
* // Example response
|
|
7615
|
+
* // {
|
|
7616
|
+
* // "done": false,
|
|
7617
|
+
* // "error": {},
|
|
7618
|
+
* // "metadata": {},
|
|
7619
|
+
* // "name": "my_name",
|
|
7620
|
+
* // "response": {}
|
|
7621
|
+
* // }
|
|
7622
|
+
* }
|
|
7623
|
+
*
|
|
7624
|
+
* main().catch(e => {
|
|
7625
|
+
* console.error(e);
|
|
7626
|
+
* throw e;
|
|
7627
|
+
* });
|
|
7628
|
+
*
|
|
7629
|
+
* ```
|
|
5502
7630
|
*
|
|
5503
7631
|
* @param params - Parameters for request
|
|
5504
7632
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5775,6 +7903,74 @@ export namespace alloydb_v1alpha {
|
|
|
5775
7903
|
|
|
5776
7904
|
/**
|
|
5777
7905
|
* Creates a new User in a given project, location, and cluster.
|
|
7906
|
+
* @example
|
|
7907
|
+
* ```js
|
|
7908
|
+
* // Before running the sample:
|
|
7909
|
+
* // - Enable the API at:
|
|
7910
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7911
|
+
* // - Login into gcloud by running:
|
|
7912
|
+
* // ```sh
|
|
7913
|
+
* // $ gcloud auth application-default login
|
|
7914
|
+
* // ```
|
|
7915
|
+
* // - Install the npm module by running:
|
|
7916
|
+
* // ```sh
|
|
7917
|
+
* // $ npm install googleapis
|
|
7918
|
+
* // ```
|
|
7919
|
+
*
|
|
7920
|
+
* const {google} = require('googleapis');
|
|
7921
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7922
|
+
*
|
|
7923
|
+
* async function main() {
|
|
7924
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7925
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7926
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7927
|
+
* });
|
|
7928
|
+
*
|
|
7929
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7930
|
+
* const authClient = await auth.getClient();
|
|
7931
|
+
* google.options({auth: authClient});
|
|
7932
|
+
*
|
|
7933
|
+
* // Do the magic
|
|
7934
|
+
* const res = await alloydb.projects.locations.clusters.users.create({
|
|
7935
|
+
* // Required. Value for parent.
|
|
7936
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
7937
|
+
* // 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).
|
|
7938
|
+
* requestId: 'placeholder-value',
|
|
7939
|
+
* // Required. ID of the requesting object.
|
|
7940
|
+
* userId: 'placeholder-value',
|
|
7941
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
7942
|
+
* validateOnly: 'placeholder-value',
|
|
7943
|
+
*
|
|
7944
|
+
* // Request body metadata
|
|
7945
|
+
* requestBody: {
|
|
7946
|
+
* // request body parameters
|
|
7947
|
+
* // {
|
|
7948
|
+
* // "databaseRoles": [],
|
|
7949
|
+
* // "keepExtraRoles": false,
|
|
7950
|
+
* // "name": "my_name",
|
|
7951
|
+
* // "password": "my_password",
|
|
7952
|
+
* // "userType": "my_userType"
|
|
7953
|
+
* // }
|
|
7954
|
+
* },
|
|
7955
|
+
* });
|
|
7956
|
+
* console.log(res.data);
|
|
7957
|
+
*
|
|
7958
|
+
* // Example response
|
|
7959
|
+
* // {
|
|
7960
|
+
* // "databaseRoles": [],
|
|
7961
|
+
* // "keepExtraRoles": false,
|
|
7962
|
+
* // "name": "my_name",
|
|
7963
|
+
* // "password": "my_password",
|
|
7964
|
+
* // "userType": "my_userType"
|
|
7965
|
+
* // }
|
|
7966
|
+
* }
|
|
7967
|
+
*
|
|
7968
|
+
* main().catch(e => {
|
|
7969
|
+
* console.error(e);
|
|
7970
|
+
* throw e;
|
|
7971
|
+
* });
|
|
7972
|
+
*
|
|
7973
|
+
* ```
|
|
5778
7974
|
*
|
|
5779
7975
|
* @param params - Parameters for request
|
|
5780
7976
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5866,6 +8062,54 @@ export namespace alloydb_v1alpha {
|
|
|
5866
8062
|
|
|
5867
8063
|
/**
|
|
5868
8064
|
* Deletes a single User.
|
|
8065
|
+
* @example
|
|
8066
|
+
* ```js
|
|
8067
|
+
* // Before running the sample:
|
|
8068
|
+
* // - Enable the API at:
|
|
8069
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8070
|
+
* // - Login into gcloud by running:
|
|
8071
|
+
* // ```sh
|
|
8072
|
+
* // $ gcloud auth application-default login
|
|
8073
|
+
* // ```
|
|
8074
|
+
* // - Install the npm module by running:
|
|
8075
|
+
* // ```sh
|
|
8076
|
+
* // $ npm install googleapis
|
|
8077
|
+
* // ```
|
|
8078
|
+
*
|
|
8079
|
+
* const {google} = require('googleapis');
|
|
8080
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8081
|
+
*
|
|
8082
|
+
* async function main() {
|
|
8083
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8084
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8085
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8086
|
+
* });
|
|
8087
|
+
*
|
|
8088
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8089
|
+
* const authClient = await auth.getClient();
|
|
8090
|
+
* google.options({auth: authClient});
|
|
8091
|
+
*
|
|
8092
|
+
* // Do the magic
|
|
8093
|
+
* const res = await alloydb.projects.locations.clusters.users.delete({
|
|
8094
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
8095
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8096
|
+
* // 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).
|
|
8097
|
+
* requestId: 'placeholder-value',
|
|
8098
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8099
|
+
* validateOnly: 'placeholder-value',
|
|
8100
|
+
* });
|
|
8101
|
+
* console.log(res.data);
|
|
8102
|
+
*
|
|
8103
|
+
* // Example response
|
|
8104
|
+
* // {}
|
|
8105
|
+
* }
|
|
8106
|
+
*
|
|
8107
|
+
* main().catch(e => {
|
|
8108
|
+
* console.error(e);
|
|
8109
|
+
* throw e;
|
|
8110
|
+
* });
|
|
8111
|
+
*
|
|
8112
|
+
* ```
|
|
5869
8113
|
*
|
|
5870
8114
|
* @param params - Parameters for request
|
|
5871
8115
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5954,6 +8198,56 @@ export namespace alloydb_v1alpha {
|
|
|
5954
8198
|
|
|
5955
8199
|
/**
|
|
5956
8200
|
* Gets details of a single User.
|
|
8201
|
+
* @example
|
|
8202
|
+
* ```js
|
|
8203
|
+
* // Before running the sample:
|
|
8204
|
+
* // - Enable the API at:
|
|
8205
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8206
|
+
* // - Login into gcloud by running:
|
|
8207
|
+
* // ```sh
|
|
8208
|
+
* // $ gcloud auth application-default login
|
|
8209
|
+
* // ```
|
|
8210
|
+
* // - Install the npm module by running:
|
|
8211
|
+
* // ```sh
|
|
8212
|
+
* // $ npm install googleapis
|
|
8213
|
+
* // ```
|
|
8214
|
+
*
|
|
8215
|
+
* const {google} = require('googleapis');
|
|
8216
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8217
|
+
*
|
|
8218
|
+
* async function main() {
|
|
8219
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8220
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8221
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8222
|
+
* });
|
|
8223
|
+
*
|
|
8224
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8225
|
+
* const authClient = await auth.getClient();
|
|
8226
|
+
* google.options({auth: authClient});
|
|
8227
|
+
*
|
|
8228
|
+
* // Do the magic
|
|
8229
|
+
* const res = await alloydb.projects.locations.clusters.users.get({
|
|
8230
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
8231
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8232
|
+
* });
|
|
8233
|
+
* console.log(res.data);
|
|
8234
|
+
*
|
|
8235
|
+
* // Example response
|
|
8236
|
+
* // {
|
|
8237
|
+
* // "databaseRoles": [],
|
|
8238
|
+
* // "keepExtraRoles": false,
|
|
8239
|
+
* // "name": "my_name",
|
|
8240
|
+
* // "password": "my_password",
|
|
8241
|
+
* // "userType": "my_userType"
|
|
8242
|
+
* // }
|
|
8243
|
+
* }
|
|
8244
|
+
*
|
|
8245
|
+
* main().catch(e => {
|
|
8246
|
+
* console.error(e);
|
|
8247
|
+
* throw e;
|
|
8248
|
+
* });
|
|
8249
|
+
*
|
|
8250
|
+
* ```
|
|
5957
8251
|
*
|
|
5958
8252
|
* @param params - Parameters for request
|
|
5959
8253
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6042,6 +8336,62 @@ export namespace alloydb_v1alpha {
|
|
|
6042
8336
|
|
|
6043
8337
|
/**
|
|
6044
8338
|
* Lists Users in a given project and location.
|
|
8339
|
+
* @example
|
|
8340
|
+
* ```js
|
|
8341
|
+
* // Before running the sample:
|
|
8342
|
+
* // - Enable the API at:
|
|
8343
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8344
|
+
* // - Login into gcloud by running:
|
|
8345
|
+
* // ```sh
|
|
8346
|
+
* // $ gcloud auth application-default login
|
|
8347
|
+
* // ```
|
|
8348
|
+
* // - Install the npm module by running:
|
|
8349
|
+
* // ```sh
|
|
8350
|
+
* // $ npm install googleapis
|
|
8351
|
+
* // ```
|
|
8352
|
+
*
|
|
8353
|
+
* const {google} = require('googleapis');
|
|
8354
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8355
|
+
*
|
|
8356
|
+
* async function main() {
|
|
8357
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8358
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8359
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8360
|
+
* });
|
|
8361
|
+
*
|
|
8362
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8363
|
+
* const authClient = await auth.getClient();
|
|
8364
|
+
* google.options({auth: authClient});
|
|
8365
|
+
*
|
|
8366
|
+
* // Do the magic
|
|
8367
|
+
* const res = await alloydb.projects.locations.clusters.users.list({
|
|
8368
|
+
* // Optional. Filtering results
|
|
8369
|
+
* filter: 'placeholder-value',
|
|
8370
|
+
* // Optional. Hint for how to order the results
|
|
8371
|
+
* orderBy: 'placeholder-value',
|
|
8372
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
8373
|
+
* pageSize: 'placeholder-value',
|
|
8374
|
+
* // Optional. A token identifying a page of results the server should return.
|
|
8375
|
+
* pageToken: 'placeholder-value',
|
|
8376
|
+
* // Required. Parent value for ListUsersRequest
|
|
8377
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
8378
|
+
* });
|
|
8379
|
+
* console.log(res.data);
|
|
8380
|
+
*
|
|
8381
|
+
* // Example response
|
|
8382
|
+
* // {
|
|
8383
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
8384
|
+
* // "unreachable": [],
|
|
8385
|
+
* // "users": []
|
|
8386
|
+
* // }
|
|
8387
|
+
* }
|
|
8388
|
+
*
|
|
8389
|
+
* main().catch(e => {
|
|
8390
|
+
* console.error(e);
|
|
8391
|
+
* throw e;
|
|
8392
|
+
* });
|
|
8393
|
+
*
|
|
8394
|
+
* ```
|
|
6045
8395
|
*
|
|
6046
8396
|
* @param params - Parameters for request
|
|
6047
8397
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6133,6 +8483,76 @@ export namespace alloydb_v1alpha {
|
|
|
6133
8483
|
|
|
6134
8484
|
/**
|
|
6135
8485
|
* Updates the parameters of a single User.
|
|
8486
|
+
* @example
|
|
8487
|
+
* ```js
|
|
8488
|
+
* // Before running the sample:
|
|
8489
|
+
* // - Enable the API at:
|
|
8490
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8491
|
+
* // - Login into gcloud by running:
|
|
8492
|
+
* // ```sh
|
|
8493
|
+
* // $ gcloud auth application-default login
|
|
8494
|
+
* // ```
|
|
8495
|
+
* // - Install the npm module by running:
|
|
8496
|
+
* // ```sh
|
|
8497
|
+
* // $ npm install googleapis
|
|
8498
|
+
* // ```
|
|
8499
|
+
*
|
|
8500
|
+
* const {google} = require('googleapis');
|
|
8501
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8502
|
+
*
|
|
8503
|
+
* async function main() {
|
|
8504
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8505
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8506
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8507
|
+
* });
|
|
8508
|
+
*
|
|
8509
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8510
|
+
* const authClient = await auth.getClient();
|
|
8511
|
+
* google.options({auth: authClient});
|
|
8512
|
+
*
|
|
8513
|
+
* // Do the magic
|
|
8514
|
+
* const res = await alloydb.projects.locations.clusters.users.patch({
|
|
8515
|
+
* // Optional. Allow missing fields in the update mask.
|
|
8516
|
+
* allowMissing: 'placeholder-value',
|
|
8517
|
+
* // Output only. Name of the resource in the form of projects/{project\}/locations/{location\}/cluster/{cluster\}/users/{user\}.
|
|
8518
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8519
|
+
* // 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).
|
|
8520
|
+
* requestId: 'placeholder-value',
|
|
8521
|
+
* // 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.
|
|
8522
|
+
* updateMask: 'placeholder-value',
|
|
8523
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8524
|
+
* validateOnly: 'placeholder-value',
|
|
8525
|
+
*
|
|
8526
|
+
* // Request body metadata
|
|
8527
|
+
* requestBody: {
|
|
8528
|
+
* // request body parameters
|
|
8529
|
+
* // {
|
|
8530
|
+
* // "databaseRoles": [],
|
|
8531
|
+
* // "keepExtraRoles": false,
|
|
8532
|
+
* // "name": "my_name",
|
|
8533
|
+
* // "password": "my_password",
|
|
8534
|
+
* // "userType": "my_userType"
|
|
8535
|
+
* // }
|
|
8536
|
+
* },
|
|
8537
|
+
* });
|
|
8538
|
+
* console.log(res.data);
|
|
8539
|
+
*
|
|
8540
|
+
* // Example response
|
|
8541
|
+
* // {
|
|
8542
|
+
* // "databaseRoles": [],
|
|
8543
|
+
* // "keepExtraRoles": false,
|
|
8544
|
+
* // "name": "my_name",
|
|
8545
|
+
* // "password": "my_password",
|
|
8546
|
+
* // "userType": "my_userType"
|
|
8547
|
+
* // }
|
|
8548
|
+
* }
|
|
8549
|
+
*
|
|
8550
|
+
* main().catch(e => {
|
|
8551
|
+
* console.error(e);
|
|
8552
|
+
* throw e;
|
|
8553
|
+
* });
|
|
8554
|
+
*
|
|
8555
|
+
* ```
|
|
6136
8556
|
*
|
|
6137
8557
|
* @param params - Parameters for request
|
|
6138
8558
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6326,6 +8746,56 @@ export namespace alloydb_v1alpha {
|
|
|
6326
8746
|
|
|
6327
8747
|
/**
|
|
6328
8748
|
* 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`.
|
|
8749
|
+
* @example
|
|
8750
|
+
* ```js
|
|
8751
|
+
* // Before running the sample:
|
|
8752
|
+
* // - Enable the API at:
|
|
8753
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8754
|
+
* // - Login into gcloud by running:
|
|
8755
|
+
* // ```sh
|
|
8756
|
+
* // $ gcloud auth application-default login
|
|
8757
|
+
* // ```
|
|
8758
|
+
* // - Install the npm module by running:
|
|
8759
|
+
* // ```sh
|
|
8760
|
+
* // $ npm install googleapis
|
|
8761
|
+
* // ```
|
|
8762
|
+
*
|
|
8763
|
+
* const {google} = require('googleapis');
|
|
8764
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8765
|
+
*
|
|
8766
|
+
* async function main() {
|
|
8767
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8768
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8769
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8770
|
+
* });
|
|
8771
|
+
*
|
|
8772
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8773
|
+
* const authClient = await auth.getClient();
|
|
8774
|
+
* google.options({auth: authClient});
|
|
8775
|
+
*
|
|
8776
|
+
* // Do the magic
|
|
8777
|
+
* const res = await alloydb.projects.locations.operations.cancel({
|
|
8778
|
+
* // The name of the operation resource to be cancelled.
|
|
8779
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8780
|
+
*
|
|
8781
|
+
* // Request body metadata
|
|
8782
|
+
* requestBody: {
|
|
8783
|
+
* // request body parameters
|
|
8784
|
+
* // {}
|
|
8785
|
+
* },
|
|
8786
|
+
* });
|
|
8787
|
+
* console.log(res.data);
|
|
8788
|
+
*
|
|
8789
|
+
* // Example response
|
|
8790
|
+
* // {}
|
|
8791
|
+
* }
|
|
8792
|
+
*
|
|
8793
|
+
* main().catch(e => {
|
|
8794
|
+
* console.error(e);
|
|
8795
|
+
* throw e;
|
|
8796
|
+
* });
|
|
8797
|
+
*
|
|
8798
|
+
* ```
|
|
6329
8799
|
*
|
|
6330
8800
|
* @param params - Parameters for request
|
|
6331
8801
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6417,6 +8887,50 @@ export namespace alloydb_v1alpha {
|
|
|
6417
8887
|
|
|
6418
8888
|
/**
|
|
6419
8889
|
* 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`.
|
|
8890
|
+
* @example
|
|
8891
|
+
* ```js
|
|
8892
|
+
* // Before running the sample:
|
|
8893
|
+
* // - Enable the API at:
|
|
8894
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8895
|
+
* // - Login into gcloud by running:
|
|
8896
|
+
* // ```sh
|
|
8897
|
+
* // $ gcloud auth application-default login
|
|
8898
|
+
* // ```
|
|
8899
|
+
* // - Install the npm module by running:
|
|
8900
|
+
* // ```sh
|
|
8901
|
+
* // $ npm install googleapis
|
|
8902
|
+
* // ```
|
|
8903
|
+
*
|
|
8904
|
+
* const {google} = require('googleapis');
|
|
8905
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8906
|
+
*
|
|
8907
|
+
* async function main() {
|
|
8908
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8909
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8910
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8911
|
+
* });
|
|
8912
|
+
*
|
|
8913
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8914
|
+
* const authClient = await auth.getClient();
|
|
8915
|
+
* google.options({auth: authClient});
|
|
8916
|
+
*
|
|
8917
|
+
* // Do the magic
|
|
8918
|
+
* const res = await alloydb.projects.locations.operations.delete({
|
|
8919
|
+
* // The name of the operation resource to be deleted.
|
|
8920
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8921
|
+
* });
|
|
8922
|
+
* console.log(res.data);
|
|
8923
|
+
*
|
|
8924
|
+
* // Example response
|
|
8925
|
+
* // {}
|
|
8926
|
+
* }
|
|
8927
|
+
*
|
|
8928
|
+
* main().catch(e => {
|
|
8929
|
+
* console.error(e);
|
|
8930
|
+
* throw e;
|
|
8931
|
+
* });
|
|
8932
|
+
*
|
|
8933
|
+
* ```
|
|
6420
8934
|
*
|
|
6421
8935
|
* @param params - Parameters for request
|
|
6422
8936
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6505,6 +9019,56 @@ export namespace alloydb_v1alpha {
|
|
|
6505
9019
|
|
|
6506
9020
|
/**
|
|
6507
9021
|
* 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.
|
|
9022
|
+
* @example
|
|
9023
|
+
* ```js
|
|
9024
|
+
* // Before running the sample:
|
|
9025
|
+
* // - Enable the API at:
|
|
9026
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9027
|
+
* // - Login into gcloud by running:
|
|
9028
|
+
* // ```sh
|
|
9029
|
+
* // $ gcloud auth application-default login
|
|
9030
|
+
* // ```
|
|
9031
|
+
* // - Install the npm module by running:
|
|
9032
|
+
* // ```sh
|
|
9033
|
+
* // $ npm install googleapis
|
|
9034
|
+
* // ```
|
|
9035
|
+
*
|
|
9036
|
+
* const {google} = require('googleapis');
|
|
9037
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
9038
|
+
*
|
|
9039
|
+
* async function main() {
|
|
9040
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9041
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9042
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9043
|
+
* });
|
|
9044
|
+
*
|
|
9045
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9046
|
+
* const authClient = await auth.getClient();
|
|
9047
|
+
* google.options({auth: authClient});
|
|
9048
|
+
*
|
|
9049
|
+
* // Do the magic
|
|
9050
|
+
* const res = await alloydb.projects.locations.operations.get({
|
|
9051
|
+
* // The name of the operation resource.
|
|
9052
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
9053
|
+
* });
|
|
9054
|
+
* console.log(res.data);
|
|
9055
|
+
*
|
|
9056
|
+
* // Example response
|
|
9057
|
+
* // {
|
|
9058
|
+
* // "done": false,
|
|
9059
|
+
* // "error": {},
|
|
9060
|
+
* // "metadata": {},
|
|
9061
|
+
* // "name": "my_name",
|
|
9062
|
+
* // "response": {}
|
|
9063
|
+
* // }
|
|
9064
|
+
* }
|
|
9065
|
+
*
|
|
9066
|
+
* main().catch(e => {
|
|
9067
|
+
* console.error(e);
|
|
9068
|
+
* throw e;
|
|
9069
|
+
* });
|
|
9070
|
+
*
|
|
9071
|
+
* ```
|
|
6508
9072
|
*
|
|
6509
9073
|
* @param params - Parameters for request
|
|
6510
9074
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6593,6 +9157,59 @@ export namespace alloydb_v1alpha {
|
|
|
6593
9157
|
|
|
6594
9158
|
/**
|
|
6595
9159
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
9160
|
+
* @example
|
|
9161
|
+
* ```js
|
|
9162
|
+
* // Before running the sample:
|
|
9163
|
+
* // - Enable the API at:
|
|
9164
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9165
|
+
* // - Login into gcloud by running:
|
|
9166
|
+
* // ```sh
|
|
9167
|
+
* // $ gcloud auth application-default login
|
|
9168
|
+
* // ```
|
|
9169
|
+
* // - Install the npm module by running:
|
|
9170
|
+
* // ```sh
|
|
9171
|
+
* // $ npm install googleapis
|
|
9172
|
+
* // ```
|
|
9173
|
+
*
|
|
9174
|
+
* const {google} = require('googleapis');
|
|
9175
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
9176
|
+
*
|
|
9177
|
+
* async function main() {
|
|
9178
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9179
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9180
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9181
|
+
* });
|
|
9182
|
+
*
|
|
9183
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9184
|
+
* const authClient = await auth.getClient();
|
|
9185
|
+
* google.options({auth: authClient});
|
|
9186
|
+
*
|
|
9187
|
+
* // Do the magic
|
|
9188
|
+
* const res = await alloydb.projects.locations.operations.list({
|
|
9189
|
+
* // The standard list filter.
|
|
9190
|
+
* filter: 'placeholder-value',
|
|
9191
|
+
* // The name of the operation's parent resource.
|
|
9192
|
+
* name: 'projects/my-project/locations/my-location',
|
|
9193
|
+
* // The standard list page size.
|
|
9194
|
+
* pageSize: 'placeholder-value',
|
|
9195
|
+
* // The standard list page token.
|
|
9196
|
+
* pageToken: 'placeholder-value',
|
|
9197
|
+
* });
|
|
9198
|
+
* console.log(res.data);
|
|
9199
|
+
*
|
|
9200
|
+
* // Example response
|
|
9201
|
+
* // {
|
|
9202
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9203
|
+
* // "operations": []
|
|
9204
|
+
* // }
|
|
9205
|
+
* }
|
|
9206
|
+
*
|
|
9207
|
+
* main().catch(e => {
|
|
9208
|
+
* console.error(e);
|
|
9209
|
+
* throw e;
|
|
9210
|
+
* });
|
|
9211
|
+
*
|
|
9212
|
+
* ```
|
|
6596
9213
|
*
|
|
6597
9214
|
* @param params - Parameters for request
|
|
6598
9215
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6739,6 +9356,59 @@ export namespace alloydb_v1alpha {
|
|
|
6739
9356
|
|
|
6740
9357
|
/**
|
|
6741
9358
|
* Lists SupportedDatabaseFlags for a given project and location.
|
|
9359
|
+
* @example
|
|
9360
|
+
* ```js
|
|
9361
|
+
* // Before running the sample:
|
|
9362
|
+
* // - Enable the API at:
|
|
9363
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9364
|
+
* // - Login into gcloud by running:
|
|
9365
|
+
* // ```sh
|
|
9366
|
+
* // $ gcloud auth application-default login
|
|
9367
|
+
* // ```
|
|
9368
|
+
* // - Install the npm module by running:
|
|
9369
|
+
* // ```sh
|
|
9370
|
+
* // $ npm install googleapis
|
|
9371
|
+
* // ```
|
|
9372
|
+
*
|
|
9373
|
+
* const {google} = require('googleapis');
|
|
9374
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
9375
|
+
*
|
|
9376
|
+
* async function main() {
|
|
9377
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9378
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9379
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9380
|
+
* });
|
|
9381
|
+
*
|
|
9382
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9383
|
+
* const authClient = await auth.getClient();
|
|
9384
|
+
* google.options({auth: authClient});
|
|
9385
|
+
*
|
|
9386
|
+
* // Do the magic
|
|
9387
|
+
* const res = await alloydb.projects.locations.supportedDatabaseFlags.list({
|
|
9388
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
9389
|
+
* pageSize: 'placeholder-value',
|
|
9390
|
+
* // A token identifying a page of results the server should return.
|
|
9391
|
+
* pageToken: 'placeholder-value',
|
|
9392
|
+
* // 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.
|
|
9393
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
9394
|
+
* // Optional. The scope for which supported flags are requested. If not specified, default is DATABASE.
|
|
9395
|
+
* scope: 'placeholder-value',
|
|
9396
|
+
* });
|
|
9397
|
+
* console.log(res.data);
|
|
9398
|
+
*
|
|
9399
|
+
* // Example response
|
|
9400
|
+
* // {
|
|
9401
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9402
|
+
* // "supportedDatabaseFlags": []
|
|
9403
|
+
* // }
|
|
9404
|
+
* }
|
|
9405
|
+
*
|
|
9406
|
+
* main().catch(e => {
|
|
9407
|
+
* console.error(e);
|
|
9408
|
+
* throw e;
|
|
9409
|
+
* });
|
|
9410
|
+
*
|
|
9411
|
+
* ```
|
|
6742
9412
|
*
|
|
6743
9413
|
* @param params - Parameters for request
|
|
6744
9414
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|