@googleapis/alloydb 13.0.1 → 14.1.0
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 +31 -0
- package/build/v1.d.ts +2702 -6
- package/build/v1.js.map +1 -1
- package/build/v1alpha.d.ts +2757 -16
- package/build/v1alpha.js.map +1 -1
- package/build/v1beta.d.ts +2745 -17
- package/build/v1beta.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +2702 -6
- package/v1alpha.ts +2757 -16
- package/v1beta.ts +2745 -17
package/v1.ts
CHANGED
|
@@ -541,7 +541,7 @@ export namespace alloydb_v1 {
|
|
|
541
541
|
*/
|
|
542
542
|
export interface Schema$ContinuousBackupInfo {
|
|
543
543
|
/**
|
|
544
|
-
* Output only. The earliest restorable time that can be restored to.
|
|
544
|
+
* Output only. The earliest restorable time that can be restored to. If continuous backups and recovery was recently enabled, the earliest restorable time is the creation time of the earliest eligible backup within this cluster's continuous backup recovery window. After a cluster has had continuous backups enabled for the duration of its recovery window, the earliest restorable time becomes "now minus the recovery window". For example, assuming a point in time recovery is attempted at 04/16/2025 3:23:00PM with a 14d recovery window, the earliest restorable time would be 04/02/2025 3:23:00PM. This field is only visible if the CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided.
|
|
545
545
|
*/
|
|
546
546
|
earliestRestorableTime?: string | null;
|
|
547
547
|
/**
|
|
@@ -553,7 +553,7 @@ export namespace alloydb_v1 {
|
|
|
553
553
|
*/
|
|
554
554
|
encryptionInfo?: Schema$EncryptionInfo;
|
|
555
555
|
/**
|
|
556
|
-
* Output only. Days of the week on which a continuous backup is taken.
|
|
556
|
+
* Output only. Days of the week on which a continuous backup is taken.
|
|
557
557
|
*/
|
|
558
558
|
schedule?: string[] | null;
|
|
559
559
|
}
|
|
@@ -963,6 +963,10 @@ export namespace alloydb_v1 {
|
|
|
963
963
|
* Metadata related to instance-level network configuration.
|
|
964
964
|
*/
|
|
965
965
|
export interface Schema$InstanceNetworkConfig {
|
|
966
|
+
/**
|
|
967
|
+
* 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])?.
|
|
968
|
+
*/
|
|
969
|
+
allocatedIpRangeOverride?: string | null;
|
|
966
970
|
/**
|
|
967
971
|
* Optional. A list of external network authorized to access this instance.
|
|
968
972
|
*/
|
|
@@ -981,7 +985,7 @@ export namespace alloydb_v1 {
|
|
|
981
985
|
network?: string | null;
|
|
982
986
|
}
|
|
983
987
|
/**
|
|
984
|
-
* Details regarding the upgrade of
|
|
988
|
+
* Details regarding the upgrade of instances associated with a cluster.
|
|
985
989
|
*/
|
|
986
990
|
export interface Schema$InstanceUpgradeDetails {
|
|
987
991
|
/**
|
|
@@ -1585,6 +1589,27 @@ export namespace alloydb_v1 {
|
|
|
1585
1589
|
*/
|
|
1586
1590
|
status?: string | null;
|
|
1587
1591
|
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Timing information for the stage execution.
|
|
1594
|
+
*/
|
|
1595
|
+
export interface Schema$StageSchedule {
|
|
1596
|
+
/**
|
|
1597
|
+
* Actual end time of the stage. Set only if the stage has completed.
|
|
1598
|
+
*/
|
|
1599
|
+
actualEndTime?: string | null;
|
|
1600
|
+
/**
|
|
1601
|
+
* Actual start time of the stage. Set only if the stage has started.
|
|
1602
|
+
*/
|
|
1603
|
+
actualStartTime?: string | null;
|
|
1604
|
+
/**
|
|
1605
|
+
* When the stage is expected to end. Set only if the stage has not completed yet.
|
|
1606
|
+
*/
|
|
1607
|
+
estimatedEndTime?: string | null;
|
|
1608
|
+
/**
|
|
1609
|
+
* When the stage is expected to start. Set only if the stage has not started yet.
|
|
1610
|
+
*/
|
|
1611
|
+
estimatedStartTime?: string | null;
|
|
1612
|
+
}
|
|
1588
1613
|
/**
|
|
1589
1614
|
* Status of an upgrade stage.
|
|
1590
1615
|
*/
|
|
@@ -1593,6 +1618,10 @@ export namespace alloydb_v1 {
|
|
|
1593
1618
|
* Read pool instances upgrade metadata.
|
|
1594
1619
|
*/
|
|
1595
1620
|
readPoolInstancesUpgrade?: Schema$ReadPoolInstancesUpgradeStageStatus;
|
|
1621
|
+
/**
|
|
1622
|
+
* Output only. Timing information for the stage execution.
|
|
1623
|
+
*/
|
|
1624
|
+
schedule?: Schema$StageSchedule;
|
|
1596
1625
|
/**
|
|
1597
1626
|
* Upgrade stage.
|
|
1598
1627
|
*/
|
|
@@ -1676,6 +1705,15 @@ export namespace alloydb_v1 {
|
|
|
1676
1705
|
*/
|
|
1677
1706
|
pointInTimeRecoveryEnabled?: boolean | null;
|
|
1678
1707
|
}
|
|
1708
|
+
/**
|
|
1709
|
+
* BackupDRConfiguration to capture the backup and disaster recovery details of database resource.
|
|
1710
|
+
*/
|
|
1711
|
+
export interface Schema$StorageDatabasecenterPartnerapiV1mainBackupDRConfiguration {
|
|
1712
|
+
/**
|
|
1713
|
+
* Indicates if the resource is managed by BackupDR.
|
|
1714
|
+
*/
|
|
1715
|
+
backupdrManaged?: boolean | null;
|
|
1716
|
+
}
|
|
1679
1717
|
/**
|
|
1680
1718
|
* A backup run.
|
|
1681
1719
|
*/
|
|
@@ -1710,6 +1748,31 @@ export namespace alloydb_v1 {
|
|
|
1710
1748
|
*/
|
|
1711
1749
|
version?: string | null;
|
|
1712
1750
|
}
|
|
1751
|
+
/**
|
|
1752
|
+
* Config based signal data. This is used to send signals to Condor which are based on the DB level configurations. These will be used to send signals for self managed databases.
|
|
1753
|
+
*/
|
|
1754
|
+
export interface Schema$StorageDatabasecenterPartnerapiV1mainConfigBasedSignalData {
|
|
1755
|
+
/**
|
|
1756
|
+
* Required. Full Resource name of the source resource.
|
|
1757
|
+
*/
|
|
1758
|
+
fullResourceName?: string | null;
|
|
1759
|
+
/**
|
|
1760
|
+
* Required. Last time signal was refreshed
|
|
1761
|
+
*/
|
|
1762
|
+
lastRefreshTime?: string | null;
|
|
1763
|
+
/**
|
|
1764
|
+
* Database resource id.
|
|
1765
|
+
*/
|
|
1766
|
+
resourceId?: Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceId;
|
|
1767
|
+
/**
|
|
1768
|
+
* Signal data for boolean signals.
|
|
1769
|
+
*/
|
|
1770
|
+
signalBoolValue?: boolean | null;
|
|
1771
|
+
/**
|
|
1772
|
+
* Required. Signal type of the signal
|
|
1773
|
+
*/
|
|
1774
|
+
signalType?: string | null;
|
|
1775
|
+
}
|
|
1713
1776
|
/**
|
|
1714
1777
|
* Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data
|
|
1715
1778
|
*/
|
|
@@ -1720,9 +1783,13 @@ export namespace alloydb_v1 {
|
|
|
1720
1783
|
internalResourceMetadata?: Schema$StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata[];
|
|
1721
1784
|
}
|
|
1722
1785
|
/**
|
|
1723
|
-
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.
|
|
1786
|
+
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 9
|
|
1724
1787
|
*/
|
|
1725
1788
|
export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed {
|
|
1789
|
+
/**
|
|
1790
|
+
* Config based signal data is used to ingest signals that are generated based on the configuration of the database resource.
|
|
1791
|
+
*/
|
|
1792
|
+
configBasedSignalData?: Schema$StorageDatabasecenterPartnerapiV1mainConfigBasedSignalData;
|
|
1726
1793
|
/**
|
|
1727
1794
|
* Required. Timestamp when feed is generated.
|
|
1728
1795
|
*/
|
|
@@ -1764,6 +1831,10 @@ export namespace alloydb_v1 {
|
|
|
1764
1831
|
* 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.
|
|
1765
1832
|
*/
|
|
1766
1833
|
externalUri?: string | null;
|
|
1834
|
+
/**
|
|
1835
|
+
* This is used to identify the location of the resource. Example: "us-central1"
|
|
1836
|
+
*/
|
|
1837
|
+
location?: string | null;
|
|
1767
1838
|
/**
|
|
1768
1839
|
* Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.
|
|
1769
1840
|
*/
|
|
@@ -1811,7 +1882,7 @@ export namespace alloydb_v1 {
|
|
|
1811
1882
|
*/
|
|
1812
1883
|
providerDescription?: string | null;
|
|
1813
1884
|
/**
|
|
1814
|
-
* Required. The type of resource this ID is identifying. Ex
|
|
1885
|
+
* 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
|
|
1815
1886
|
*/
|
|
1816
1887
|
resourceType?: string | null;
|
|
1817
1888
|
/**
|
|
@@ -1820,7 +1891,7 @@ export namespace alloydb_v1 {
|
|
|
1820
1891
|
uniqueId?: string | null;
|
|
1821
1892
|
}
|
|
1822
1893
|
/**
|
|
1823
|
-
* Common model for database resource instance metadata. Next ID:
|
|
1894
|
+
* Common model for database resource instance metadata. Next ID: 26
|
|
1824
1895
|
*/
|
|
1825
1896
|
export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata {
|
|
1826
1897
|
/**
|
|
@@ -1831,6 +1902,10 @@ export namespace alloydb_v1 {
|
|
|
1831
1902
|
* Backup configuration for this instance
|
|
1832
1903
|
*/
|
|
1833
1904
|
backupConfiguration?: Schema$StorageDatabasecenterPartnerapiV1mainBackupConfiguration;
|
|
1905
|
+
/**
|
|
1906
|
+
* Optional. BackupDR Configuration for the resource.
|
|
1907
|
+
*/
|
|
1908
|
+
backupdrConfiguration?: Schema$StorageDatabasecenterPartnerapiV1mainBackupDRConfiguration;
|
|
1834
1909
|
/**
|
|
1835
1910
|
* Latest backup run information for this instance
|
|
1836
1911
|
*/
|
|
@@ -2094,6 +2169,10 @@ export namespace alloydb_v1 {
|
|
|
2094
2169
|
* The specific engine that the underlying database is running.
|
|
2095
2170
|
*/
|
|
2096
2171
|
engine?: string | null;
|
|
2172
|
+
/**
|
|
2173
|
+
* Minor version of the underlying database engine. Example values: For MySQL, it could be "8.0.32", "5.7.32" etc.. For Postgres, it could be "14.3", "15.3" etc..
|
|
2174
|
+
*/
|
|
2175
|
+
minorVersion?: string | null;
|
|
2097
2176
|
/**
|
|
2098
2177
|
* Type of specific database product. It could be CloudSQL, AlloyDB etc..
|
|
2099
2178
|
*/
|
|
@@ -2365,6 +2444,56 @@ export namespace alloydb_v1 {
|
|
|
2365
2444
|
|
|
2366
2445
|
/**
|
|
2367
2446
|
* Gets information about a location.
|
|
2447
|
+
* @example
|
|
2448
|
+
* ```js
|
|
2449
|
+
* // Before running the sample:
|
|
2450
|
+
* // - Enable the API at:
|
|
2451
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2452
|
+
* // - Login into gcloud by running:
|
|
2453
|
+
* // ```sh
|
|
2454
|
+
* // $ gcloud auth application-default login
|
|
2455
|
+
* // ```
|
|
2456
|
+
* // - Install the npm module by running:
|
|
2457
|
+
* // ```sh
|
|
2458
|
+
* // $ npm install googleapis
|
|
2459
|
+
* // ```
|
|
2460
|
+
*
|
|
2461
|
+
* const {google} = require('googleapis');
|
|
2462
|
+
* const alloydb = google.alloydb('v1');
|
|
2463
|
+
*
|
|
2464
|
+
* async function main() {
|
|
2465
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2466
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2467
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2468
|
+
* });
|
|
2469
|
+
*
|
|
2470
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2471
|
+
* const authClient = await auth.getClient();
|
|
2472
|
+
* google.options({auth: authClient});
|
|
2473
|
+
*
|
|
2474
|
+
* // Do the magic
|
|
2475
|
+
* const res = await alloydb.projects.locations.get({
|
|
2476
|
+
* // Resource name for the location.
|
|
2477
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2478
|
+
* });
|
|
2479
|
+
* console.log(res.data);
|
|
2480
|
+
*
|
|
2481
|
+
* // Example response
|
|
2482
|
+
* // {
|
|
2483
|
+
* // "displayName": "my_displayName",
|
|
2484
|
+
* // "labels": {},
|
|
2485
|
+
* // "locationId": "my_locationId",
|
|
2486
|
+
* // "metadata": {},
|
|
2487
|
+
* // "name": "my_name"
|
|
2488
|
+
* // }
|
|
2489
|
+
* }
|
|
2490
|
+
*
|
|
2491
|
+
* main().catch(e => {
|
|
2492
|
+
* console.error(e);
|
|
2493
|
+
* throw e;
|
|
2494
|
+
* });
|
|
2495
|
+
*
|
|
2496
|
+
* ```
|
|
2368
2497
|
*
|
|
2369
2498
|
* @param params - Parameters for request
|
|
2370
2499
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2457,6 +2586,61 @@ export namespace alloydb_v1 {
|
|
|
2457
2586
|
|
|
2458
2587
|
/**
|
|
2459
2588
|
* Lists information about the supported locations for this service.
|
|
2589
|
+
* @example
|
|
2590
|
+
* ```js
|
|
2591
|
+
* // Before running the sample:
|
|
2592
|
+
* // - Enable the API at:
|
|
2593
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2594
|
+
* // - Login into gcloud by running:
|
|
2595
|
+
* // ```sh
|
|
2596
|
+
* // $ gcloud auth application-default login
|
|
2597
|
+
* // ```
|
|
2598
|
+
* // - Install the npm module by running:
|
|
2599
|
+
* // ```sh
|
|
2600
|
+
* // $ npm install googleapis
|
|
2601
|
+
* // ```
|
|
2602
|
+
*
|
|
2603
|
+
* const {google} = require('googleapis');
|
|
2604
|
+
* const alloydb = google.alloydb('v1');
|
|
2605
|
+
*
|
|
2606
|
+
* async function main() {
|
|
2607
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2608
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2609
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2610
|
+
* });
|
|
2611
|
+
*
|
|
2612
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2613
|
+
* const authClient = await auth.getClient();
|
|
2614
|
+
* google.options({auth: authClient});
|
|
2615
|
+
*
|
|
2616
|
+
* // Do the magic
|
|
2617
|
+
* const res = await alloydb.projects.locations.list({
|
|
2618
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
2619
|
+
* extraLocationTypes: 'placeholder-value',
|
|
2620
|
+
* // 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).
|
|
2621
|
+
* filter: 'placeholder-value',
|
|
2622
|
+
* // The resource that owns the locations collection, if applicable.
|
|
2623
|
+
* name: 'projects/my-project',
|
|
2624
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
2625
|
+
* pageSize: 'placeholder-value',
|
|
2626
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
2627
|
+
* pageToken: 'placeholder-value',
|
|
2628
|
+
* });
|
|
2629
|
+
* console.log(res.data);
|
|
2630
|
+
*
|
|
2631
|
+
* // Example response
|
|
2632
|
+
* // {
|
|
2633
|
+
* // "locations": [],
|
|
2634
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
2635
|
+
* // }
|
|
2636
|
+
* }
|
|
2637
|
+
*
|
|
2638
|
+
* main().catch(e => {
|
|
2639
|
+
* console.error(e);
|
|
2640
|
+
* throw e;
|
|
2641
|
+
* });
|
|
2642
|
+
*
|
|
2643
|
+
* ```
|
|
2460
2644
|
*
|
|
2461
2645
|
* @param params - Parameters for request
|
|
2462
2646
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2596,6 +2780,93 @@ export namespace alloydb_v1 {
|
|
|
2596
2780
|
|
|
2597
2781
|
/**
|
|
2598
2782
|
* Creates a new Backup in a given project and location.
|
|
2783
|
+
* @example
|
|
2784
|
+
* ```js
|
|
2785
|
+
* // Before running the sample:
|
|
2786
|
+
* // - Enable the API at:
|
|
2787
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2788
|
+
* // - Login into gcloud by running:
|
|
2789
|
+
* // ```sh
|
|
2790
|
+
* // $ gcloud auth application-default login
|
|
2791
|
+
* // ```
|
|
2792
|
+
* // - Install the npm module by running:
|
|
2793
|
+
* // ```sh
|
|
2794
|
+
* // $ npm install googleapis
|
|
2795
|
+
* // ```
|
|
2796
|
+
*
|
|
2797
|
+
* const {google} = require('googleapis');
|
|
2798
|
+
* const alloydb = google.alloydb('v1');
|
|
2799
|
+
*
|
|
2800
|
+
* async function main() {
|
|
2801
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2802
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2803
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2804
|
+
* });
|
|
2805
|
+
*
|
|
2806
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2807
|
+
* const authClient = await auth.getClient();
|
|
2808
|
+
* google.options({auth: authClient});
|
|
2809
|
+
*
|
|
2810
|
+
* // Do the magic
|
|
2811
|
+
* const res = await alloydb.projects.locations.backups.create({
|
|
2812
|
+
* // Required. ID of the requesting object.
|
|
2813
|
+
* backupId: 'placeholder-value',
|
|
2814
|
+
* // Required. Value for parent.
|
|
2815
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2816
|
+
* // 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).
|
|
2817
|
+
* requestId: 'placeholder-value',
|
|
2818
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2819
|
+
* validateOnly: 'placeholder-value',
|
|
2820
|
+
*
|
|
2821
|
+
* // Request body metadata
|
|
2822
|
+
* requestBody: {
|
|
2823
|
+
* // request body parameters
|
|
2824
|
+
* // {
|
|
2825
|
+
* // "annotations": {},
|
|
2826
|
+
* // "clusterName": "my_clusterName",
|
|
2827
|
+
* // "clusterUid": "my_clusterUid",
|
|
2828
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
2829
|
+
* // "createTime": "my_createTime",
|
|
2830
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
2831
|
+
* // "deleteTime": "my_deleteTime",
|
|
2832
|
+
* // "description": "my_description",
|
|
2833
|
+
* // "displayName": "my_displayName",
|
|
2834
|
+
* // "encryptionConfig": {},
|
|
2835
|
+
* // "encryptionInfo": {},
|
|
2836
|
+
* // "etag": "my_etag",
|
|
2837
|
+
* // "expiryQuantity": {},
|
|
2838
|
+
* // "expiryTime": "my_expiryTime",
|
|
2839
|
+
* // "labels": {},
|
|
2840
|
+
* // "name": "my_name",
|
|
2841
|
+
* // "reconciling": false,
|
|
2842
|
+
* // "satisfiesPzs": false,
|
|
2843
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
2844
|
+
* // "state": "my_state",
|
|
2845
|
+
* // "tags": {},
|
|
2846
|
+
* // "type": "my_type",
|
|
2847
|
+
* // "uid": "my_uid",
|
|
2848
|
+
* // "updateTime": "my_updateTime"
|
|
2849
|
+
* // }
|
|
2850
|
+
* },
|
|
2851
|
+
* });
|
|
2852
|
+
* console.log(res.data);
|
|
2853
|
+
*
|
|
2854
|
+
* // Example response
|
|
2855
|
+
* // {
|
|
2856
|
+
* // "done": false,
|
|
2857
|
+
* // "error": {},
|
|
2858
|
+
* // "metadata": {},
|
|
2859
|
+
* // "name": "my_name",
|
|
2860
|
+
* // "response": {}
|
|
2861
|
+
* // }
|
|
2862
|
+
* }
|
|
2863
|
+
*
|
|
2864
|
+
* main().catch(e => {
|
|
2865
|
+
* console.error(e);
|
|
2866
|
+
* throw e;
|
|
2867
|
+
* });
|
|
2868
|
+
*
|
|
2869
|
+
* ```
|
|
2599
2870
|
*
|
|
2600
2871
|
* @param params - Parameters for request
|
|
2601
2872
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2687,6 +2958,62 @@ export namespace alloydb_v1 {
|
|
|
2687
2958
|
|
|
2688
2959
|
/**
|
|
2689
2960
|
* Deletes a single Backup.
|
|
2961
|
+
* @example
|
|
2962
|
+
* ```js
|
|
2963
|
+
* // Before running the sample:
|
|
2964
|
+
* // - Enable the API at:
|
|
2965
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2966
|
+
* // - Login into gcloud by running:
|
|
2967
|
+
* // ```sh
|
|
2968
|
+
* // $ gcloud auth application-default login
|
|
2969
|
+
* // ```
|
|
2970
|
+
* // - Install the npm module by running:
|
|
2971
|
+
* // ```sh
|
|
2972
|
+
* // $ npm install googleapis
|
|
2973
|
+
* // ```
|
|
2974
|
+
*
|
|
2975
|
+
* const {google} = require('googleapis');
|
|
2976
|
+
* const alloydb = google.alloydb('v1');
|
|
2977
|
+
*
|
|
2978
|
+
* async function main() {
|
|
2979
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2980
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2981
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2982
|
+
* });
|
|
2983
|
+
*
|
|
2984
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2985
|
+
* const authClient = await auth.getClient();
|
|
2986
|
+
* google.options({auth: authClient});
|
|
2987
|
+
*
|
|
2988
|
+
* // Do the magic
|
|
2989
|
+
* const res = await alloydb.projects.locations.backups.delete({
|
|
2990
|
+
* // 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.
|
|
2991
|
+
* etag: 'placeholder-value',
|
|
2992
|
+
* // Required. Name of the resource. For the required format, see the comment on the Backup.name field.
|
|
2993
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
2994
|
+
* // 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).
|
|
2995
|
+
* requestId: 'placeholder-value',
|
|
2996
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2997
|
+
* validateOnly: 'placeholder-value',
|
|
2998
|
+
* });
|
|
2999
|
+
* console.log(res.data);
|
|
3000
|
+
*
|
|
3001
|
+
* // Example response
|
|
3002
|
+
* // {
|
|
3003
|
+
* // "done": false,
|
|
3004
|
+
* // "error": {},
|
|
3005
|
+
* // "metadata": {},
|
|
3006
|
+
* // "name": "my_name",
|
|
3007
|
+
* // "response": {}
|
|
3008
|
+
* // }
|
|
3009
|
+
* }
|
|
3010
|
+
*
|
|
3011
|
+
* main().catch(e => {
|
|
3012
|
+
* console.error(e);
|
|
3013
|
+
* throw e;
|
|
3014
|
+
* });
|
|
3015
|
+
*
|
|
3016
|
+
* ```
|
|
2690
3017
|
*
|
|
2691
3018
|
* @param params - Parameters for request
|
|
2692
3019
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2775,6 +3102,75 @@ export namespace alloydb_v1 {
|
|
|
2775
3102
|
|
|
2776
3103
|
/**
|
|
2777
3104
|
* Gets details of a single Backup.
|
|
3105
|
+
* @example
|
|
3106
|
+
* ```js
|
|
3107
|
+
* // Before running the sample:
|
|
3108
|
+
* // - Enable the API at:
|
|
3109
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3110
|
+
* // - Login into gcloud by running:
|
|
3111
|
+
* // ```sh
|
|
3112
|
+
* // $ gcloud auth application-default login
|
|
3113
|
+
* // ```
|
|
3114
|
+
* // - Install the npm module by running:
|
|
3115
|
+
* // ```sh
|
|
3116
|
+
* // $ npm install googleapis
|
|
3117
|
+
* // ```
|
|
3118
|
+
*
|
|
3119
|
+
* const {google} = require('googleapis');
|
|
3120
|
+
* const alloydb = google.alloydb('v1');
|
|
3121
|
+
*
|
|
3122
|
+
* async function main() {
|
|
3123
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3124
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3125
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3126
|
+
* });
|
|
3127
|
+
*
|
|
3128
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3129
|
+
* const authClient = await auth.getClient();
|
|
3130
|
+
* google.options({auth: authClient});
|
|
3131
|
+
*
|
|
3132
|
+
* // Do the magic
|
|
3133
|
+
* const res = await alloydb.projects.locations.backups.get({
|
|
3134
|
+
* // Required. Name of the resource
|
|
3135
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3136
|
+
* });
|
|
3137
|
+
* console.log(res.data);
|
|
3138
|
+
*
|
|
3139
|
+
* // Example response
|
|
3140
|
+
* // {
|
|
3141
|
+
* // "annotations": {},
|
|
3142
|
+
* // "clusterName": "my_clusterName",
|
|
3143
|
+
* // "clusterUid": "my_clusterUid",
|
|
3144
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3145
|
+
* // "createTime": "my_createTime",
|
|
3146
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3147
|
+
* // "deleteTime": "my_deleteTime",
|
|
3148
|
+
* // "description": "my_description",
|
|
3149
|
+
* // "displayName": "my_displayName",
|
|
3150
|
+
* // "encryptionConfig": {},
|
|
3151
|
+
* // "encryptionInfo": {},
|
|
3152
|
+
* // "etag": "my_etag",
|
|
3153
|
+
* // "expiryQuantity": {},
|
|
3154
|
+
* // "expiryTime": "my_expiryTime",
|
|
3155
|
+
* // "labels": {},
|
|
3156
|
+
* // "name": "my_name",
|
|
3157
|
+
* // "reconciling": false,
|
|
3158
|
+
* // "satisfiesPzs": false,
|
|
3159
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3160
|
+
* // "state": "my_state",
|
|
3161
|
+
* // "tags": {},
|
|
3162
|
+
* // "type": "my_type",
|
|
3163
|
+
* // "uid": "my_uid",
|
|
3164
|
+
* // "updateTime": "my_updateTime"
|
|
3165
|
+
* // }
|
|
3166
|
+
* }
|
|
3167
|
+
*
|
|
3168
|
+
* main().catch(e => {
|
|
3169
|
+
* console.error(e);
|
|
3170
|
+
* throw e;
|
|
3171
|
+
* });
|
|
3172
|
+
*
|
|
3173
|
+
* ```
|
|
2778
3174
|
*
|
|
2779
3175
|
* @param params - Parameters for request
|
|
2780
3176
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2863,6 +3259,62 @@ export namespace alloydb_v1 {
|
|
|
2863
3259
|
|
|
2864
3260
|
/**
|
|
2865
3261
|
* Lists Backups in a given project and location.
|
|
3262
|
+
* @example
|
|
3263
|
+
* ```js
|
|
3264
|
+
* // Before running the sample:
|
|
3265
|
+
* // - Enable the API at:
|
|
3266
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3267
|
+
* // - Login into gcloud by running:
|
|
3268
|
+
* // ```sh
|
|
3269
|
+
* // $ gcloud auth application-default login
|
|
3270
|
+
* // ```
|
|
3271
|
+
* // - Install the npm module by running:
|
|
3272
|
+
* // ```sh
|
|
3273
|
+
* // $ npm install googleapis
|
|
3274
|
+
* // ```
|
|
3275
|
+
*
|
|
3276
|
+
* const {google} = require('googleapis');
|
|
3277
|
+
* const alloydb = google.alloydb('v1');
|
|
3278
|
+
*
|
|
3279
|
+
* async function main() {
|
|
3280
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3281
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3282
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3283
|
+
* });
|
|
3284
|
+
*
|
|
3285
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3286
|
+
* const authClient = await auth.getClient();
|
|
3287
|
+
* google.options({auth: authClient});
|
|
3288
|
+
*
|
|
3289
|
+
* // Do the magic
|
|
3290
|
+
* const res = await alloydb.projects.locations.backups.list({
|
|
3291
|
+
* // Filtering results
|
|
3292
|
+
* filter: 'placeholder-value',
|
|
3293
|
+
* // Hint for how to order the results
|
|
3294
|
+
* orderBy: 'placeholder-value',
|
|
3295
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
3296
|
+
* pageSize: 'placeholder-value',
|
|
3297
|
+
* // A token identifying a page of results the server should return.
|
|
3298
|
+
* pageToken: 'placeholder-value',
|
|
3299
|
+
* // Required. Parent value for ListBackupsRequest
|
|
3300
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3301
|
+
* });
|
|
3302
|
+
* console.log(res.data);
|
|
3303
|
+
*
|
|
3304
|
+
* // Example response
|
|
3305
|
+
* // {
|
|
3306
|
+
* // "backups": [],
|
|
3307
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3308
|
+
* // "unreachable": []
|
|
3309
|
+
* // }
|
|
3310
|
+
* }
|
|
3311
|
+
*
|
|
3312
|
+
* main().catch(e => {
|
|
3313
|
+
* console.error(e);
|
|
3314
|
+
* throw e;
|
|
3315
|
+
* });
|
|
3316
|
+
*
|
|
3317
|
+
* ```
|
|
2866
3318
|
*
|
|
2867
3319
|
* @param params - Parameters for request
|
|
2868
3320
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2954,6 +3406,95 @@ export namespace alloydb_v1 {
|
|
|
2954
3406
|
|
|
2955
3407
|
/**
|
|
2956
3408
|
* Updates the parameters of a single Backup.
|
|
3409
|
+
* @example
|
|
3410
|
+
* ```js
|
|
3411
|
+
* // Before running the sample:
|
|
3412
|
+
* // - Enable the API at:
|
|
3413
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3414
|
+
* // - Login into gcloud by running:
|
|
3415
|
+
* // ```sh
|
|
3416
|
+
* // $ gcloud auth application-default login
|
|
3417
|
+
* // ```
|
|
3418
|
+
* // - Install the npm module by running:
|
|
3419
|
+
* // ```sh
|
|
3420
|
+
* // $ npm install googleapis
|
|
3421
|
+
* // ```
|
|
3422
|
+
*
|
|
3423
|
+
* const {google} = require('googleapis');
|
|
3424
|
+
* const alloydb = google.alloydb('v1');
|
|
3425
|
+
*
|
|
3426
|
+
* async function main() {
|
|
3427
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3428
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3429
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3430
|
+
* });
|
|
3431
|
+
*
|
|
3432
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3433
|
+
* const authClient = await auth.getClient();
|
|
3434
|
+
* google.options({auth: authClient});
|
|
3435
|
+
*
|
|
3436
|
+
* // Do the magic
|
|
3437
|
+
* const res = await alloydb.projects.locations.backups.patch({
|
|
3438
|
+
* // 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.
|
|
3439
|
+
* allowMissing: 'placeholder-value',
|
|
3440
|
+
* // 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\}
|
|
3441
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3442
|
+
* // 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).
|
|
3443
|
+
* requestId: 'placeholder-value',
|
|
3444
|
+
* // 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.
|
|
3445
|
+
* updateMask: 'placeholder-value',
|
|
3446
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
3447
|
+
* validateOnly: 'placeholder-value',
|
|
3448
|
+
*
|
|
3449
|
+
* // Request body metadata
|
|
3450
|
+
* requestBody: {
|
|
3451
|
+
* // request body parameters
|
|
3452
|
+
* // {
|
|
3453
|
+
* // "annotations": {},
|
|
3454
|
+
* // "clusterName": "my_clusterName",
|
|
3455
|
+
* // "clusterUid": "my_clusterUid",
|
|
3456
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3457
|
+
* // "createTime": "my_createTime",
|
|
3458
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3459
|
+
* // "deleteTime": "my_deleteTime",
|
|
3460
|
+
* // "description": "my_description",
|
|
3461
|
+
* // "displayName": "my_displayName",
|
|
3462
|
+
* // "encryptionConfig": {},
|
|
3463
|
+
* // "encryptionInfo": {},
|
|
3464
|
+
* // "etag": "my_etag",
|
|
3465
|
+
* // "expiryQuantity": {},
|
|
3466
|
+
* // "expiryTime": "my_expiryTime",
|
|
3467
|
+
* // "labels": {},
|
|
3468
|
+
* // "name": "my_name",
|
|
3469
|
+
* // "reconciling": false,
|
|
3470
|
+
* // "satisfiesPzs": false,
|
|
3471
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3472
|
+
* // "state": "my_state",
|
|
3473
|
+
* // "tags": {},
|
|
3474
|
+
* // "type": "my_type",
|
|
3475
|
+
* // "uid": "my_uid",
|
|
3476
|
+
* // "updateTime": "my_updateTime"
|
|
3477
|
+
* // }
|
|
3478
|
+
* },
|
|
3479
|
+
* });
|
|
3480
|
+
* console.log(res.data);
|
|
3481
|
+
*
|
|
3482
|
+
* // Example response
|
|
3483
|
+
* // {
|
|
3484
|
+
* // "done": false,
|
|
3485
|
+
* // "error": {},
|
|
3486
|
+
* // "metadata": {},
|
|
3487
|
+
* // "name": "my_name",
|
|
3488
|
+
* // "response": {}
|
|
3489
|
+
* // }
|
|
3490
|
+
* }
|
|
3491
|
+
*
|
|
3492
|
+
* main().catch(e => {
|
|
3493
|
+
* console.error(e);
|
|
3494
|
+
* throw e;
|
|
3495
|
+
* });
|
|
3496
|
+
*
|
|
3497
|
+
* ```
|
|
2957
3498
|
*
|
|
2958
3499
|
* @param params - Parameters for request
|
|
2959
3500
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3157,6 +3698,103 @@ export namespace alloydb_v1 {
|
|
|
3157
3698
|
|
|
3158
3699
|
/**
|
|
3159
3700
|
* Creates a new Cluster in a given project and location.
|
|
3701
|
+
* @example
|
|
3702
|
+
* ```js
|
|
3703
|
+
* // Before running the sample:
|
|
3704
|
+
* // - Enable the API at:
|
|
3705
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3706
|
+
* // - Login into gcloud by running:
|
|
3707
|
+
* // ```sh
|
|
3708
|
+
* // $ gcloud auth application-default login
|
|
3709
|
+
* // ```
|
|
3710
|
+
* // - Install the npm module by running:
|
|
3711
|
+
* // ```sh
|
|
3712
|
+
* // $ npm install googleapis
|
|
3713
|
+
* // ```
|
|
3714
|
+
*
|
|
3715
|
+
* const {google} = require('googleapis');
|
|
3716
|
+
* const alloydb = google.alloydb('v1');
|
|
3717
|
+
*
|
|
3718
|
+
* async function main() {
|
|
3719
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3720
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3721
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3722
|
+
* });
|
|
3723
|
+
*
|
|
3724
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3725
|
+
* const authClient = await auth.getClient();
|
|
3726
|
+
* google.options({auth: authClient});
|
|
3727
|
+
*
|
|
3728
|
+
* // Do the magic
|
|
3729
|
+
* const res = await alloydb.projects.locations.clusters.create({
|
|
3730
|
+
* // Required. ID of the requesting object.
|
|
3731
|
+
* clusterId: 'placeholder-value',
|
|
3732
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3733
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3734
|
+
* // 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).
|
|
3735
|
+
* requestId: 'placeholder-value',
|
|
3736
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3737
|
+
* validateOnly: 'placeholder-value',
|
|
3738
|
+
*
|
|
3739
|
+
* // Request body metadata
|
|
3740
|
+
* requestBody: {
|
|
3741
|
+
* // request body parameters
|
|
3742
|
+
* // {
|
|
3743
|
+
* // "annotations": {},
|
|
3744
|
+
* // "automatedBackupPolicy": {},
|
|
3745
|
+
* // "backupSource": {},
|
|
3746
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3747
|
+
* // "clusterType": "my_clusterType",
|
|
3748
|
+
* // "continuousBackupConfig": {},
|
|
3749
|
+
* // "continuousBackupInfo": {},
|
|
3750
|
+
* // "createTime": "my_createTime",
|
|
3751
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3752
|
+
* // "deleteTime": "my_deleteTime",
|
|
3753
|
+
* // "displayName": "my_displayName",
|
|
3754
|
+
* // "encryptionConfig": {},
|
|
3755
|
+
* // "encryptionInfo": {},
|
|
3756
|
+
* // "etag": "my_etag",
|
|
3757
|
+
* // "initialUser": {},
|
|
3758
|
+
* // "labels": {},
|
|
3759
|
+
* // "maintenanceSchedule": {},
|
|
3760
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3761
|
+
* // "migrationSource": {},
|
|
3762
|
+
* // "name": "my_name",
|
|
3763
|
+
* // "network": "my_network",
|
|
3764
|
+
* // "networkConfig": {},
|
|
3765
|
+
* // "primaryConfig": {},
|
|
3766
|
+
* // "pscConfig": {},
|
|
3767
|
+
* // "reconciling": false,
|
|
3768
|
+
* // "satisfiesPzs": false,
|
|
3769
|
+
* // "secondaryConfig": {},
|
|
3770
|
+
* // "sslConfig": {},
|
|
3771
|
+
* // "state": "my_state",
|
|
3772
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3773
|
+
* // "tags": {},
|
|
3774
|
+
* // "trialMetadata": {},
|
|
3775
|
+
* // "uid": "my_uid",
|
|
3776
|
+
* // "updateTime": "my_updateTime"
|
|
3777
|
+
* // }
|
|
3778
|
+
* },
|
|
3779
|
+
* });
|
|
3780
|
+
* console.log(res.data);
|
|
3781
|
+
*
|
|
3782
|
+
* // Example response
|
|
3783
|
+
* // {
|
|
3784
|
+
* // "done": false,
|
|
3785
|
+
* // "error": {},
|
|
3786
|
+
* // "metadata": {},
|
|
3787
|
+
* // "name": "my_name",
|
|
3788
|
+
* // "response": {}
|
|
3789
|
+
* // }
|
|
3790
|
+
* }
|
|
3791
|
+
*
|
|
3792
|
+
* main().catch(e => {
|
|
3793
|
+
* console.error(e);
|
|
3794
|
+
* throw e;
|
|
3795
|
+
* });
|
|
3796
|
+
*
|
|
3797
|
+
* ```
|
|
3160
3798
|
*
|
|
3161
3799
|
* @param params - Parameters for request
|
|
3162
3800
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3248,6 +3886,103 @@ export namespace alloydb_v1 {
|
|
|
3248
3886
|
|
|
3249
3887
|
/**
|
|
3250
3888
|
* Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
|
|
3889
|
+
* @example
|
|
3890
|
+
* ```js
|
|
3891
|
+
* // Before running the sample:
|
|
3892
|
+
* // - Enable the API at:
|
|
3893
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3894
|
+
* // - Login into gcloud by running:
|
|
3895
|
+
* // ```sh
|
|
3896
|
+
* // $ gcloud auth application-default login
|
|
3897
|
+
* // ```
|
|
3898
|
+
* // - Install the npm module by running:
|
|
3899
|
+
* // ```sh
|
|
3900
|
+
* // $ npm install googleapis
|
|
3901
|
+
* // ```
|
|
3902
|
+
*
|
|
3903
|
+
* const {google} = require('googleapis');
|
|
3904
|
+
* const alloydb = google.alloydb('v1');
|
|
3905
|
+
*
|
|
3906
|
+
* async function main() {
|
|
3907
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3908
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3909
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3910
|
+
* });
|
|
3911
|
+
*
|
|
3912
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3913
|
+
* const authClient = await auth.getClient();
|
|
3914
|
+
* google.options({auth: authClient});
|
|
3915
|
+
*
|
|
3916
|
+
* // Do the magic
|
|
3917
|
+
* const res = await alloydb.projects.locations.clusters.createsecondary({
|
|
3918
|
+
* // Required. ID of the requesting object (the secondary cluster).
|
|
3919
|
+
* clusterId: 'placeholder-value',
|
|
3920
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3921
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3922
|
+
* // 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).
|
|
3923
|
+
* requestId: 'placeholder-value',
|
|
3924
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3925
|
+
* validateOnly: 'placeholder-value',
|
|
3926
|
+
*
|
|
3927
|
+
* // Request body metadata
|
|
3928
|
+
* requestBody: {
|
|
3929
|
+
* // request body parameters
|
|
3930
|
+
* // {
|
|
3931
|
+
* // "annotations": {},
|
|
3932
|
+
* // "automatedBackupPolicy": {},
|
|
3933
|
+
* // "backupSource": {},
|
|
3934
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3935
|
+
* // "clusterType": "my_clusterType",
|
|
3936
|
+
* // "continuousBackupConfig": {},
|
|
3937
|
+
* // "continuousBackupInfo": {},
|
|
3938
|
+
* // "createTime": "my_createTime",
|
|
3939
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3940
|
+
* // "deleteTime": "my_deleteTime",
|
|
3941
|
+
* // "displayName": "my_displayName",
|
|
3942
|
+
* // "encryptionConfig": {},
|
|
3943
|
+
* // "encryptionInfo": {},
|
|
3944
|
+
* // "etag": "my_etag",
|
|
3945
|
+
* // "initialUser": {},
|
|
3946
|
+
* // "labels": {},
|
|
3947
|
+
* // "maintenanceSchedule": {},
|
|
3948
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3949
|
+
* // "migrationSource": {},
|
|
3950
|
+
* // "name": "my_name",
|
|
3951
|
+
* // "network": "my_network",
|
|
3952
|
+
* // "networkConfig": {},
|
|
3953
|
+
* // "primaryConfig": {},
|
|
3954
|
+
* // "pscConfig": {},
|
|
3955
|
+
* // "reconciling": false,
|
|
3956
|
+
* // "satisfiesPzs": false,
|
|
3957
|
+
* // "secondaryConfig": {},
|
|
3958
|
+
* // "sslConfig": {},
|
|
3959
|
+
* // "state": "my_state",
|
|
3960
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3961
|
+
* // "tags": {},
|
|
3962
|
+
* // "trialMetadata": {},
|
|
3963
|
+
* // "uid": "my_uid",
|
|
3964
|
+
* // "updateTime": "my_updateTime"
|
|
3965
|
+
* // }
|
|
3966
|
+
* },
|
|
3967
|
+
* });
|
|
3968
|
+
* console.log(res.data);
|
|
3969
|
+
*
|
|
3970
|
+
* // Example response
|
|
3971
|
+
* // {
|
|
3972
|
+
* // "done": false,
|
|
3973
|
+
* // "error": {},
|
|
3974
|
+
* // "metadata": {},
|
|
3975
|
+
* // "name": "my_name",
|
|
3976
|
+
* // "response": {}
|
|
3977
|
+
* // }
|
|
3978
|
+
* }
|
|
3979
|
+
*
|
|
3980
|
+
* main().catch(e => {
|
|
3981
|
+
* console.error(e);
|
|
3982
|
+
* throw e;
|
|
3983
|
+
* });
|
|
3984
|
+
*
|
|
3985
|
+
* ```
|
|
3251
3986
|
*
|
|
3252
3987
|
* @param params - Parameters for request
|
|
3253
3988
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3340,6 +4075,64 @@ export namespace alloydb_v1 {
|
|
|
3340
4075
|
|
|
3341
4076
|
/**
|
|
3342
4077
|
* Deletes a single Cluster.
|
|
4078
|
+
* @example
|
|
4079
|
+
* ```js
|
|
4080
|
+
* // Before running the sample:
|
|
4081
|
+
* // - Enable the API at:
|
|
4082
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4083
|
+
* // - Login into gcloud by running:
|
|
4084
|
+
* // ```sh
|
|
4085
|
+
* // $ gcloud auth application-default login
|
|
4086
|
+
* // ```
|
|
4087
|
+
* // - Install the npm module by running:
|
|
4088
|
+
* // ```sh
|
|
4089
|
+
* // $ npm install googleapis
|
|
4090
|
+
* // ```
|
|
4091
|
+
*
|
|
4092
|
+
* const {google} = require('googleapis');
|
|
4093
|
+
* const alloydb = google.alloydb('v1');
|
|
4094
|
+
*
|
|
4095
|
+
* async function main() {
|
|
4096
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4097
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4098
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4099
|
+
* });
|
|
4100
|
+
*
|
|
4101
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4102
|
+
* const authClient = await auth.getClient();
|
|
4103
|
+
* google.options({auth: authClient});
|
|
4104
|
+
*
|
|
4105
|
+
* // Do the magic
|
|
4106
|
+
* const res = await alloydb.projects.locations.clusters.delete({
|
|
4107
|
+
* // 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.
|
|
4108
|
+
* etag: 'placeholder-value',
|
|
4109
|
+
* // Optional. Whether to cascade delete child instances for given cluster.
|
|
4110
|
+
* force: 'placeholder-value',
|
|
4111
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4112
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4113
|
+
* // 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).
|
|
4114
|
+
* requestId: 'placeholder-value',
|
|
4115
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4116
|
+
* validateOnly: 'placeholder-value',
|
|
4117
|
+
* });
|
|
4118
|
+
* console.log(res.data);
|
|
4119
|
+
*
|
|
4120
|
+
* // Example response
|
|
4121
|
+
* // {
|
|
4122
|
+
* // "done": false,
|
|
4123
|
+
* // "error": {},
|
|
4124
|
+
* // "metadata": {},
|
|
4125
|
+
* // "name": "my_name",
|
|
4126
|
+
* // "response": {}
|
|
4127
|
+
* // }
|
|
4128
|
+
* }
|
|
4129
|
+
*
|
|
4130
|
+
* main().catch(e => {
|
|
4131
|
+
* console.error(e);
|
|
4132
|
+
* throw e;
|
|
4133
|
+
* });
|
|
4134
|
+
*
|
|
4135
|
+
* ```
|
|
3343
4136
|
*
|
|
3344
4137
|
* @param params - Parameters for request
|
|
3345
4138
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3428,6 +4221,67 @@ export namespace alloydb_v1 {
|
|
|
3428
4221
|
|
|
3429
4222
|
/**
|
|
3430
4223
|
* Exports data from the cluster. Imperative only.
|
|
4224
|
+
* @example
|
|
4225
|
+
* ```js
|
|
4226
|
+
* // Before running the sample:
|
|
4227
|
+
* // - Enable the API at:
|
|
4228
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4229
|
+
* // - Login into gcloud by running:
|
|
4230
|
+
* // ```sh
|
|
4231
|
+
* // $ gcloud auth application-default login
|
|
4232
|
+
* // ```
|
|
4233
|
+
* // - Install the npm module by running:
|
|
4234
|
+
* // ```sh
|
|
4235
|
+
* // $ npm install googleapis
|
|
4236
|
+
* // ```
|
|
4237
|
+
*
|
|
4238
|
+
* const {google} = require('googleapis');
|
|
4239
|
+
* const alloydb = google.alloydb('v1');
|
|
4240
|
+
*
|
|
4241
|
+
* async function main() {
|
|
4242
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4243
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4244
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4245
|
+
* });
|
|
4246
|
+
*
|
|
4247
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4248
|
+
* const authClient = await auth.getClient();
|
|
4249
|
+
* google.options({auth: authClient});
|
|
4250
|
+
*
|
|
4251
|
+
* // Do the magic
|
|
4252
|
+
* const res = await alloydb.projects.locations.clusters.export({
|
|
4253
|
+
* // Required. The resource name of the cluster.
|
|
4254
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4255
|
+
*
|
|
4256
|
+
* // Request body metadata
|
|
4257
|
+
* requestBody: {
|
|
4258
|
+
* // request body parameters
|
|
4259
|
+
* // {
|
|
4260
|
+
* // "csvExportOptions": {},
|
|
4261
|
+
* // "database": "my_database",
|
|
4262
|
+
* // "gcsDestination": {},
|
|
4263
|
+
* // "sqlExportOptions": {}
|
|
4264
|
+
* // }
|
|
4265
|
+
* },
|
|
4266
|
+
* });
|
|
4267
|
+
* console.log(res.data);
|
|
4268
|
+
*
|
|
4269
|
+
* // Example response
|
|
4270
|
+
* // {
|
|
4271
|
+
* // "done": false,
|
|
4272
|
+
* // "error": {},
|
|
4273
|
+
* // "metadata": {},
|
|
4274
|
+
* // "name": "my_name",
|
|
4275
|
+
* // "response": {}
|
|
4276
|
+
* // }
|
|
4277
|
+
* }
|
|
4278
|
+
*
|
|
4279
|
+
* main().catch(e => {
|
|
4280
|
+
* console.error(e);
|
|
4281
|
+
* throw e;
|
|
4282
|
+
* });
|
|
4283
|
+
*
|
|
4284
|
+
* ```
|
|
3431
4285
|
*
|
|
3432
4286
|
* @param params - Parameters for request
|
|
3433
4287
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3516,6 +4370,87 @@ export namespace alloydb_v1 {
|
|
|
3516
4370
|
|
|
3517
4371
|
/**
|
|
3518
4372
|
* Gets details of a single Cluster.
|
|
4373
|
+
* @example
|
|
4374
|
+
* ```js
|
|
4375
|
+
* // Before running the sample:
|
|
4376
|
+
* // - Enable the API at:
|
|
4377
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4378
|
+
* // - Login into gcloud by running:
|
|
4379
|
+
* // ```sh
|
|
4380
|
+
* // $ gcloud auth application-default login
|
|
4381
|
+
* // ```
|
|
4382
|
+
* // - Install the npm module by running:
|
|
4383
|
+
* // ```sh
|
|
4384
|
+
* // $ npm install googleapis
|
|
4385
|
+
* // ```
|
|
4386
|
+
*
|
|
4387
|
+
* const {google} = require('googleapis');
|
|
4388
|
+
* const alloydb = google.alloydb('v1');
|
|
4389
|
+
*
|
|
4390
|
+
* async function main() {
|
|
4391
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4392
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4393
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4394
|
+
* });
|
|
4395
|
+
*
|
|
4396
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4397
|
+
* const authClient = await auth.getClient();
|
|
4398
|
+
* google.options({auth: authClient});
|
|
4399
|
+
*
|
|
4400
|
+
* // Do the magic
|
|
4401
|
+
* const res = await alloydb.projects.locations.clusters.get({
|
|
4402
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4403
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4404
|
+
* // Optional. The view of the cluster to return. Returns all default fields if not set.
|
|
4405
|
+
* view: 'placeholder-value',
|
|
4406
|
+
* });
|
|
4407
|
+
* console.log(res.data);
|
|
4408
|
+
*
|
|
4409
|
+
* // Example response
|
|
4410
|
+
* // {
|
|
4411
|
+
* // "annotations": {},
|
|
4412
|
+
* // "automatedBackupPolicy": {},
|
|
4413
|
+
* // "backupSource": {},
|
|
4414
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4415
|
+
* // "clusterType": "my_clusterType",
|
|
4416
|
+
* // "continuousBackupConfig": {},
|
|
4417
|
+
* // "continuousBackupInfo": {},
|
|
4418
|
+
* // "createTime": "my_createTime",
|
|
4419
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4420
|
+
* // "deleteTime": "my_deleteTime",
|
|
4421
|
+
* // "displayName": "my_displayName",
|
|
4422
|
+
* // "encryptionConfig": {},
|
|
4423
|
+
* // "encryptionInfo": {},
|
|
4424
|
+
* // "etag": "my_etag",
|
|
4425
|
+
* // "initialUser": {},
|
|
4426
|
+
* // "labels": {},
|
|
4427
|
+
* // "maintenanceSchedule": {},
|
|
4428
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4429
|
+
* // "migrationSource": {},
|
|
4430
|
+
* // "name": "my_name",
|
|
4431
|
+
* // "network": "my_network",
|
|
4432
|
+
* // "networkConfig": {},
|
|
4433
|
+
* // "primaryConfig": {},
|
|
4434
|
+
* // "pscConfig": {},
|
|
4435
|
+
* // "reconciling": false,
|
|
4436
|
+
* // "satisfiesPzs": false,
|
|
4437
|
+
* // "secondaryConfig": {},
|
|
4438
|
+
* // "sslConfig": {},
|
|
4439
|
+
* // "state": "my_state",
|
|
4440
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4441
|
+
* // "tags": {},
|
|
4442
|
+
* // "trialMetadata": {},
|
|
4443
|
+
* // "uid": "my_uid",
|
|
4444
|
+
* // "updateTime": "my_updateTime"
|
|
4445
|
+
* // }
|
|
4446
|
+
* }
|
|
4447
|
+
*
|
|
4448
|
+
* main().catch(e => {
|
|
4449
|
+
* console.error(e);
|
|
4450
|
+
* throw e;
|
|
4451
|
+
* });
|
|
4452
|
+
*
|
|
4453
|
+
* ```
|
|
3519
4454
|
*
|
|
3520
4455
|
* @param params - Parameters for request
|
|
3521
4456
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3604,6 +4539,68 @@ export namespace alloydb_v1 {
|
|
|
3604
4539
|
|
|
3605
4540
|
/**
|
|
3606
4541
|
* Imports data to the cluster. Imperative only.
|
|
4542
|
+
* @example
|
|
4543
|
+
* ```js
|
|
4544
|
+
* // Before running the sample:
|
|
4545
|
+
* // - Enable the API at:
|
|
4546
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4547
|
+
* // - Login into gcloud by running:
|
|
4548
|
+
* // ```sh
|
|
4549
|
+
* // $ gcloud auth application-default login
|
|
4550
|
+
* // ```
|
|
4551
|
+
* // - Install the npm module by running:
|
|
4552
|
+
* // ```sh
|
|
4553
|
+
* // $ npm install googleapis
|
|
4554
|
+
* // ```
|
|
4555
|
+
*
|
|
4556
|
+
* const {google} = require('googleapis');
|
|
4557
|
+
* const alloydb = google.alloydb('v1');
|
|
4558
|
+
*
|
|
4559
|
+
* async function main() {
|
|
4560
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4561
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4562
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4563
|
+
* });
|
|
4564
|
+
*
|
|
4565
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4566
|
+
* const authClient = await auth.getClient();
|
|
4567
|
+
* google.options({auth: authClient});
|
|
4568
|
+
*
|
|
4569
|
+
* // Do the magic
|
|
4570
|
+
* const res = await alloydb.projects.locations.clusters.import({
|
|
4571
|
+
* // Required. The resource name of the cluster.
|
|
4572
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4573
|
+
*
|
|
4574
|
+
* // Request body metadata
|
|
4575
|
+
* requestBody: {
|
|
4576
|
+
* // request body parameters
|
|
4577
|
+
* // {
|
|
4578
|
+
* // "csvImportOptions": {},
|
|
4579
|
+
* // "database": "my_database",
|
|
4580
|
+
* // "gcsUri": "my_gcsUri",
|
|
4581
|
+
* // "sqlImportOptions": {},
|
|
4582
|
+
* // "user": "my_user"
|
|
4583
|
+
* // }
|
|
4584
|
+
* },
|
|
4585
|
+
* });
|
|
4586
|
+
* console.log(res.data);
|
|
4587
|
+
*
|
|
4588
|
+
* // Example response
|
|
4589
|
+
* // {
|
|
4590
|
+
* // "done": false,
|
|
4591
|
+
* // "error": {},
|
|
4592
|
+
* // "metadata": {},
|
|
4593
|
+
* // "name": "my_name",
|
|
4594
|
+
* // "response": {}
|
|
4595
|
+
* // }
|
|
4596
|
+
* }
|
|
4597
|
+
*
|
|
4598
|
+
* main().catch(e => {
|
|
4599
|
+
* console.error(e);
|
|
4600
|
+
* throw e;
|
|
4601
|
+
* });
|
|
4602
|
+
*
|
|
4603
|
+
* ```
|
|
3607
4604
|
*
|
|
3608
4605
|
* @param params - Parameters for request
|
|
3609
4606
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3692,6 +4689,62 @@ export namespace alloydb_v1 {
|
|
|
3692
4689
|
|
|
3693
4690
|
/**
|
|
3694
4691
|
* Lists Clusters in a given project and location.
|
|
4692
|
+
* @example
|
|
4693
|
+
* ```js
|
|
4694
|
+
* // Before running the sample:
|
|
4695
|
+
* // - Enable the API at:
|
|
4696
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4697
|
+
* // - Login into gcloud by running:
|
|
4698
|
+
* // ```sh
|
|
4699
|
+
* // $ gcloud auth application-default login
|
|
4700
|
+
* // ```
|
|
4701
|
+
* // - Install the npm module by running:
|
|
4702
|
+
* // ```sh
|
|
4703
|
+
* // $ npm install googleapis
|
|
4704
|
+
* // ```
|
|
4705
|
+
*
|
|
4706
|
+
* const {google} = require('googleapis');
|
|
4707
|
+
* const alloydb = google.alloydb('v1');
|
|
4708
|
+
*
|
|
4709
|
+
* async function main() {
|
|
4710
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4711
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4712
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4713
|
+
* });
|
|
4714
|
+
*
|
|
4715
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4716
|
+
* const authClient = await auth.getClient();
|
|
4717
|
+
* google.options({auth: authClient});
|
|
4718
|
+
*
|
|
4719
|
+
* // Do the magic
|
|
4720
|
+
* const res = await alloydb.projects.locations.clusters.list({
|
|
4721
|
+
* // Optional. Filtering results
|
|
4722
|
+
* filter: 'placeholder-value',
|
|
4723
|
+
* // Optional. Hint for how to order the results
|
|
4724
|
+
* orderBy: 'placeholder-value',
|
|
4725
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
4726
|
+
* pageSize: 'placeholder-value',
|
|
4727
|
+
* // A token identifying a page of results the server should return.
|
|
4728
|
+
* pageToken: 'placeholder-value',
|
|
4729
|
+
* // 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/-
|
|
4730
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
4731
|
+
* });
|
|
4732
|
+
* console.log(res.data);
|
|
4733
|
+
*
|
|
4734
|
+
* // Example response
|
|
4735
|
+
* // {
|
|
4736
|
+
* // "clusters": [],
|
|
4737
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4738
|
+
* // "unreachable": []
|
|
4739
|
+
* // }
|
|
4740
|
+
* }
|
|
4741
|
+
*
|
|
4742
|
+
* main().catch(e => {
|
|
4743
|
+
* console.error(e);
|
|
4744
|
+
* throw e;
|
|
4745
|
+
* });
|
|
4746
|
+
*
|
|
4747
|
+
* ```
|
|
3695
4748
|
*
|
|
3696
4749
|
* @param params - Parameters for request
|
|
3697
4750
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3785,6 +4838,105 @@ export namespace alloydb_v1 {
|
|
|
3785
4838
|
|
|
3786
4839
|
/**
|
|
3787
4840
|
* Updates the parameters of a single Cluster.
|
|
4841
|
+
* @example
|
|
4842
|
+
* ```js
|
|
4843
|
+
* // Before running the sample:
|
|
4844
|
+
* // - Enable the API at:
|
|
4845
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4846
|
+
* // - Login into gcloud by running:
|
|
4847
|
+
* // ```sh
|
|
4848
|
+
* // $ gcloud auth application-default login
|
|
4849
|
+
* // ```
|
|
4850
|
+
* // - Install the npm module by running:
|
|
4851
|
+
* // ```sh
|
|
4852
|
+
* // $ npm install googleapis
|
|
4853
|
+
* // ```
|
|
4854
|
+
*
|
|
4855
|
+
* const {google} = require('googleapis');
|
|
4856
|
+
* const alloydb = google.alloydb('v1');
|
|
4857
|
+
*
|
|
4858
|
+
* async function main() {
|
|
4859
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4860
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4861
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4862
|
+
* });
|
|
4863
|
+
*
|
|
4864
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4865
|
+
* const authClient = await auth.getClient();
|
|
4866
|
+
* google.options({auth: authClient});
|
|
4867
|
+
*
|
|
4868
|
+
* // Do the magic
|
|
4869
|
+
* const res = await alloydb.projects.locations.clusters.patch({
|
|
4870
|
+
* // 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.
|
|
4871
|
+
* allowMissing: 'placeholder-value',
|
|
4872
|
+
* // 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\}
|
|
4873
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4874
|
+
* // 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).
|
|
4875
|
+
* requestId: 'placeholder-value',
|
|
4876
|
+
* // 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.
|
|
4877
|
+
* updateMask: 'placeholder-value',
|
|
4878
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4879
|
+
* validateOnly: 'placeholder-value',
|
|
4880
|
+
*
|
|
4881
|
+
* // Request body metadata
|
|
4882
|
+
* requestBody: {
|
|
4883
|
+
* // request body parameters
|
|
4884
|
+
* // {
|
|
4885
|
+
* // "annotations": {},
|
|
4886
|
+
* // "automatedBackupPolicy": {},
|
|
4887
|
+
* // "backupSource": {},
|
|
4888
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4889
|
+
* // "clusterType": "my_clusterType",
|
|
4890
|
+
* // "continuousBackupConfig": {},
|
|
4891
|
+
* // "continuousBackupInfo": {},
|
|
4892
|
+
* // "createTime": "my_createTime",
|
|
4893
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4894
|
+
* // "deleteTime": "my_deleteTime",
|
|
4895
|
+
* // "displayName": "my_displayName",
|
|
4896
|
+
* // "encryptionConfig": {},
|
|
4897
|
+
* // "encryptionInfo": {},
|
|
4898
|
+
* // "etag": "my_etag",
|
|
4899
|
+
* // "initialUser": {},
|
|
4900
|
+
* // "labels": {},
|
|
4901
|
+
* // "maintenanceSchedule": {},
|
|
4902
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4903
|
+
* // "migrationSource": {},
|
|
4904
|
+
* // "name": "my_name",
|
|
4905
|
+
* // "network": "my_network",
|
|
4906
|
+
* // "networkConfig": {},
|
|
4907
|
+
* // "primaryConfig": {},
|
|
4908
|
+
* // "pscConfig": {},
|
|
4909
|
+
* // "reconciling": false,
|
|
4910
|
+
* // "satisfiesPzs": false,
|
|
4911
|
+
* // "secondaryConfig": {},
|
|
4912
|
+
* // "sslConfig": {},
|
|
4913
|
+
* // "state": "my_state",
|
|
4914
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4915
|
+
* // "tags": {},
|
|
4916
|
+
* // "trialMetadata": {},
|
|
4917
|
+
* // "uid": "my_uid",
|
|
4918
|
+
* // "updateTime": "my_updateTime"
|
|
4919
|
+
* // }
|
|
4920
|
+
* },
|
|
4921
|
+
* });
|
|
4922
|
+
* console.log(res.data);
|
|
4923
|
+
*
|
|
4924
|
+
* // Example response
|
|
4925
|
+
* // {
|
|
4926
|
+
* // "done": false,
|
|
4927
|
+
* // "error": {},
|
|
4928
|
+
* // "metadata": {},
|
|
4929
|
+
* // "name": "my_name",
|
|
4930
|
+
* // "response": {}
|
|
4931
|
+
* // }
|
|
4932
|
+
* }
|
|
4933
|
+
*
|
|
4934
|
+
* main().catch(e => {
|
|
4935
|
+
* console.error(e);
|
|
4936
|
+
* throw e;
|
|
4937
|
+
* });
|
|
4938
|
+
*
|
|
4939
|
+
* ```
|
|
3788
4940
|
*
|
|
3789
4941
|
* @param params - Parameters for request
|
|
3790
4942
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3873,6 +5025,66 @@ export namespace alloydb_v1 {
|
|
|
3873
5025
|
|
|
3874
5026
|
/**
|
|
3875
5027
|
* Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.
|
|
5028
|
+
* @example
|
|
5029
|
+
* ```js
|
|
5030
|
+
* // Before running the sample:
|
|
5031
|
+
* // - Enable the API at:
|
|
5032
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5033
|
+
* // - Login into gcloud by running:
|
|
5034
|
+
* // ```sh
|
|
5035
|
+
* // $ gcloud auth application-default login
|
|
5036
|
+
* // ```
|
|
5037
|
+
* // - Install the npm module by running:
|
|
5038
|
+
* // ```sh
|
|
5039
|
+
* // $ npm install googleapis
|
|
5040
|
+
* // ```
|
|
5041
|
+
*
|
|
5042
|
+
* const {google} = require('googleapis');
|
|
5043
|
+
* const alloydb = google.alloydb('v1');
|
|
5044
|
+
*
|
|
5045
|
+
* async function main() {
|
|
5046
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5047
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5048
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5049
|
+
* });
|
|
5050
|
+
*
|
|
5051
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5052
|
+
* const authClient = await auth.getClient();
|
|
5053
|
+
* google.options({auth: authClient});
|
|
5054
|
+
*
|
|
5055
|
+
* // Do the magic
|
|
5056
|
+
* const res = await alloydb.projects.locations.clusters.promote({
|
|
5057
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5058
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5059
|
+
*
|
|
5060
|
+
* // Request body metadata
|
|
5061
|
+
* requestBody: {
|
|
5062
|
+
* // request body parameters
|
|
5063
|
+
* // {
|
|
5064
|
+
* // "etag": "my_etag",
|
|
5065
|
+
* // "requestId": "my_requestId",
|
|
5066
|
+
* // "validateOnly": false
|
|
5067
|
+
* // }
|
|
5068
|
+
* },
|
|
5069
|
+
* });
|
|
5070
|
+
* console.log(res.data);
|
|
5071
|
+
*
|
|
5072
|
+
* // Example response
|
|
5073
|
+
* // {
|
|
5074
|
+
* // "done": false,
|
|
5075
|
+
* // "error": {},
|
|
5076
|
+
* // "metadata": {},
|
|
5077
|
+
* // "name": "my_name",
|
|
5078
|
+
* // "response": {}
|
|
5079
|
+
* // }
|
|
5080
|
+
* }
|
|
5081
|
+
*
|
|
5082
|
+
* main().catch(e => {
|
|
5083
|
+
* console.error(e);
|
|
5084
|
+
* throw e;
|
|
5085
|
+
* });
|
|
5086
|
+
*
|
|
5087
|
+
* ```
|
|
3876
5088
|
*
|
|
3877
5089
|
* @param params - Parameters for request
|
|
3878
5090
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3964,6 +5176,69 @@ export namespace alloydb_v1 {
|
|
|
3964
5176
|
|
|
3965
5177
|
/**
|
|
3966
5178
|
* 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.
|
|
5179
|
+
* @example
|
|
5180
|
+
* ```js
|
|
5181
|
+
* // Before running the sample:
|
|
5182
|
+
* // - Enable the API at:
|
|
5183
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5184
|
+
* // - Login into gcloud by running:
|
|
5185
|
+
* // ```sh
|
|
5186
|
+
* // $ gcloud auth application-default login
|
|
5187
|
+
* // ```
|
|
5188
|
+
* // - Install the npm module by running:
|
|
5189
|
+
* // ```sh
|
|
5190
|
+
* // $ npm install googleapis
|
|
5191
|
+
* // ```
|
|
5192
|
+
*
|
|
5193
|
+
* const {google} = require('googleapis');
|
|
5194
|
+
* const alloydb = google.alloydb('v1');
|
|
5195
|
+
*
|
|
5196
|
+
* async function main() {
|
|
5197
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5198
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5199
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5200
|
+
* });
|
|
5201
|
+
*
|
|
5202
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5203
|
+
* const authClient = await auth.getClient();
|
|
5204
|
+
* google.options({auth: authClient});
|
|
5205
|
+
*
|
|
5206
|
+
* // Do the magic
|
|
5207
|
+
* const res = await alloydb.projects.locations.clusters.restore({
|
|
5208
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.
|
|
5209
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5210
|
+
*
|
|
5211
|
+
* // Request body metadata
|
|
5212
|
+
* requestBody: {
|
|
5213
|
+
* // request body parameters
|
|
5214
|
+
* // {
|
|
5215
|
+
* // "backupSource": {},
|
|
5216
|
+
* // "cluster": {},
|
|
5217
|
+
* // "clusterId": "my_clusterId",
|
|
5218
|
+
* // "continuousBackupSource": {},
|
|
5219
|
+
* // "requestId": "my_requestId",
|
|
5220
|
+
* // "validateOnly": false
|
|
5221
|
+
* // }
|
|
5222
|
+
* },
|
|
5223
|
+
* });
|
|
5224
|
+
* console.log(res.data);
|
|
5225
|
+
*
|
|
5226
|
+
* // Example response
|
|
5227
|
+
* // {
|
|
5228
|
+
* // "done": false,
|
|
5229
|
+
* // "error": {},
|
|
5230
|
+
* // "metadata": {},
|
|
5231
|
+
* // "name": "my_name",
|
|
5232
|
+
* // "response": {}
|
|
5233
|
+
* // }
|
|
5234
|
+
* }
|
|
5235
|
+
*
|
|
5236
|
+
* main().catch(e => {
|
|
5237
|
+
* console.error(e);
|
|
5238
|
+
* throw e;
|
|
5239
|
+
* });
|
|
5240
|
+
*
|
|
5241
|
+
* ```
|
|
3967
5242
|
*
|
|
3968
5243
|
* @param params - Parameters for request
|
|
3969
5244
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4055,6 +5330,66 @@ export namespace alloydb_v1 {
|
|
|
4055
5330
|
|
|
4056
5331
|
/**
|
|
4057
5332
|
* Restores an AlloyDB cluster from a CloudSQL resource.
|
|
5333
|
+
* @example
|
|
5334
|
+
* ```js
|
|
5335
|
+
* // Before running the sample:
|
|
5336
|
+
* // - Enable the API at:
|
|
5337
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5338
|
+
* // - Login into gcloud by running:
|
|
5339
|
+
* // ```sh
|
|
5340
|
+
* // $ gcloud auth application-default login
|
|
5341
|
+
* // ```
|
|
5342
|
+
* // - Install the npm module by running:
|
|
5343
|
+
* // ```sh
|
|
5344
|
+
* // $ npm install googleapis
|
|
5345
|
+
* // ```
|
|
5346
|
+
*
|
|
5347
|
+
* const {google} = require('googleapis');
|
|
5348
|
+
* const alloydb = google.alloydb('v1');
|
|
5349
|
+
*
|
|
5350
|
+
* async function main() {
|
|
5351
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5352
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5353
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5354
|
+
* });
|
|
5355
|
+
*
|
|
5356
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5357
|
+
* const authClient = await auth.getClient();
|
|
5358
|
+
* google.options({auth: authClient});
|
|
5359
|
+
*
|
|
5360
|
+
* // Do the magic
|
|
5361
|
+
* const res = await alloydb.projects.locations.clusters.restoreFromCloudSQL({
|
|
5362
|
+
* // Required. The location of the new cluster. For the required format, see the comment on Cluster.name field.
|
|
5363
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5364
|
+
*
|
|
5365
|
+
* // Request body metadata
|
|
5366
|
+
* requestBody: {
|
|
5367
|
+
* // request body parameters
|
|
5368
|
+
* // {
|
|
5369
|
+
* // "cloudsqlBackupRunSource": {},
|
|
5370
|
+
* // "cluster": {},
|
|
5371
|
+
* // "clusterId": "my_clusterId"
|
|
5372
|
+
* // }
|
|
5373
|
+
* },
|
|
5374
|
+
* });
|
|
5375
|
+
* console.log(res.data);
|
|
5376
|
+
*
|
|
5377
|
+
* // Example response
|
|
5378
|
+
* // {
|
|
5379
|
+
* // "done": false,
|
|
5380
|
+
* // "error": {},
|
|
5381
|
+
* // "metadata": {},
|
|
5382
|
+
* // "name": "my_name",
|
|
5383
|
+
* // "response": {}
|
|
5384
|
+
* // }
|
|
5385
|
+
* }
|
|
5386
|
+
*
|
|
5387
|
+
* main().catch(e => {
|
|
5388
|
+
* console.error(e);
|
|
5389
|
+
* throw e;
|
|
5390
|
+
* });
|
|
5391
|
+
*
|
|
5392
|
+
* ```
|
|
4058
5393
|
*
|
|
4059
5394
|
* @param params - Parameters for request
|
|
4060
5395
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4146,6 +5481,65 @@ export namespace alloydb_v1 {
|
|
|
4146
5481
|
|
|
4147
5482
|
/**
|
|
4148
5483
|
* 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.
|
|
5484
|
+
* @example
|
|
5485
|
+
* ```js
|
|
5486
|
+
* // Before running the sample:
|
|
5487
|
+
* // - Enable the API at:
|
|
5488
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5489
|
+
* // - Login into gcloud by running:
|
|
5490
|
+
* // ```sh
|
|
5491
|
+
* // $ gcloud auth application-default login
|
|
5492
|
+
* // ```
|
|
5493
|
+
* // - Install the npm module by running:
|
|
5494
|
+
* // ```sh
|
|
5495
|
+
* // $ npm install googleapis
|
|
5496
|
+
* // ```
|
|
5497
|
+
*
|
|
5498
|
+
* const {google} = require('googleapis');
|
|
5499
|
+
* const alloydb = google.alloydb('v1');
|
|
5500
|
+
*
|
|
5501
|
+
* async function main() {
|
|
5502
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5503
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5504
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5505
|
+
* });
|
|
5506
|
+
*
|
|
5507
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5508
|
+
* const authClient = await auth.getClient();
|
|
5509
|
+
* google.options({auth: authClient});
|
|
5510
|
+
*
|
|
5511
|
+
* // Do the magic
|
|
5512
|
+
* const res = await alloydb.projects.locations.clusters.switchover({
|
|
5513
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5514
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5515
|
+
*
|
|
5516
|
+
* // Request body metadata
|
|
5517
|
+
* requestBody: {
|
|
5518
|
+
* // request body parameters
|
|
5519
|
+
* // {
|
|
5520
|
+
* // "requestId": "my_requestId",
|
|
5521
|
+
* // "validateOnly": false
|
|
5522
|
+
* // }
|
|
5523
|
+
* },
|
|
5524
|
+
* });
|
|
5525
|
+
* console.log(res.data);
|
|
5526
|
+
*
|
|
5527
|
+
* // Example response
|
|
5528
|
+
* // {
|
|
5529
|
+
* // "done": false,
|
|
5530
|
+
* // "error": {},
|
|
5531
|
+
* // "metadata": {},
|
|
5532
|
+
* // "name": "my_name",
|
|
5533
|
+
* // "response": {}
|
|
5534
|
+
* // }
|
|
5535
|
+
* }
|
|
5536
|
+
*
|
|
5537
|
+
* main().catch(e => {
|
|
5538
|
+
* console.error(e);
|
|
5539
|
+
* throw e;
|
|
5540
|
+
* });
|
|
5541
|
+
*
|
|
5542
|
+
* ```
|
|
4149
5543
|
*
|
|
4150
5544
|
* @param params - Parameters for request
|
|
4151
5545
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4237,6 +5631,67 @@ export namespace alloydb_v1 {
|
|
|
4237
5631
|
|
|
4238
5632
|
/**
|
|
4239
5633
|
* Upgrades a single Cluster. Imperative only.
|
|
5634
|
+
* @example
|
|
5635
|
+
* ```js
|
|
5636
|
+
* // Before running the sample:
|
|
5637
|
+
* // - Enable the API at:
|
|
5638
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5639
|
+
* // - Login into gcloud by running:
|
|
5640
|
+
* // ```sh
|
|
5641
|
+
* // $ gcloud auth application-default login
|
|
5642
|
+
* // ```
|
|
5643
|
+
* // - Install the npm module by running:
|
|
5644
|
+
* // ```sh
|
|
5645
|
+
* // $ npm install googleapis
|
|
5646
|
+
* // ```
|
|
5647
|
+
*
|
|
5648
|
+
* const {google} = require('googleapis');
|
|
5649
|
+
* const alloydb = google.alloydb('v1');
|
|
5650
|
+
*
|
|
5651
|
+
* async function main() {
|
|
5652
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5653
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5654
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5655
|
+
* });
|
|
5656
|
+
*
|
|
5657
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5658
|
+
* const authClient = await auth.getClient();
|
|
5659
|
+
* google.options({auth: authClient});
|
|
5660
|
+
*
|
|
5661
|
+
* // Do the magic
|
|
5662
|
+
* const res = await alloydb.projects.locations.clusters.upgrade({
|
|
5663
|
+
* // Required. The resource name of the cluster.
|
|
5664
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5665
|
+
*
|
|
5666
|
+
* // Request body metadata
|
|
5667
|
+
* requestBody: {
|
|
5668
|
+
* // request body parameters
|
|
5669
|
+
* // {
|
|
5670
|
+
* // "etag": "my_etag",
|
|
5671
|
+
* // "requestId": "my_requestId",
|
|
5672
|
+
* // "validateOnly": false,
|
|
5673
|
+
* // "version": "my_version"
|
|
5674
|
+
* // }
|
|
5675
|
+
* },
|
|
5676
|
+
* });
|
|
5677
|
+
* console.log(res.data);
|
|
5678
|
+
*
|
|
5679
|
+
* // Example response
|
|
5680
|
+
* // {
|
|
5681
|
+
* // "done": false,
|
|
5682
|
+
* // "error": {},
|
|
5683
|
+
* // "metadata": {},
|
|
5684
|
+
* // "name": "my_name",
|
|
5685
|
+
* // "response": {}
|
|
5686
|
+
* // }
|
|
5687
|
+
* }
|
|
5688
|
+
*
|
|
5689
|
+
* main().catch(e => {
|
|
5690
|
+
* console.error(e);
|
|
5691
|
+
* throw e;
|
|
5692
|
+
* });
|
|
5693
|
+
*
|
|
5694
|
+
* ```
|
|
4240
5695
|
*
|
|
4241
5696
|
* @param params - Parameters for request
|
|
4242
5697
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4553,6 +6008,98 @@ export namespace alloydb_v1 {
|
|
|
4553
6008
|
|
|
4554
6009
|
/**
|
|
4555
6010
|
* Creates a new Instance in a given project and location.
|
|
6011
|
+
* @example
|
|
6012
|
+
* ```js
|
|
6013
|
+
* // Before running the sample:
|
|
6014
|
+
* // - Enable the API at:
|
|
6015
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6016
|
+
* // - Login into gcloud by running:
|
|
6017
|
+
* // ```sh
|
|
6018
|
+
* // $ gcloud auth application-default login
|
|
6019
|
+
* // ```
|
|
6020
|
+
* // - Install the npm module by running:
|
|
6021
|
+
* // ```sh
|
|
6022
|
+
* // $ npm install googleapis
|
|
6023
|
+
* // ```
|
|
6024
|
+
*
|
|
6025
|
+
* const {google} = require('googleapis');
|
|
6026
|
+
* const alloydb = google.alloydb('v1');
|
|
6027
|
+
*
|
|
6028
|
+
* async function main() {
|
|
6029
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6030
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6031
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6032
|
+
* });
|
|
6033
|
+
*
|
|
6034
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6035
|
+
* const authClient = await auth.getClient();
|
|
6036
|
+
* google.options({auth: authClient});
|
|
6037
|
+
*
|
|
6038
|
+
* // Do the magic
|
|
6039
|
+
* const res = await alloydb.projects.locations.clusters.instances.create({
|
|
6040
|
+
* // Required. ID of the requesting object.
|
|
6041
|
+
* instanceId: 'placeholder-value',
|
|
6042
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6043
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6044
|
+
* // 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).
|
|
6045
|
+
* requestId: 'placeholder-value',
|
|
6046
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6047
|
+
* validateOnly: 'placeholder-value',
|
|
6048
|
+
*
|
|
6049
|
+
* // Request body metadata
|
|
6050
|
+
* requestBody: {
|
|
6051
|
+
* // request body parameters
|
|
6052
|
+
* // {
|
|
6053
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6054
|
+
* // "annotations": {},
|
|
6055
|
+
* // "availabilityType": "my_availabilityType",
|
|
6056
|
+
* // "clientConnectionConfig": {},
|
|
6057
|
+
* // "createTime": "my_createTime",
|
|
6058
|
+
* // "databaseFlags": {},
|
|
6059
|
+
* // "deleteTime": "my_deleteTime",
|
|
6060
|
+
* // "displayName": "my_displayName",
|
|
6061
|
+
* // "etag": "my_etag",
|
|
6062
|
+
* // "gceZone": "my_gceZone",
|
|
6063
|
+
* // "instanceType": "my_instanceType",
|
|
6064
|
+
* // "ipAddress": "my_ipAddress",
|
|
6065
|
+
* // "labels": {},
|
|
6066
|
+
* // "machineConfig": {},
|
|
6067
|
+
* // "name": "my_name",
|
|
6068
|
+
* // "networkConfig": {},
|
|
6069
|
+
* // "nodes": [],
|
|
6070
|
+
* // "observabilityConfig": {},
|
|
6071
|
+
* // "outboundPublicIpAddresses": [],
|
|
6072
|
+
* // "pscInstanceConfig": {},
|
|
6073
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6074
|
+
* // "queryInsightsConfig": {},
|
|
6075
|
+
* // "readPoolConfig": {},
|
|
6076
|
+
* // "reconciling": false,
|
|
6077
|
+
* // "satisfiesPzs": false,
|
|
6078
|
+
* // "state": "my_state",
|
|
6079
|
+
* // "uid": "my_uid",
|
|
6080
|
+
* // "updateTime": "my_updateTime",
|
|
6081
|
+
* // "writableNode": {}
|
|
6082
|
+
* // }
|
|
6083
|
+
* },
|
|
6084
|
+
* });
|
|
6085
|
+
* console.log(res.data);
|
|
6086
|
+
*
|
|
6087
|
+
* // Example response
|
|
6088
|
+
* // {
|
|
6089
|
+
* // "done": false,
|
|
6090
|
+
* // "error": {},
|
|
6091
|
+
* // "metadata": {},
|
|
6092
|
+
* // "name": "my_name",
|
|
6093
|
+
* // "response": {}
|
|
6094
|
+
* // }
|
|
6095
|
+
* }
|
|
6096
|
+
*
|
|
6097
|
+
* main().catch(e => {
|
|
6098
|
+
* console.error(e);
|
|
6099
|
+
* throw e;
|
|
6100
|
+
* });
|
|
6101
|
+
*
|
|
6102
|
+
* ```
|
|
4556
6103
|
*
|
|
4557
6104
|
* @param params - Parameters for request
|
|
4558
6105
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4645,6 +6192,99 @@ export namespace alloydb_v1 {
|
|
|
4645
6192
|
|
|
4646
6193
|
/**
|
|
4647
6194
|
* Creates a new SECONDARY Instance in a given project and location.
|
|
6195
|
+
* @example
|
|
6196
|
+
* ```js
|
|
6197
|
+
* // Before running the sample:
|
|
6198
|
+
* // - Enable the API at:
|
|
6199
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6200
|
+
* // - Login into gcloud by running:
|
|
6201
|
+
* // ```sh
|
|
6202
|
+
* // $ gcloud auth application-default login
|
|
6203
|
+
* // ```
|
|
6204
|
+
* // - Install the npm module by running:
|
|
6205
|
+
* // ```sh
|
|
6206
|
+
* // $ npm install googleapis
|
|
6207
|
+
* // ```
|
|
6208
|
+
*
|
|
6209
|
+
* const {google} = require('googleapis');
|
|
6210
|
+
* const alloydb = google.alloydb('v1');
|
|
6211
|
+
*
|
|
6212
|
+
* async function main() {
|
|
6213
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6214
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6215
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6216
|
+
* });
|
|
6217
|
+
*
|
|
6218
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6219
|
+
* const authClient = await auth.getClient();
|
|
6220
|
+
* google.options({auth: authClient});
|
|
6221
|
+
*
|
|
6222
|
+
* // Do the magic
|
|
6223
|
+
* const res =
|
|
6224
|
+
* await alloydb.projects.locations.clusters.instances.createsecondary({
|
|
6225
|
+
* // Required. ID of the requesting object.
|
|
6226
|
+
* instanceId: 'placeholder-value',
|
|
6227
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6228
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6229
|
+
* // 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).
|
|
6230
|
+
* requestId: 'placeholder-value',
|
|
6231
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6232
|
+
* validateOnly: 'placeholder-value',
|
|
6233
|
+
*
|
|
6234
|
+
* // Request body metadata
|
|
6235
|
+
* requestBody: {
|
|
6236
|
+
* // request body parameters
|
|
6237
|
+
* // {
|
|
6238
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6239
|
+
* // "annotations": {},
|
|
6240
|
+
* // "availabilityType": "my_availabilityType",
|
|
6241
|
+
* // "clientConnectionConfig": {},
|
|
6242
|
+
* // "createTime": "my_createTime",
|
|
6243
|
+
* // "databaseFlags": {},
|
|
6244
|
+
* // "deleteTime": "my_deleteTime",
|
|
6245
|
+
* // "displayName": "my_displayName",
|
|
6246
|
+
* // "etag": "my_etag",
|
|
6247
|
+
* // "gceZone": "my_gceZone",
|
|
6248
|
+
* // "instanceType": "my_instanceType",
|
|
6249
|
+
* // "ipAddress": "my_ipAddress",
|
|
6250
|
+
* // "labels": {},
|
|
6251
|
+
* // "machineConfig": {},
|
|
6252
|
+
* // "name": "my_name",
|
|
6253
|
+
* // "networkConfig": {},
|
|
6254
|
+
* // "nodes": [],
|
|
6255
|
+
* // "observabilityConfig": {},
|
|
6256
|
+
* // "outboundPublicIpAddresses": [],
|
|
6257
|
+
* // "pscInstanceConfig": {},
|
|
6258
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6259
|
+
* // "queryInsightsConfig": {},
|
|
6260
|
+
* // "readPoolConfig": {},
|
|
6261
|
+
* // "reconciling": false,
|
|
6262
|
+
* // "satisfiesPzs": false,
|
|
6263
|
+
* // "state": "my_state",
|
|
6264
|
+
* // "uid": "my_uid",
|
|
6265
|
+
* // "updateTime": "my_updateTime",
|
|
6266
|
+
* // "writableNode": {}
|
|
6267
|
+
* // }
|
|
6268
|
+
* },
|
|
6269
|
+
* });
|
|
6270
|
+
* console.log(res.data);
|
|
6271
|
+
*
|
|
6272
|
+
* // Example response
|
|
6273
|
+
* // {
|
|
6274
|
+
* // "done": false,
|
|
6275
|
+
* // "error": {},
|
|
6276
|
+
* // "metadata": {},
|
|
6277
|
+
* // "name": "my_name",
|
|
6278
|
+
* // "response": {}
|
|
6279
|
+
* // }
|
|
6280
|
+
* }
|
|
6281
|
+
*
|
|
6282
|
+
* main().catch(e => {
|
|
6283
|
+
* console.error(e);
|
|
6284
|
+
* throw e;
|
|
6285
|
+
* });
|
|
6286
|
+
*
|
|
6287
|
+
* ```
|
|
4648
6288
|
*
|
|
4649
6289
|
* @param params - Parameters for request
|
|
4650
6290
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4737,6 +6377,62 @@ export namespace alloydb_v1 {
|
|
|
4737
6377
|
|
|
4738
6378
|
/**
|
|
4739
6379
|
* Deletes a single Instance.
|
|
6380
|
+
* @example
|
|
6381
|
+
* ```js
|
|
6382
|
+
* // Before running the sample:
|
|
6383
|
+
* // - Enable the API at:
|
|
6384
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6385
|
+
* // - Login into gcloud by running:
|
|
6386
|
+
* // ```sh
|
|
6387
|
+
* // $ gcloud auth application-default login
|
|
6388
|
+
* // ```
|
|
6389
|
+
* // - Install the npm module by running:
|
|
6390
|
+
* // ```sh
|
|
6391
|
+
* // $ npm install googleapis
|
|
6392
|
+
* // ```
|
|
6393
|
+
*
|
|
6394
|
+
* const {google} = require('googleapis');
|
|
6395
|
+
* const alloydb = google.alloydb('v1');
|
|
6396
|
+
*
|
|
6397
|
+
* async function main() {
|
|
6398
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6399
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6400
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6401
|
+
* });
|
|
6402
|
+
*
|
|
6403
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6404
|
+
* const authClient = await auth.getClient();
|
|
6405
|
+
* google.options({auth: authClient});
|
|
6406
|
+
*
|
|
6407
|
+
* // Do the magic
|
|
6408
|
+
* const res = await alloydb.projects.locations.clusters.instances.delete({
|
|
6409
|
+
* // 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.
|
|
6410
|
+
* etag: 'placeholder-value',
|
|
6411
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6412
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6413
|
+
* // 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).
|
|
6414
|
+
* requestId: 'placeholder-value',
|
|
6415
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6416
|
+
* validateOnly: 'placeholder-value',
|
|
6417
|
+
* });
|
|
6418
|
+
* console.log(res.data);
|
|
6419
|
+
*
|
|
6420
|
+
* // Example response
|
|
6421
|
+
* // {
|
|
6422
|
+
* // "done": false,
|
|
6423
|
+
* // "error": {},
|
|
6424
|
+
* // "metadata": {},
|
|
6425
|
+
* // "name": "my_name",
|
|
6426
|
+
* // "response": {}
|
|
6427
|
+
* // }
|
|
6428
|
+
* }
|
|
6429
|
+
*
|
|
6430
|
+
* main().catch(e => {
|
|
6431
|
+
* console.error(e);
|
|
6432
|
+
* throw e;
|
|
6433
|
+
* });
|
|
6434
|
+
*
|
|
6435
|
+
* ```
|
|
4740
6436
|
*
|
|
4741
6437
|
* @param params - Parameters for request
|
|
4742
6438
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4826,6 +6522,65 @@ export namespace alloydb_v1 {
|
|
|
4826
6522
|
|
|
4827
6523
|
/**
|
|
4828
6524
|
* Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.
|
|
6525
|
+
* @example
|
|
6526
|
+
* ```js
|
|
6527
|
+
* // Before running the sample:
|
|
6528
|
+
* // - Enable the API at:
|
|
6529
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6530
|
+
* // - Login into gcloud by running:
|
|
6531
|
+
* // ```sh
|
|
6532
|
+
* // $ gcloud auth application-default login
|
|
6533
|
+
* // ```
|
|
6534
|
+
* // - Install the npm module by running:
|
|
6535
|
+
* // ```sh
|
|
6536
|
+
* // $ npm install googleapis
|
|
6537
|
+
* // ```
|
|
6538
|
+
*
|
|
6539
|
+
* const {google} = require('googleapis');
|
|
6540
|
+
* const alloydb = google.alloydb('v1');
|
|
6541
|
+
*
|
|
6542
|
+
* async function main() {
|
|
6543
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6544
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6545
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6546
|
+
* });
|
|
6547
|
+
*
|
|
6548
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6549
|
+
* const authClient = await auth.getClient();
|
|
6550
|
+
* google.options({auth: authClient});
|
|
6551
|
+
*
|
|
6552
|
+
* // Do the magic
|
|
6553
|
+
* const res = await alloydb.projects.locations.clusters.instances.failover({
|
|
6554
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6555
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6556
|
+
*
|
|
6557
|
+
* // Request body metadata
|
|
6558
|
+
* requestBody: {
|
|
6559
|
+
* // request body parameters
|
|
6560
|
+
* // {
|
|
6561
|
+
* // "requestId": "my_requestId",
|
|
6562
|
+
* // "validateOnly": false
|
|
6563
|
+
* // }
|
|
6564
|
+
* },
|
|
6565
|
+
* });
|
|
6566
|
+
* console.log(res.data);
|
|
6567
|
+
*
|
|
6568
|
+
* // Example response
|
|
6569
|
+
* // {
|
|
6570
|
+
* // "done": false,
|
|
6571
|
+
* // "error": {},
|
|
6572
|
+
* // "metadata": {},
|
|
6573
|
+
* // "name": "my_name",
|
|
6574
|
+
* // "response": {}
|
|
6575
|
+
* // }
|
|
6576
|
+
* }
|
|
6577
|
+
*
|
|
6578
|
+
* main().catch(e => {
|
|
6579
|
+
* console.error(e);
|
|
6580
|
+
* throw e;
|
|
6581
|
+
* });
|
|
6582
|
+
*
|
|
6583
|
+
* ```
|
|
4829
6584
|
*
|
|
4830
6585
|
* @param params - Parameters for request
|
|
4831
6586
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4918,6 +6673,82 @@ export namespace alloydb_v1 {
|
|
|
4918
6673
|
|
|
4919
6674
|
/**
|
|
4920
6675
|
* Gets details of a single Instance.
|
|
6676
|
+
* @example
|
|
6677
|
+
* ```js
|
|
6678
|
+
* // Before running the sample:
|
|
6679
|
+
* // - Enable the API at:
|
|
6680
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6681
|
+
* // - Login into gcloud by running:
|
|
6682
|
+
* // ```sh
|
|
6683
|
+
* // $ gcloud auth application-default login
|
|
6684
|
+
* // ```
|
|
6685
|
+
* // - Install the npm module by running:
|
|
6686
|
+
* // ```sh
|
|
6687
|
+
* // $ npm install googleapis
|
|
6688
|
+
* // ```
|
|
6689
|
+
*
|
|
6690
|
+
* const {google} = require('googleapis');
|
|
6691
|
+
* const alloydb = google.alloydb('v1');
|
|
6692
|
+
*
|
|
6693
|
+
* async function main() {
|
|
6694
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6695
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6696
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6697
|
+
* });
|
|
6698
|
+
*
|
|
6699
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6700
|
+
* const authClient = await auth.getClient();
|
|
6701
|
+
* google.options({auth: authClient});
|
|
6702
|
+
*
|
|
6703
|
+
* // Do the magic
|
|
6704
|
+
* const res = await alloydb.projects.locations.clusters.instances.get({
|
|
6705
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6706
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6707
|
+
* // The view of the instance to return.
|
|
6708
|
+
* view: 'placeholder-value',
|
|
6709
|
+
* });
|
|
6710
|
+
* console.log(res.data);
|
|
6711
|
+
*
|
|
6712
|
+
* // Example response
|
|
6713
|
+
* // {
|
|
6714
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6715
|
+
* // "annotations": {},
|
|
6716
|
+
* // "availabilityType": "my_availabilityType",
|
|
6717
|
+
* // "clientConnectionConfig": {},
|
|
6718
|
+
* // "createTime": "my_createTime",
|
|
6719
|
+
* // "databaseFlags": {},
|
|
6720
|
+
* // "deleteTime": "my_deleteTime",
|
|
6721
|
+
* // "displayName": "my_displayName",
|
|
6722
|
+
* // "etag": "my_etag",
|
|
6723
|
+
* // "gceZone": "my_gceZone",
|
|
6724
|
+
* // "instanceType": "my_instanceType",
|
|
6725
|
+
* // "ipAddress": "my_ipAddress",
|
|
6726
|
+
* // "labels": {},
|
|
6727
|
+
* // "machineConfig": {},
|
|
6728
|
+
* // "name": "my_name",
|
|
6729
|
+
* // "networkConfig": {},
|
|
6730
|
+
* // "nodes": [],
|
|
6731
|
+
* // "observabilityConfig": {},
|
|
6732
|
+
* // "outboundPublicIpAddresses": [],
|
|
6733
|
+
* // "pscInstanceConfig": {},
|
|
6734
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6735
|
+
* // "queryInsightsConfig": {},
|
|
6736
|
+
* // "readPoolConfig": {},
|
|
6737
|
+
* // "reconciling": false,
|
|
6738
|
+
* // "satisfiesPzs": false,
|
|
6739
|
+
* // "state": "my_state",
|
|
6740
|
+
* // "uid": "my_uid",
|
|
6741
|
+
* // "updateTime": "my_updateTime",
|
|
6742
|
+
* // "writableNode": {}
|
|
6743
|
+
* // }
|
|
6744
|
+
* }
|
|
6745
|
+
*
|
|
6746
|
+
* main().catch(e => {
|
|
6747
|
+
* console.error(e);
|
|
6748
|
+
* throw e;
|
|
6749
|
+
* });
|
|
6750
|
+
*
|
|
6751
|
+
* ```
|
|
4921
6752
|
*
|
|
4922
6753
|
* @param params - Parameters for request
|
|
4923
6754
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5007,6 +6838,59 @@ export namespace alloydb_v1 {
|
|
|
5007
6838
|
|
|
5008
6839
|
/**
|
|
5009
6840
|
* Get instance metadata used for a connection.
|
|
6841
|
+
* @example
|
|
6842
|
+
* ```js
|
|
6843
|
+
* // Before running the sample:
|
|
6844
|
+
* // - Enable the API at:
|
|
6845
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6846
|
+
* // - Login into gcloud by running:
|
|
6847
|
+
* // ```sh
|
|
6848
|
+
* // $ gcloud auth application-default login
|
|
6849
|
+
* // ```
|
|
6850
|
+
* // - Install the npm module by running:
|
|
6851
|
+
* // ```sh
|
|
6852
|
+
* // $ npm install googleapis
|
|
6853
|
+
* // ```
|
|
6854
|
+
*
|
|
6855
|
+
* const {google} = require('googleapis');
|
|
6856
|
+
* const alloydb = google.alloydb('v1');
|
|
6857
|
+
*
|
|
6858
|
+
* async function main() {
|
|
6859
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6860
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6861
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6862
|
+
* });
|
|
6863
|
+
*
|
|
6864
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6865
|
+
* const authClient = await auth.getClient();
|
|
6866
|
+
* google.options({auth: authClient});
|
|
6867
|
+
*
|
|
6868
|
+
* // Do the magic
|
|
6869
|
+
* const res =
|
|
6870
|
+
* await alloydb.projects.locations.clusters.instances.getConnectionInfo({
|
|
6871
|
+
* // Required. The name of the parent resource. The required format is: projects/{project\}/locations/{location\}/clusters/{cluster\}/instances/{instance\}
|
|
6872
|
+
* parent:
|
|
6873
|
+
* 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6874
|
+
* // 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).
|
|
6875
|
+
* requestId: 'placeholder-value',
|
|
6876
|
+
* });
|
|
6877
|
+
* console.log(res.data);
|
|
6878
|
+
*
|
|
6879
|
+
* // Example response
|
|
6880
|
+
* // {
|
|
6881
|
+
* // "instanceUid": "my_instanceUid",
|
|
6882
|
+
* // "ipAddress": "my_ipAddress",
|
|
6883
|
+
* // "name": "my_name",
|
|
6884
|
+
* // "publicIpAddress": "my_publicIpAddress"
|
|
6885
|
+
* // }
|
|
6886
|
+
* }
|
|
6887
|
+
*
|
|
6888
|
+
* main().catch(e => {
|
|
6889
|
+
* console.error(e);
|
|
6890
|
+
* throw e;
|
|
6891
|
+
* });
|
|
6892
|
+
*
|
|
6893
|
+
* ```
|
|
5010
6894
|
*
|
|
5011
6895
|
* @param params - Parameters for request
|
|
5012
6896
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5101,6 +6985,66 @@ export namespace alloydb_v1 {
|
|
|
5101
6985
|
|
|
5102
6986
|
/**
|
|
5103
6987
|
* Injects fault in an instance. Imperative only.
|
|
6988
|
+
* @example
|
|
6989
|
+
* ```js
|
|
6990
|
+
* // Before running the sample:
|
|
6991
|
+
* // - Enable the API at:
|
|
6992
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6993
|
+
* // - Login into gcloud by running:
|
|
6994
|
+
* // ```sh
|
|
6995
|
+
* // $ gcloud auth application-default login
|
|
6996
|
+
* // ```
|
|
6997
|
+
* // - Install the npm module by running:
|
|
6998
|
+
* // ```sh
|
|
6999
|
+
* // $ npm install googleapis
|
|
7000
|
+
* // ```
|
|
7001
|
+
*
|
|
7002
|
+
* const {google} = require('googleapis');
|
|
7003
|
+
* const alloydb = google.alloydb('v1');
|
|
7004
|
+
*
|
|
7005
|
+
* async function main() {
|
|
7006
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7007
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7008
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7009
|
+
* });
|
|
7010
|
+
*
|
|
7011
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7012
|
+
* const authClient = await auth.getClient();
|
|
7013
|
+
* google.options({auth: authClient});
|
|
7014
|
+
*
|
|
7015
|
+
* // Do the magic
|
|
7016
|
+
* const res = await alloydb.projects.locations.clusters.instances.injectFault({
|
|
7017
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7018
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7019
|
+
*
|
|
7020
|
+
* // Request body metadata
|
|
7021
|
+
* requestBody: {
|
|
7022
|
+
* // request body parameters
|
|
7023
|
+
* // {
|
|
7024
|
+
* // "faultType": "my_faultType",
|
|
7025
|
+
* // "requestId": "my_requestId",
|
|
7026
|
+
* // "validateOnly": false
|
|
7027
|
+
* // }
|
|
7028
|
+
* },
|
|
7029
|
+
* });
|
|
7030
|
+
* console.log(res.data);
|
|
7031
|
+
*
|
|
7032
|
+
* // Example response
|
|
7033
|
+
* // {
|
|
7034
|
+
* // "done": false,
|
|
7035
|
+
* // "error": {},
|
|
7036
|
+
* // "metadata": {},
|
|
7037
|
+
* // "name": "my_name",
|
|
7038
|
+
* // "response": {}
|
|
7039
|
+
* // }
|
|
7040
|
+
* }
|
|
7041
|
+
*
|
|
7042
|
+
* main().catch(e => {
|
|
7043
|
+
* console.error(e);
|
|
7044
|
+
* throw e;
|
|
7045
|
+
* });
|
|
7046
|
+
*
|
|
7047
|
+
* ```
|
|
5104
7048
|
*
|
|
5105
7049
|
* @param params - Parameters for request
|
|
5106
7050
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5193,6 +7137,62 @@ export namespace alloydb_v1 {
|
|
|
5193
7137
|
|
|
5194
7138
|
/**
|
|
5195
7139
|
* Lists Instances in a given project and location.
|
|
7140
|
+
* @example
|
|
7141
|
+
* ```js
|
|
7142
|
+
* // Before running the sample:
|
|
7143
|
+
* // - Enable the API at:
|
|
7144
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7145
|
+
* // - Login into gcloud by running:
|
|
7146
|
+
* // ```sh
|
|
7147
|
+
* // $ gcloud auth application-default login
|
|
7148
|
+
* // ```
|
|
7149
|
+
* // - Install the npm module by running:
|
|
7150
|
+
* // ```sh
|
|
7151
|
+
* // $ npm install googleapis
|
|
7152
|
+
* // ```
|
|
7153
|
+
*
|
|
7154
|
+
* const {google} = require('googleapis');
|
|
7155
|
+
* const alloydb = google.alloydb('v1');
|
|
7156
|
+
*
|
|
7157
|
+
* async function main() {
|
|
7158
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7159
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7160
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7161
|
+
* });
|
|
7162
|
+
*
|
|
7163
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7164
|
+
* const authClient = await auth.getClient();
|
|
7165
|
+
* google.options({auth: authClient});
|
|
7166
|
+
*
|
|
7167
|
+
* // Do the magic
|
|
7168
|
+
* const res = await alloydb.projects.locations.clusters.instances.list({
|
|
7169
|
+
* // Optional. Filtering results
|
|
7170
|
+
* filter: 'placeholder-value',
|
|
7171
|
+
* // Optional. Hint for how to order the results
|
|
7172
|
+
* orderBy: 'placeholder-value',
|
|
7173
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
7174
|
+
* pageSize: 'placeholder-value',
|
|
7175
|
+
* // A token identifying a page of results the server should return.
|
|
7176
|
+
* pageToken: 'placeholder-value',
|
|
7177
|
+
* // 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/-
|
|
7178
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
7179
|
+
* });
|
|
7180
|
+
* console.log(res.data);
|
|
7181
|
+
*
|
|
7182
|
+
* // Example response
|
|
7183
|
+
* // {
|
|
7184
|
+
* // "instances": [],
|
|
7185
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
7186
|
+
* // "unreachable": []
|
|
7187
|
+
* // }
|
|
7188
|
+
* }
|
|
7189
|
+
*
|
|
7190
|
+
* main().catch(e => {
|
|
7191
|
+
* console.error(e);
|
|
7192
|
+
* throw e;
|
|
7193
|
+
* });
|
|
7194
|
+
*
|
|
7195
|
+
* ```
|
|
5196
7196
|
*
|
|
5197
7197
|
* @param params - Parameters for request
|
|
5198
7198
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5287,6 +7287,100 @@ export namespace alloydb_v1 {
|
|
|
5287
7287
|
|
|
5288
7288
|
/**
|
|
5289
7289
|
* Updates the parameters of a single Instance.
|
|
7290
|
+
* @example
|
|
7291
|
+
* ```js
|
|
7292
|
+
* // Before running the sample:
|
|
7293
|
+
* // - Enable the API at:
|
|
7294
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7295
|
+
* // - Login into gcloud by running:
|
|
7296
|
+
* // ```sh
|
|
7297
|
+
* // $ gcloud auth application-default login
|
|
7298
|
+
* // ```
|
|
7299
|
+
* // - Install the npm module by running:
|
|
7300
|
+
* // ```sh
|
|
7301
|
+
* // $ npm install googleapis
|
|
7302
|
+
* // ```
|
|
7303
|
+
*
|
|
7304
|
+
* const {google} = require('googleapis');
|
|
7305
|
+
* const alloydb = google.alloydb('v1');
|
|
7306
|
+
*
|
|
7307
|
+
* async function main() {
|
|
7308
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7309
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7310
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7311
|
+
* });
|
|
7312
|
+
*
|
|
7313
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7314
|
+
* const authClient = await auth.getClient();
|
|
7315
|
+
* google.options({auth: authClient});
|
|
7316
|
+
*
|
|
7317
|
+
* // Do the magic
|
|
7318
|
+
* const res = await alloydb.projects.locations.clusters.instances.patch({
|
|
7319
|
+
* // 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.
|
|
7320
|
+
* allowMissing: 'placeholder-value',
|
|
7321
|
+
* // 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\}
|
|
7322
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7323
|
+
* // 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).
|
|
7324
|
+
* requestId: 'placeholder-value',
|
|
7325
|
+
* // 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.
|
|
7326
|
+
* updateMask: 'placeholder-value',
|
|
7327
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
7328
|
+
* validateOnly: 'placeholder-value',
|
|
7329
|
+
*
|
|
7330
|
+
* // Request body metadata
|
|
7331
|
+
* requestBody: {
|
|
7332
|
+
* // request body parameters
|
|
7333
|
+
* // {
|
|
7334
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
7335
|
+
* // "annotations": {},
|
|
7336
|
+
* // "availabilityType": "my_availabilityType",
|
|
7337
|
+
* // "clientConnectionConfig": {},
|
|
7338
|
+
* // "createTime": "my_createTime",
|
|
7339
|
+
* // "databaseFlags": {},
|
|
7340
|
+
* // "deleteTime": "my_deleteTime",
|
|
7341
|
+
* // "displayName": "my_displayName",
|
|
7342
|
+
* // "etag": "my_etag",
|
|
7343
|
+
* // "gceZone": "my_gceZone",
|
|
7344
|
+
* // "instanceType": "my_instanceType",
|
|
7345
|
+
* // "ipAddress": "my_ipAddress",
|
|
7346
|
+
* // "labels": {},
|
|
7347
|
+
* // "machineConfig": {},
|
|
7348
|
+
* // "name": "my_name",
|
|
7349
|
+
* // "networkConfig": {},
|
|
7350
|
+
* // "nodes": [],
|
|
7351
|
+
* // "observabilityConfig": {},
|
|
7352
|
+
* // "outboundPublicIpAddresses": [],
|
|
7353
|
+
* // "pscInstanceConfig": {},
|
|
7354
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
7355
|
+
* // "queryInsightsConfig": {},
|
|
7356
|
+
* // "readPoolConfig": {},
|
|
7357
|
+
* // "reconciling": false,
|
|
7358
|
+
* // "satisfiesPzs": false,
|
|
7359
|
+
* // "state": "my_state",
|
|
7360
|
+
* // "uid": "my_uid",
|
|
7361
|
+
* // "updateTime": "my_updateTime",
|
|
7362
|
+
* // "writableNode": {}
|
|
7363
|
+
* // }
|
|
7364
|
+
* },
|
|
7365
|
+
* });
|
|
7366
|
+
* console.log(res.data);
|
|
7367
|
+
*
|
|
7368
|
+
* // Example response
|
|
7369
|
+
* // {
|
|
7370
|
+
* // "done": false,
|
|
7371
|
+
* // "error": {},
|
|
7372
|
+
* // "metadata": {},
|
|
7373
|
+
* // "name": "my_name",
|
|
7374
|
+
* // "response": {}
|
|
7375
|
+
* // }
|
|
7376
|
+
* }
|
|
7377
|
+
*
|
|
7378
|
+
* main().catch(e => {
|
|
7379
|
+
* console.error(e);
|
|
7380
|
+
* throw e;
|
|
7381
|
+
* });
|
|
7382
|
+
*
|
|
7383
|
+
* ```
|
|
5290
7384
|
*
|
|
5291
7385
|
* @param params - Parameters for request
|
|
5292
7386
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5376,6 +7470,66 @@ export namespace alloydb_v1 {
|
|
|
5376
7470
|
|
|
5377
7471
|
/**
|
|
5378
7472
|
* Restart an Instance in a cluster. Imperative only.
|
|
7473
|
+
* @example
|
|
7474
|
+
* ```js
|
|
7475
|
+
* // Before running the sample:
|
|
7476
|
+
* // - Enable the API at:
|
|
7477
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7478
|
+
* // - Login into gcloud by running:
|
|
7479
|
+
* // ```sh
|
|
7480
|
+
* // $ gcloud auth application-default login
|
|
7481
|
+
* // ```
|
|
7482
|
+
* // - Install the npm module by running:
|
|
7483
|
+
* // ```sh
|
|
7484
|
+
* // $ npm install googleapis
|
|
7485
|
+
* // ```
|
|
7486
|
+
*
|
|
7487
|
+
* const {google} = require('googleapis');
|
|
7488
|
+
* const alloydb = google.alloydb('v1');
|
|
7489
|
+
*
|
|
7490
|
+
* async function main() {
|
|
7491
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7492
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7493
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7494
|
+
* });
|
|
7495
|
+
*
|
|
7496
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7497
|
+
* const authClient = await auth.getClient();
|
|
7498
|
+
* google.options({auth: authClient});
|
|
7499
|
+
*
|
|
7500
|
+
* // Do the magic
|
|
7501
|
+
* const res = await alloydb.projects.locations.clusters.instances.restart({
|
|
7502
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7503
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7504
|
+
*
|
|
7505
|
+
* // Request body metadata
|
|
7506
|
+
* requestBody: {
|
|
7507
|
+
* // request body parameters
|
|
7508
|
+
* // {
|
|
7509
|
+
* // "nodeIds": [],
|
|
7510
|
+
* // "requestId": "my_requestId",
|
|
7511
|
+
* // "validateOnly": false
|
|
7512
|
+
* // }
|
|
7513
|
+
* },
|
|
7514
|
+
* });
|
|
7515
|
+
* console.log(res.data);
|
|
7516
|
+
*
|
|
7517
|
+
* // Example response
|
|
7518
|
+
* // {
|
|
7519
|
+
* // "done": false,
|
|
7520
|
+
* // "error": {},
|
|
7521
|
+
* // "metadata": {},
|
|
7522
|
+
* // "name": "my_name",
|
|
7523
|
+
* // "response": {}
|
|
7524
|
+
* // }
|
|
7525
|
+
* }
|
|
7526
|
+
*
|
|
7527
|
+
* main().catch(e => {
|
|
7528
|
+
* console.error(e);
|
|
7529
|
+
* throw e;
|
|
7530
|
+
* });
|
|
7531
|
+
*
|
|
7532
|
+
* ```
|
|
5379
7533
|
*
|
|
5380
7534
|
* @param params - Parameters for request
|
|
5381
7535
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5652,6 +7806,74 @@ export namespace alloydb_v1 {
|
|
|
5652
7806
|
|
|
5653
7807
|
/**
|
|
5654
7808
|
* Creates a new User in a given project, location, and cluster.
|
|
7809
|
+
* @example
|
|
7810
|
+
* ```js
|
|
7811
|
+
* // Before running the sample:
|
|
7812
|
+
* // - Enable the API at:
|
|
7813
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7814
|
+
* // - Login into gcloud by running:
|
|
7815
|
+
* // ```sh
|
|
7816
|
+
* // $ gcloud auth application-default login
|
|
7817
|
+
* // ```
|
|
7818
|
+
* // - Install the npm module by running:
|
|
7819
|
+
* // ```sh
|
|
7820
|
+
* // $ npm install googleapis
|
|
7821
|
+
* // ```
|
|
7822
|
+
*
|
|
7823
|
+
* const {google} = require('googleapis');
|
|
7824
|
+
* const alloydb = google.alloydb('v1');
|
|
7825
|
+
*
|
|
7826
|
+
* async function main() {
|
|
7827
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7828
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7829
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7830
|
+
* });
|
|
7831
|
+
*
|
|
7832
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7833
|
+
* const authClient = await auth.getClient();
|
|
7834
|
+
* google.options({auth: authClient});
|
|
7835
|
+
*
|
|
7836
|
+
* // Do the magic
|
|
7837
|
+
* const res = await alloydb.projects.locations.clusters.users.create({
|
|
7838
|
+
* // Required. Value for parent.
|
|
7839
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
7840
|
+
* // 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).
|
|
7841
|
+
* requestId: 'placeholder-value',
|
|
7842
|
+
* // Required. ID of the requesting object.
|
|
7843
|
+
* userId: 'placeholder-value',
|
|
7844
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
7845
|
+
* validateOnly: 'placeholder-value',
|
|
7846
|
+
*
|
|
7847
|
+
* // Request body metadata
|
|
7848
|
+
* requestBody: {
|
|
7849
|
+
* // request body parameters
|
|
7850
|
+
* // {
|
|
7851
|
+
* // "databaseRoles": [],
|
|
7852
|
+
* // "keepExtraRoles": false,
|
|
7853
|
+
* // "name": "my_name",
|
|
7854
|
+
* // "password": "my_password",
|
|
7855
|
+
* // "userType": "my_userType"
|
|
7856
|
+
* // }
|
|
7857
|
+
* },
|
|
7858
|
+
* });
|
|
7859
|
+
* console.log(res.data);
|
|
7860
|
+
*
|
|
7861
|
+
* // Example response
|
|
7862
|
+
* // {
|
|
7863
|
+
* // "databaseRoles": [],
|
|
7864
|
+
* // "keepExtraRoles": false,
|
|
7865
|
+
* // "name": "my_name",
|
|
7866
|
+
* // "password": "my_password",
|
|
7867
|
+
* // "userType": "my_userType"
|
|
7868
|
+
* // }
|
|
7869
|
+
* }
|
|
7870
|
+
*
|
|
7871
|
+
* main().catch(e => {
|
|
7872
|
+
* console.error(e);
|
|
7873
|
+
* throw e;
|
|
7874
|
+
* });
|
|
7875
|
+
*
|
|
7876
|
+
* ```
|
|
5655
7877
|
*
|
|
5656
7878
|
* @param params - Parameters for request
|
|
5657
7879
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5743,6 +7965,54 @@ export namespace alloydb_v1 {
|
|
|
5743
7965
|
|
|
5744
7966
|
/**
|
|
5745
7967
|
* Deletes a single User.
|
|
7968
|
+
* @example
|
|
7969
|
+
* ```js
|
|
7970
|
+
* // Before running the sample:
|
|
7971
|
+
* // - Enable the API at:
|
|
7972
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7973
|
+
* // - Login into gcloud by running:
|
|
7974
|
+
* // ```sh
|
|
7975
|
+
* // $ gcloud auth application-default login
|
|
7976
|
+
* // ```
|
|
7977
|
+
* // - Install the npm module by running:
|
|
7978
|
+
* // ```sh
|
|
7979
|
+
* // $ npm install googleapis
|
|
7980
|
+
* // ```
|
|
7981
|
+
*
|
|
7982
|
+
* const {google} = require('googleapis');
|
|
7983
|
+
* const alloydb = google.alloydb('v1');
|
|
7984
|
+
*
|
|
7985
|
+
* async function main() {
|
|
7986
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7987
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7988
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7989
|
+
* });
|
|
7990
|
+
*
|
|
7991
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7992
|
+
* const authClient = await auth.getClient();
|
|
7993
|
+
* google.options({auth: authClient});
|
|
7994
|
+
*
|
|
7995
|
+
* // Do the magic
|
|
7996
|
+
* const res = await alloydb.projects.locations.clusters.users.delete({
|
|
7997
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
7998
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
7999
|
+
* // 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).
|
|
8000
|
+
* requestId: 'placeholder-value',
|
|
8001
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8002
|
+
* validateOnly: 'placeholder-value',
|
|
8003
|
+
* });
|
|
8004
|
+
* console.log(res.data);
|
|
8005
|
+
*
|
|
8006
|
+
* // Example response
|
|
8007
|
+
* // {}
|
|
8008
|
+
* }
|
|
8009
|
+
*
|
|
8010
|
+
* main().catch(e => {
|
|
8011
|
+
* console.error(e);
|
|
8012
|
+
* throw e;
|
|
8013
|
+
* });
|
|
8014
|
+
*
|
|
8015
|
+
* ```
|
|
5746
8016
|
*
|
|
5747
8017
|
* @param params - Parameters for request
|
|
5748
8018
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5831,6 +8101,56 @@ export namespace alloydb_v1 {
|
|
|
5831
8101
|
|
|
5832
8102
|
/**
|
|
5833
8103
|
* Gets details of a single User.
|
|
8104
|
+
* @example
|
|
8105
|
+
* ```js
|
|
8106
|
+
* // Before running the sample:
|
|
8107
|
+
* // - Enable the API at:
|
|
8108
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8109
|
+
* // - Login into gcloud by running:
|
|
8110
|
+
* // ```sh
|
|
8111
|
+
* // $ gcloud auth application-default login
|
|
8112
|
+
* // ```
|
|
8113
|
+
* // - Install the npm module by running:
|
|
8114
|
+
* // ```sh
|
|
8115
|
+
* // $ npm install googleapis
|
|
8116
|
+
* // ```
|
|
8117
|
+
*
|
|
8118
|
+
* const {google} = require('googleapis');
|
|
8119
|
+
* const alloydb = google.alloydb('v1');
|
|
8120
|
+
*
|
|
8121
|
+
* async function main() {
|
|
8122
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8123
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8124
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8125
|
+
* });
|
|
8126
|
+
*
|
|
8127
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8128
|
+
* const authClient = await auth.getClient();
|
|
8129
|
+
* google.options({auth: authClient});
|
|
8130
|
+
*
|
|
8131
|
+
* // Do the magic
|
|
8132
|
+
* const res = await alloydb.projects.locations.clusters.users.get({
|
|
8133
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
8134
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8135
|
+
* });
|
|
8136
|
+
* console.log(res.data);
|
|
8137
|
+
*
|
|
8138
|
+
* // Example response
|
|
8139
|
+
* // {
|
|
8140
|
+
* // "databaseRoles": [],
|
|
8141
|
+
* // "keepExtraRoles": false,
|
|
8142
|
+
* // "name": "my_name",
|
|
8143
|
+
* // "password": "my_password",
|
|
8144
|
+
* // "userType": "my_userType"
|
|
8145
|
+
* // }
|
|
8146
|
+
* }
|
|
8147
|
+
*
|
|
8148
|
+
* main().catch(e => {
|
|
8149
|
+
* console.error(e);
|
|
8150
|
+
* throw e;
|
|
8151
|
+
* });
|
|
8152
|
+
*
|
|
8153
|
+
* ```
|
|
5834
8154
|
*
|
|
5835
8155
|
* @param params - Parameters for request
|
|
5836
8156
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5919,6 +8239,62 @@ export namespace alloydb_v1 {
|
|
|
5919
8239
|
|
|
5920
8240
|
/**
|
|
5921
8241
|
* Lists Users in a given project and location.
|
|
8242
|
+
* @example
|
|
8243
|
+
* ```js
|
|
8244
|
+
* // Before running the sample:
|
|
8245
|
+
* // - Enable the API at:
|
|
8246
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8247
|
+
* // - Login into gcloud by running:
|
|
8248
|
+
* // ```sh
|
|
8249
|
+
* // $ gcloud auth application-default login
|
|
8250
|
+
* // ```
|
|
8251
|
+
* // - Install the npm module by running:
|
|
8252
|
+
* // ```sh
|
|
8253
|
+
* // $ npm install googleapis
|
|
8254
|
+
* // ```
|
|
8255
|
+
*
|
|
8256
|
+
* const {google} = require('googleapis');
|
|
8257
|
+
* const alloydb = google.alloydb('v1');
|
|
8258
|
+
*
|
|
8259
|
+
* async function main() {
|
|
8260
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8261
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8262
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8263
|
+
* });
|
|
8264
|
+
*
|
|
8265
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8266
|
+
* const authClient = await auth.getClient();
|
|
8267
|
+
* google.options({auth: authClient});
|
|
8268
|
+
*
|
|
8269
|
+
* // Do the magic
|
|
8270
|
+
* const res = await alloydb.projects.locations.clusters.users.list({
|
|
8271
|
+
* // Optional. Filtering results
|
|
8272
|
+
* filter: 'placeholder-value',
|
|
8273
|
+
* // Optional. Hint for how to order the results
|
|
8274
|
+
* orderBy: 'placeholder-value',
|
|
8275
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
8276
|
+
* pageSize: 'placeholder-value',
|
|
8277
|
+
* // Optional. A token identifying a page of results the server should return.
|
|
8278
|
+
* pageToken: 'placeholder-value',
|
|
8279
|
+
* // Required. Parent value for ListUsersRequest
|
|
8280
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
8281
|
+
* });
|
|
8282
|
+
* console.log(res.data);
|
|
8283
|
+
*
|
|
8284
|
+
* // Example response
|
|
8285
|
+
* // {
|
|
8286
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
8287
|
+
* // "unreachable": [],
|
|
8288
|
+
* // "users": []
|
|
8289
|
+
* // }
|
|
8290
|
+
* }
|
|
8291
|
+
*
|
|
8292
|
+
* main().catch(e => {
|
|
8293
|
+
* console.error(e);
|
|
8294
|
+
* throw e;
|
|
8295
|
+
* });
|
|
8296
|
+
*
|
|
8297
|
+
* ```
|
|
5922
8298
|
*
|
|
5923
8299
|
* @param params - Parameters for request
|
|
5924
8300
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6010,6 +8386,76 @@ export namespace alloydb_v1 {
|
|
|
6010
8386
|
|
|
6011
8387
|
/**
|
|
6012
8388
|
* Updates the parameters of a single User.
|
|
8389
|
+
* @example
|
|
8390
|
+
* ```js
|
|
8391
|
+
* // Before running the sample:
|
|
8392
|
+
* // - Enable the API at:
|
|
8393
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8394
|
+
* // - Login into gcloud by running:
|
|
8395
|
+
* // ```sh
|
|
8396
|
+
* // $ gcloud auth application-default login
|
|
8397
|
+
* // ```
|
|
8398
|
+
* // - Install the npm module by running:
|
|
8399
|
+
* // ```sh
|
|
8400
|
+
* // $ npm install googleapis
|
|
8401
|
+
* // ```
|
|
8402
|
+
*
|
|
8403
|
+
* const {google} = require('googleapis');
|
|
8404
|
+
* const alloydb = google.alloydb('v1');
|
|
8405
|
+
*
|
|
8406
|
+
* async function main() {
|
|
8407
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8408
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8409
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8410
|
+
* });
|
|
8411
|
+
*
|
|
8412
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8413
|
+
* const authClient = await auth.getClient();
|
|
8414
|
+
* google.options({auth: authClient});
|
|
8415
|
+
*
|
|
8416
|
+
* // Do the magic
|
|
8417
|
+
* const res = await alloydb.projects.locations.clusters.users.patch({
|
|
8418
|
+
* // Optional. Allow missing fields in the update mask.
|
|
8419
|
+
* allowMissing: 'placeholder-value',
|
|
8420
|
+
* // Output only. Name of the resource in the form of projects/{project\}/locations/{location\}/cluster/{cluster\}/users/{user\}.
|
|
8421
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8422
|
+
* // 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).
|
|
8423
|
+
* requestId: 'placeholder-value',
|
|
8424
|
+
* // 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.
|
|
8425
|
+
* updateMask: 'placeholder-value',
|
|
8426
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8427
|
+
* validateOnly: 'placeholder-value',
|
|
8428
|
+
*
|
|
8429
|
+
* // Request body metadata
|
|
8430
|
+
* requestBody: {
|
|
8431
|
+
* // request body parameters
|
|
8432
|
+
* // {
|
|
8433
|
+
* // "databaseRoles": [],
|
|
8434
|
+
* // "keepExtraRoles": false,
|
|
8435
|
+
* // "name": "my_name",
|
|
8436
|
+
* // "password": "my_password",
|
|
8437
|
+
* // "userType": "my_userType"
|
|
8438
|
+
* // }
|
|
8439
|
+
* },
|
|
8440
|
+
* });
|
|
8441
|
+
* console.log(res.data);
|
|
8442
|
+
*
|
|
8443
|
+
* // Example response
|
|
8444
|
+
* // {
|
|
8445
|
+
* // "databaseRoles": [],
|
|
8446
|
+
* // "keepExtraRoles": false,
|
|
8447
|
+
* // "name": "my_name",
|
|
8448
|
+
* // "password": "my_password",
|
|
8449
|
+
* // "userType": "my_userType"
|
|
8450
|
+
* // }
|
|
8451
|
+
* }
|
|
8452
|
+
*
|
|
8453
|
+
* main().catch(e => {
|
|
8454
|
+
* console.error(e);
|
|
8455
|
+
* throw e;
|
|
8456
|
+
* });
|
|
8457
|
+
*
|
|
8458
|
+
* ```
|
|
6013
8459
|
*
|
|
6014
8460
|
* @param params - Parameters for request
|
|
6015
8461
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6203,6 +8649,56 @@ export namespace alloydb_v1 {
|
|
|
6203
8649
|
|
|
6204
8650
|
/**
|
|
6205
8651
|
* 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`.
|
|
8652
|
+
* @example
|
|
8653
|
+
* ```js
|
|
8654
|
+
* // Before running the sample:
|
|
8655
|
+
* // - Enable the API at:
|
|
8656
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8657
|
+
* // - Login into gcloud by running:
|
|
8658
|
+
* // ```sh
|
|
8659
|
+
* // $ gcloud auth application-default login
|
|
8660
|
+
* // ```
|
|
8661
|
+
* // - Install the npm module by running:
|
|
8662
|
+
* // ```sh
|
|
8663
|
+
* // $ npm install googleapis
|
|
8664
|
+
* // ```
|
|
8665
|
+
*
|
|
8666
|
+
* const {google} = require('googleapis');
|
|
8667
|
+
* const alloydb = google.alloydb('v1');
|
|
8668
|
+
*
|
|
8669
|
+
* async function main() {
|
|
8670
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8671
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8672
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8673
|
+
* });
|
|
8674
|
+
*
|
|
8675
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8676
|
+
* const authClient = await auth.getClient();
|
|
8677
|
+
* google.options({auth: authClient});
|
|
8678
|
+
*
|
|
8679
|
+
* // Do the magic
|
|
8680
|
+
* const res = await alloydb.projects.locations.operations.cancel({
|
|
8681
|
+
* // The name of the operation resource to be cancelled.
|
|
8682
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8683
|
+
*
|
|
8684
|
+
* // Request body metadata
|
|
8685
|
+
* requestBody: {
|
|
8686
|
+
* // request body parameters
|
|
8687
|
+
* // {}
|
|
8688
|
+
* },
|
|
8689
|
+
* });
|
|
8690
|
+
* console.log(res.data);
|
|
8691
|
+
*
|
|
8692
|
+
* // Example response
|
|
8693
|
+
* // {}
|
|
8694
|
+
* }
|
|
8695
|
+
*
|
|
8696
|
+
* main().catch(e => {
|
|
8697
|
+
* console.error(e);
|
|
8698
|
+
* throw e;
|
|
8699
|
+
* });
|
|
8700
|
+
*
|
|
8701
|
+
* ```
|
|
6206
8702
|
*
|
|
6207
8703
|
* @param params - Parameters for request
|
|
6208
8704
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6291,6 +8787,50 @@ export namespace alloydb_v1 {
|
|
|
6291
8787
|
|
|
6292
8788
|
/**
|
|
6293
8789
|
* 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`.
|
|
8790
|
+
* @example
|
|
8791
|
+
* ```js
|
|
8792
|
+
* // Before running the sample:
|
|
8793
|
+
* // - Enable the API at:
|
|
8794
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8795
|
+
* // - Login into gcloud by running:
|
|
8796
|
+
* // ```sh
|
|
8797
|
+
* // $ gcloud auth application-default login
|
|
8798
|
+
* // ```
|
|
8799
|
+
* // - Install the npm module by running:
|
|
8800
|
+
* // ```sh
|
|
8801
|
+
* // $ npm install googleapis
|
|
8802
|
+
* // ```
|
|
8803
|
+
*
|
|
8804
|
+
* const {google} = require('googleapis');
|
|
8805
|
+
* const alloydb = google.alloydb('v1');
|
|
8806
|
+
*
|
|
8807
|
+
* async function main() {
|
|
8808
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8809
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8810
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8811
|
+
* });
|
|
8812
|
+
*
|
|
8813
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8814
|
+
* const authClient = await auth.getClient();
|
|
8815
|
+
* google.options({auth: authClient});
|
|
8816
|
+
*
|
|
8817
|
+
* // Do the magic
|
|
8818
|
+
* const res = await alloydb.projects.locations.operations.delete({
|
|
8819
|
+
* // The name of the operation resource to be deleted.
|
|
8820
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8821
|
+
* });
|
|
8822
|
+
* console.log(res.data);
|
|
8823
|
+
*
|
|
8824
|
+
* // Example response
|
|
8825
|
+
* // {}
|
|
8826
|
+
* }
|
|
8827
|
+
*
|
|
8828
|
+
* main().catch(e => {
|
|
8829
|
+
* console.error(e);
|
|
8830
|
+
* throw e;
|
|
8831
|
+
* });
|
|
8832
|
+
*
|
|
8833
|
+
* ```
|
|
6294
8834
|
*
|
|
6295
8835
|
* @param params - Parameters for request
|
|
6296
8836
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6379,6 +8919,56 @@ export namespace alloydb_v1 {
|
|
|
6379
8919
|
|
|
6380
8920
|
/**
|
|
6381
8921
|
* 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.
|
|
8922
|
+
* @example
|
|
8923
|
+
* ```js
|
|
8924
|
+
* // Before running the sample:
|
|
8925
|
+
* // - Enable the API at:
|
|
8926
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8927
|
+
* // - Login into gcloud by running:
|
|
8928
|
+
* // ```sh
|
|
8929
|
+
* // $ gcloud auth application-default login
|
|
8930
|
+
* // ```
|
|
8931
|
+
* // - Install the npm module by running:
|
|
8932
|
+
* // ```sh
|
|
8933
|
+
* // $ npm install googleapis
|
|
8934
|
+
* // ```
|
|
8935
|
+
*
|
|
8936
|
+
* const {google} = require('googleapis');
|
|
8937
|
+
* const alloydb = google.alloydb('v1');
|
|
8938
|
+
*
|
|
8939
|
+
* async function main() {
|
|
8940
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8941
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8942
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8943
|
+
* });
|
|
8944
|
+
*
|
|
8945
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8946
|
+
* const authClient = await auth.getClient();
|
|
8947
|
+
* google.options({auth: authClient});
|
|
8948
|
+
*
|
|
8949
|
+
* // Do the magic
|
|
8950
|
+
* const res = await alloydb.projects.locations.operations.get({
|
|
8951
|
+
* // The name of the operation resource.
|
|
8952
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8953
|
+
* });
|
|
8954
|
+
* console.log(res.data);
|
|
8955
|
+
*
|
|
8956
|
+
* // Example response
|
|
8957
|
+
* // {
|
|
8958
|
+
* // "done": false,
|
|
8959
|
+
* // "error": {},
|
|
8960
|
+
* // "metadata": {},
|
|
8961
|
+
* // "name": "my_name",
|
|
8962
|
+
* // "response": {}
|
|
8963
|
+
* // }
|
|
8964
|
+
* }
|
|
8965
|
+
*
|
|
8966
|
+
* main().catch(e => {
|
|
8967
|
+
* console.error(e);
|
|
8968
|
+
* throw e;
|
|
8969
|
+
* });
|
|
8970
|
+
*
|
|
8971
|
+
* ```
|
|
6382
8972
|
*
|
|
6383
8973
|
* @param params - Parameters for request
|
|
6384
8974
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6467,6 +9057,59 @@ export namespace alloydb_v1 {
|
|
|
6467
9057
|
|
|
6468
9058
|
/**
|
|
6469
9059
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
9060
|
+
* @example
|
|
9061
|
+
* ```js
|
|
9062
|
+
* // Before running the sample:
|
|
9063
|
+
* // - Enable the API at:
|
|
9064
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9065
|
+
* // - Login into gcloud by running:
|
|
9066
|
+
* // ```sh
|
|
9067
|
+
* // $ gcloud auth application-default login
|
|
9068
|
+
* // ```
|
|
9069
|
+
* // - Install the npm module by running:
|
|
9070
|
+
* // ```sh
|
|
9071
|
+
* // $ npm install googleapis
|
|
9072
|
+
* // ```
|
|
9073
|
+
*
|
|
9074
|
+
* const {google} = require('googleapis');
|
|
9075
|
+
* const alloydb = google.alloydb('v1');
|
|
9076
|
+
*
|
|
9077
|
+
* async function main() {
|
|
9078
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9079
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9080
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9081
|
+
* });
|
|
9082
|
+
*
|
|
9083
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9084
|
+
* const authClient = await auth.getClient();
|
|
9085
|
+
* google.options({auth: authClient});
|
|
9086
|
+
*
|
|
9087
|
+
* // Do the magic
|
|
9088
|
+
* const res = await alloydb.projects.locations.operations.list({
|
|
9089
|
+
* // The standard list filter.
|
|
9090
|
+
* filter: 'placeholder-value',
|
|
9091
|
+
* // The name of the operation's parent resource.
|
|
9092
|
+
* name: 'projects/my-project/locations/my-location',
|
|
9093
|
+
* // The standard list page size.
|
|
9094
|
+
* pageSize: 'placeholder-value',
|
|
9095
|
+
* // The standard list page token.
|
|
9096
|
+
* pageToken: 'placeholder-value',
|
|
9097
|
+
* });
|
|
9098
|
+
* console.log(res.data);
|
|
9099
|
+
*
|
|
9100
|
+
* // Example response
|
|
9101
|
+
* // {
|
|
9102
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9103
|
+
* // "operations": []
|
|
9104
|
+
* // }
|
|
9105
|
+
* }
|
|
9106
|
+
*
|
|
9107
|
+
* main().catch(e => {
|
|
9108
|
+
* console.error(e);
|
|
9109
|
+
* throw e;
|
|
9110
|
+
* });
|
|
9111
|
+
*
|
|
9112
|
+
* ```
|
|
6470
9113
|
*
|
|
6471
9114
|
* @param params - Parameters for request
|
|
6472
9115
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6613,6 +9256,59 @@ export namespace alloydb_v1 {
|
|
|
6613
9256
|
|
|
6614
9257
|
/**
|
|
6615
9258
|
* Lists SupportedDatabaseFlags for a given project and location.
|
|
9259
|
+
* @example
|
|
9260
|
+
* ```js
|
|
9261
|
+
* // Before running the sample:
|
|
9262
|
+
* // - Enable the API at:
|
|
9263
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9264
|
+
* // - Login into gcloud by running:
|
|
9265
|
+
* // ```sh
|
|
9266
|
+
* // $ gcloud auth application-default login
|
|
9267
|
+
* // ```
|
|
9268
|
+
* // - Install the npm module by running:
|
|
9269
|
+
* // ```sh
|
|
9270
|
+
* // $ npm install googleapis
|
|
9271
|
+
* // ```
|
|
9272
|
+
*
|
|
9273
|
+
* const {google} = require('googleapis');
|
|
9274
|
+
* const alloydb = google.alloydb('v1');
|
|
9275
|
+
*
|
|
9276
|
+
* async function main() {
|
|
9277
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9278
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9279
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9280
|
+
* });
|
|
9281
|
+
*
|
|
9282
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9283
|
+
* const authClient = await auth.getClient();
|
|
9284
|
+
* google.options({auth: authClient});
|
|
9285
|
+
*
|
|
9286
|
+
* // Do the magic
|
|
9287
|
+
* const res = await alloydb.projects.locations.supportedDatabaseFlags.list({
|
|
9288
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
9289
|
+
* pageSize: 'placeholder-value',
|
|
9290
|
+
* // A token identifying a page of results the server should return.
|
|
9291
|
+
* pageToken: 'placeholder-value',
|
|
9292
|
+
* // 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.
|
|
9293
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
9294
|
+
* // Optional. The scope for which supported flags are requested. If not specified, default is DATABASE.
|
|
9295
|
+
* scope: 'placeholder-value',
|
|
9296
|
+
* });
|
|
9297
|
+
* console.log(res.data);
|
|
9298
|
+
*
|
|
9299
|
+
* // Example response
|
|
9300
|
+
* // {
|
|
9301
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9302
|
+
* // "supportedDatabaseFlags": []
|
|
9303
|
+
* // }
|
|
9304
|
+
* }
|
|
9305
|
+
*
|
|
9306
|
+
* main().catch(e => {
|
|
9307
|
+
* console.error(e);
|
|
9308
|
+
* throw e;
|
|
9309
|
+
* });
|
|
9310
|
+
*
|
|
9311
|
+
* ```
|
|
6616
9312
|
*
|
|
6617
9313
|
* @param params - Parameters for request
|
|
6618
9314
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|