@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/v1alpha.ts
CHANGED
|
@@ -452,6 +452,10 @@ export namespace alloydb_v1alpha {
|
|
|
452
452
|
* Cross Region replication config specific to SECONDARY cluster.
|
|
453
453
|
*/
|
|
454
454
|
secondaryConfig?: Schema$SecondaryConfig;
|
|
455
|
+
/**
|
|
456
|
+
* Output only. AlloyDB per-cluster service account. This service account is created per-cluster per-project, and is different from the per-project service account. The per-cluster service account naming format is subject to change.
|
|
457
|
+
*/
|
|
458
|
+
serviceAccountEmail?: string | null;
|
|
455
459
|
/**
|
|
456
460
|
* SSL configuration for this AlloyDB cluster.
|
|
457
461
|
*/
|
|
@@ -544,7 +548,7 @@ export namespace alloydb_v1alpha {
|
|
|
544
548
|
*/
|
|
545
549
|
export interface Schema$ConnectionPoolConfig {
|
|
546
550
|
/**
|
|
547
|
-
* Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to 20.
|
|
551
|
+
* Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to 20. Note: This field should not be added to client libraries if not present already.
|
|
548
552
|
*/
|
|
549
553
|
defaultPoolSize?: string | null;
|
|
550
554
|
/**
|
|
@@ -560,35 +564,39 @@ export namespace alloydb_v1alpha {
|
|
|
560
564
|
*/
|
|
561
565
|
flags?: {[key: string]: string} | null;
|
|
562
566
|
/**
|
|
563
|
-
* Optional. Deprecated. Use 'flags' instead. The list of startup parameters to ignore. Defaults to ["extra_float_digits"]
|
|
567
|
+
* Optional. Deprecated. Use 'flags' instead. The list of startup parameters to ignore. Defaults to ["extra_float_digits"] Note: This field should not be added to client libraries if not present already.
|
|
564
568
|
*/
|
|
565
569
|
ignoreStartupParameters?: string[] | null;
|
|
566
570
|
/**
|
|
567
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of client connections allowed.
|
|
571
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of client connections allowed. Note: This field should not be added to client libraries if not present already.
|
|
568
572
|
*/
|
|
569
573
|
maxClientConn?: string | null;
|
|
570
574
|
/**
|
|
571
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of prepared statements allowed. MCP makes sure that any statement prepared by a client, up to this limit, is available on the backing server connection in transaction and statement pooling mode. Even if the statement was originally prepared on another server connection. Defaults to 0.
|
|
575
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of prepared statements allowed. MCP makes sure that any statement prepared by a client, up to this limit, is available on the backing server connection in transaction and statement pooling mode. Even if the statement was originally prepared on another server connection. Defaults to 0. Note: This field should not be added to client libraries if not present already.
|
|
572
576
|
*/
|
|
573
577
|
maxPreparedStatements?: string | null;
|
|
574
578
|
/**
|
|
575
|
-
* Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to 0.
|
|
579
|
+
* Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to 0. Note: This field should not be added to client libraries if not present already.
|
|
576
580
|
*/
|
|
577
581
|
minPoolSize?: string | null;
|
|
578
582
|
/**
|
|
579
|
-
*
|
|
583
|
+
* Output only. The number of running poolers per instance.
|
|
584
|
+
*/
|
|
585
|
+
poolerCount?: number | null;
|
|
586
|
+
/**
|
|
587
|
+
* Optional. Deprecated. Use 'flags' instead. The pool mode. Defaults to `POOL_MODE_TRANSACTION`. Note: This field should not be added to client libraries if not present already.
|
|
580
588
|
*/
|
|
581
589
|
poolMode?: string | null;
|
|
582
590
|
/**
|
|
583
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds queries are allowed to spend waiting for execution. If the query is not assigned to a server during that time, the client is disconnected. 0 disables.
|
|
591
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds queries are allowed to spend waiting for execution. If the query is not assigned to a server during that time, the client is disconnected. 0 disables. Note: This field should not be added to client libraries if not present already.
|
|
584
592
|
*/
|
|
585
593
|
queryWaitTimeout?: string | null;
|
|
586
594
|
/**
|
|
587
|
-
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a server is allowed to be idle before it is disconnected. 0 disables.
|
|
595
|
+
* Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a server is allowed to be idle before it is disconnected. 0 disables. Note: This field should not be added to client libraries if not present already.
|
|
588
596
|
*/
|
|
589
597
|
serverIdleTimeout?: string | null;
|
|
590
598
|
/**
|
|
591
|
-
* Optional. Deprecated. Use 'flags' instead. The list of users that are allowed to connect to the MCP stats console. The users must exist in the database.
|
|
599
|
+
* Optional. Deprecated. Use 'flags' instead. The list of users that are allowed to connect to the MCP stats console. The users must exist in the database. Note: This field should not be added to client libraries if not present already.
|
|
592
600
|
*/
|
|
593
601
|
statsUsers?: string[] | null;
|
|
594
602
|
}
|
|
@@ -785,7 +793,7 @@ export namespace alloydb_v1alpha {
|
|
|
785
793
|
uri?: string | null;
|
|
786
794
|
}
|
|
787
795
|
/**
|
|
788
|
-
* Deprecated and unused. This
|
|
796
|
+
* Deprecated and unused. This message will be removed in the near future.
|
|
789
797
|
*/
|
|
790
798
|
export interface Schema$GeminiClusterConfig {
|
|
791
799
|
/**
|
|
@@ -794,7 +802,7 @@ export namespace alloydb_v1alpha {
|
|
|
794
802
|
entitled?: boolean | null;
|
|
795
803
|
}
|
|
796
804
|
/**
|
|
797
|
-
* Deprecated and unused. This
|
|
805
|
+
* Deprecated and unused. This message will be removed in the near future.
|
|
798
806
|
*/
|
|
799
807
|
export interface Schema$GeminiInstanceConfig {
|
|
800
808
|
/**
|
|
@@ -1066,7 +1074,7 @@ export namespace alloydb_v1alpha {
|
|
|
1066
1074
|
*/
|
|
1067
1075
|
export interface Schema$InstanceNetworkConfig {
|
|
1068
1076
|
/**
|
|
1069
|
-
* Optional. Name of the allocated IP range for the private IP AlloyDB instance, for example: "google-managed-services-default". If set, the instance IPs will be created from this allocated range and will override the IP range used by the parent cluster. The range name must comply with [RFC 1035](http://
|
|
1077
|
+
* Optional. Name of the allocated IP range for the private IP AlloyDB instance, for example: "google-managed-services-default". If set, the instance IPs will be created from this allocated range and will override the IP range used by the parent cluster. The range name must comply with [RFC 1035](http://datatracker.ietf.org/doc/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?.
|
|
1070
1078
|
*/
|
|
1071
1079
|
allocatedIpRangeOverride?: string | null;
|
|
1072
1080
|
/**
|
|
@@ -1087,7 +1095,7 @@ export namespace alloydb_v1alpha {
|
|
|
1087
1095
|
network?: string | null;
|
|
1088
1096
|
}
|
|
1089
1097
|
/**
|
|
1090
|
-
* Details regarding the upgrade of
|
|
1098
|
+
* Details regarding the upgrade of instances associated with a cluster.
|
|
1091
1099
|
*/
|
|
1092
1100
|
export interface Schema$InstanceUpgradeDetails {
|
|
1093
1101
|
/**
|
|
@@ -1341,6 +1349,10 @@ export namespace alloydb_v1alpha {
|
|
|
1341
1349
|
* Track actively running queries on the instance. If not set, this flag is "off" by default.
|
|
1342
1350
|
*/
|
|
1343
1351
|
trackActiveQueries?: boolean | null;
|
|
1352
|
+
/**
|
|
1353
|
+
* Track client address for an instance. If not set, default value is "off".
|
|
1354
|
+
*/
|
|
1355
|
+
trackClientAddress?: boolean | null;
|
|
1344
1356
|
/**
|
|
1345
1357
|
* Track wait events during query execution for an instance. This flag is turned "on" by default but tracking is enabled only after observability enabled flag is also turned on.
|
|
1346
1358
|
*/
|
|
@@ -1695,6 +1707,27 @@ export namespace alloydb_v1alpha {
|
|
|
1695
1707
|
*/
|
|
1696
1708
|
status?: string | null;
|
|
1697
1709
|
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Timing information for the stage execution.
|
|
1712
|
+
*/
|
|
1713
|
+
export interface Schema$StageSchedule {
|
|
1714
|
+
/**
|
|
1715
|
+
* Actual end time of the stage. Set only if the stage has completed.
|
|
1716
|
+
*/
|
|
1717
|
+
actualEndTime?: string | null;
|
|
1718
|
+
/**
|
|
1719
|
+
* Actual start time of the stage. Set only if the stage has started.
|
|
1720
|
+
*/
|
|
1721
|
+
actualStartTime?: string | null;
|
|
1722
|
+
/**
|
|
1723
|
+
* When the stage is expected to end. Set only if the stage has not completed yet.
|
|
1724
|
+
*/
|
|
1725
|
+
estimatedEndTime?: string | null;
|
|
1726
|
+
/**
|
|
1727
|
+
* When the stage is expected to start. Set only if the stage has not started yet.
|
|
1728
|
+
*/
|
|
1729
|
+
estimatedStartTime?: string | null;
|
|
1730
|
+
}
|
|
1698
1731
|
/**
|
|
1699
1732
|
* Status of an upgrade stage.
|
|
1700
1733
|
*/
|
|
@@ -1703,6 +1736,10 @@ export namespace alloydb_v1alpha {
|
|
|
1703
1736
|
* Read pool instances upgrade metadata.
|
|
1704
1737
|
*/
|
|
1705
1738
|
readPoolInstancesUpgrade?: Schema$ReadPoolInstancesUpgradeStageStatus;
|
|
1739
|
+
/**
|
|
1740
|
+
* Output only. Timing information for the stage execution.
|
|
1741
|
+
*/
|
|
1742
|
+
schedule?: Schema$StageSchedule;
|
|
1706
1743
|
/**
|
|
1707
1744
|
* Upgrade stage.
|
|
1708
1745
|
*/
|
|
@@ -1786,6 +1823,15 @@ export namespace alloydb_v1alpha {
|
|
|
1786
1823
|
*/
|
|
1787
1824
|
pointInTimeRecoveryEnabled?: boolean | null;
|
|
1788
1825
|
}
|
|
1826
|
+
/**
|
|
1827
|
+
* BackupDRConfiguration to capture the backup and disaster recovery details of database resource.
|
|
1828
|
+
*/
|
|
1829
|
+
export interface Schema$StorageDatabasecenterPartnerapiV1mainBackupDRConfiguration {
|
|
1830
|
+
/**
|
|
1831
|
+
* Indicates if the resource is managed by BackupDR.
|
|
1832
|
+
*/
|
|
1833
|
+
backupdrManaged?: boolean | null;
|
|
1834
|
+
}
|
|
1789
1835
|
/**
|
|
1790
1836
|
* A backup run.
|
|
1791
1837
|
*/
|
|
@@ -1820,6 +1866,31 @@ export namespace alloydb_v1alpha {
|
|
|
1820
1866
|
*/
|
|
1821
1867
|
version?: string | null;
|
|
1822
1868
|
}
|
|
1869
|
+
/**
|
|
1870
|
+
* 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.
|
|
1871
|
+
*/
|
|
1872
|
+
export interface Schema$StorageDatabasecenterPartnerapiV1mainConfigBasedSignalData {
|
|
1873
|
+
/**
|
|
1874
|
+
* Required. Full Resource name of the source resource.
|
|
1875
|
+
*/
|
|
1876
|
+
fullResourceName?: string | null;
|
|
1877
|
+
/**
|
|
1878
|
+
* Required. Last time signal was refreshed
|
|
1879
|
+
*/
|
|
1880
|
+
lastRefreshTime?: string | null;
|
|
1881
|
+
/**
|
|
1882
|
+
* Database resource id.
|
|
1883
|
+
*/
|
|
1884
|
+
resourceId?: Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceId;
|
|
1885
|
+
/**
|
|
1886
|
+
* Signal data for boolean signals.
|
|
1887
|
+
*/
|
|
1888
|
+
signalBoolValue?: boolean | null;
|
|
1889
|
+
/**
|
|
1890
|
+
* Required. Signal type of the signal
|
|
1891
|
+
*/
|
|
1892
|
+
signalType?: string | null;
|
|
1893
|
+
}
|
|
1823
1894
|
/**
|
|
1824
1895
|
* 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
|
|
1825
1896
|
*/
|
|
@@ -1830,9 +1901,13 @@ export namespace alloydb_v1alpha {
|
|
|
1830
1901
|
internalResourceMetadata?: Schema$StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata[];
|
|
1831
1902
|
}
|
|
1832
1903
|
/**
|
|
1833
|
-
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.
|
|
1904
|
+
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 9
|
|
1834
1905
|
*/
|
|
1835
1906
|
export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed {
|
|
1907
|
+
/**
|
|
1908
|
+
* Config based signal data is used to ingest signals that are generated based on the configuration of the database resource.
|
|
1909
|
+
*/
|
|
1910
|
+
configBasedSignalData?: Schema$StorageDatabasecenterPartnerapiV1mainConfigBasedSignalData;
|
|
1836
1911
|
/**
|
|
1837
1912
|
* Required. Timestamp when feed is generated.
|
|
1838
1913
|
*/
|
|
@@ -1874,6 +1949,10 @@ export namespace alloydb_v1alpha {
|
|
|
1874
1949
|
* The external-uri of the signal, using which more information about this signal can be obtained. In GCP, this will take user to SCC page to get more details about signals.
|
|
1875
1950
|
*/
|
|
1876
1951
|
externalUri?: string | null;
|
|
1952
|
+
/**
|
|
1953
|
+
* This is used to identify the location of the resource. Example: "us-central1"
|
|
1954
|
+
*/
|
|
1955
|
+
location?: string | null;
|
|
1877
1956
|
/**
|
|
1878
1957
|
* Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.
|
|
1879
1958
|
*/
|
|
@@ -1921,7 +2000,7 @@ export namespace alloydb_v1alpha {
|
|
|
1921
2000
|
*/
|
|
1922
2001
|
providerDescription?: string | null;
|
|
1923
2002
|
/**
|
|
1924
|
-
* Required. The type of resource this ID is identifying. Ex
|
|
2003
|
+
* Required. The type of resource this ID is identifying. Ex go/keep-sorted start alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance compute.googleapis.com/Instance firestore.googleapis.com/Database, redis.googleapis.com/Instance, redis.googleapis.com/Cluster, oracledatabase.googleapis.com/CloudExadataInfrastructure oracledatabase.googleapis.com/CloudVmCluster oracledatabase.googleapis.com/AutonomousDatabase spanner.googleapis.com/Instance, spanner.googleapis.com/Database, sqladmin.googleapis.com/Instance, go/keep-sorted end REQUIRED Please refer go/condor-common-datamodel
|
|
1925
2004
|
*/
|
|
1926
2005
|
resourceType?: string | null;
|
|
1927
2006
|
/**
|
|
@@ -1930,7 +2009,7 @@ export namespace alloydb_v1alpha {
|
|
|
1930
2009
|
uniqueId?: string | null;
|
|
1931
2010
|
}
|
|
1932
2011
|
/**
|
|
1933
|
-
* Common model for database resource instance metadata. Next ID:
|
|
2012
|
+
* Common model for database resource instance metadata. Next ID: 26
|
|
1934
2013
|
*/
|
|
1935
2014
|
export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata {
|
|
1936
2015
|
/**
|
|
@@ -1941,6 +2020,10 @@ export namespace alloydb_v1alpha {
|
|
|
1941
2020
|
* Backup configuration for this instance
|
|
1942
2021
|
*/
|
|
1943
2022
|
backupConfiguration?: Schema$StorageDatabasecenterPartnerapiV1mainBackupConfiguration;
|
|
2023
|
+
/**
|
|
2024
|
+
* Optional. BackupDR Configuration for the resource.
|
|
2025
|
+
*/
|
|
2026
|
+
backupdrConfiguration?: Schema$StorageDatabasecenterPartnerapiV1mainBackupDRConfiguration;
|
|
1944
2027
|
/**
|
|
1945
2028
|
* Latest backup run information for this instance
|
|
1946
2029
|
*/
|
|
@@ -2204,6 +2287,10 @@ export namespace alloydb_v1alpha {
|
|
|
2204
2287
|
* The specific engine that the underlying database is running.
|
|
2205
2288
|
*/
|
|
2206
2289
|
engine?: string | null;
|
|
2290
|
+
/**
|
|
2291
|
+
* 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..
|
|
2292
|
+
*/
|
|
2293
|
+
minorVersion?: string | null;
|
|
2207
2294
|
/**
|
|
2208
2295
|
* Type of specific database product. It could be CloudSQL, AlloyDB etc..
|
|
2209
2296
|
*/
|
|
@@ -2484,6 +2571,56 @@ export namespace alloydb_v1alpha {
|
|
|
2484
2571
|
|
|
2485
2572
|
/**
|
|
2486
2573
|
* Gets information about a location.
|
|
2574
|
+
* @example
|
|
2575
|
+
* ```js
|
|
2576
|
+
* // Before running the sample:
|
|
2577
|
+
* // - Enable the API at:
|
|
2578
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2579
|
+
* // - Login into gcloud by running:
|
|
2580
|
+
* // ```sh
|
|
2581
|
+
* // $ gcloud auth application-default login
|
|
2582
|
+
* // ```
|
|
2583
|
+
* // - Install the npm module by running:
|
|
2584
|
+
* // ```sh
|
|
2585
|
+
* // $ npm install googleapis
|
|
2586
|
+
* // ```
|
|
2587
|
+
*
|
|
2588
|
+
* const {google} = require('googleapis');
|
|
2589
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
2590
|
+
*
|
|
2591
|
+
* async function main() {
|
|
2592
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2593
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2594
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2595
|
+
* });
|
|
2596
|
+
*
|
|
2597
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2598
|
+
* const authClient = await auth.getClient();
|
|
2599
|
+
* google.options({auth: authClient});
|
|
2600
|
+
*
|
|
2601
|
+
* // Do the magic
|
|
2602
|
+
* const res = await alloydb.projects.locations.get({
|
|
2603
|
+
* // Resource name for the location.
|
|
2604
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2605
|
+
* });
|
|
2606
|
+
* console.log(res.data);
|
|
2607
|
+
*
|
|
2608
|
+
* // Example response
|
|
2609
|
+
* // {
|
|
2610
|
+
* // "displayName": "my_displayName",
|
|
2611
|
+
* // "labels": {},
|
|
2612
|
+
* // "locationId": "my_locationId",
|
|
2613
|
+
* // "metadata": {},
|
|
2614
|
+
* // "name": "my_name"
|
|
2615
|
+
* // }
|
|
2616
|
+
* }
|
|
2617
|
+
*
|
|
2618
|
+
* main().catch(e => {
|
|
2619
|
+
* console.error(e);
|
|
2620
|
+
* throw e;
|
|
2621
|
+
* });
|
|
2622
|
+
*
|
|
2623
|
+
* ```
|
|
2487
2624
|
*
|
|
2488
2625
|
* @param params - Parameters for request
|
|
2489
2626
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2576,6 +2713,61 @@ export namespace alloydb_v1alpha {
|
|
|
2576
2713
|
|
|
2577
2714
|
/**
|
|
2578
2715
|
* Lists information about the supported locations for this service.
|
|
2716
|
+
* @example
|
|
2717
|
+
* ```js
|
|
2718
|
+
* // Before running the sample:
|
|
2719
|
+
* // - Enable the API at:
|
|
2720
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2721
|
+
* // - Login into gcloud by running:
|
|
2722
|
+
* // ```sh
|
|
2723
|
+
* // $ gcloud auth application-default login
|
|
2724
|
+
* // ```
|
|
2725
|
+
* // - Install the npm module by running:
|
|
2726
|
+
* // ```sh
|
|
2727
|
+
* // $ npm install googleapis
|
|
2728
|
+
* // ```
|
|
2729
|
+
*
|
|
2730
|
+
* const {google} = require('googleapis');
|
|
2731
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
2732
|
+
*
|
|
2733
|
+
* async function main() {
|
|
2734
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2735
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2736
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2737
|
+
* });
|
|
2738
|
+
*
|
|
2739
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2740
|
+
* const authClient = await auth.getClient();
|
|
2741
|
+
* google.options({auth: authClient});
|
|
2742
|
+
*
|
|
2743
|
+
* // Do the magic
|
|
2744
|
+
* const res = await alloydb.projects.locations.list({
|
|
2745
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
2746
|
+
* extraLocationTypes: 'placeholder-value',
|
|
2747
|
+
* // 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).
|
|
2748
|
+
* filter: 'placeholder-value',
|
|
2749
|
+
* // The resource that owns the locations collection, if applicable.
|
|
2750
|
+
* name: 'projects/my-project',
|
|
2751
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
2752
|
+
* pageSize: 'placeholder-value',
|
|
2753
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
2754
|
+
* pageToken: 'placeholder-value',
|
|
2755
|
+
* });
|
|
2756
|
+
* console.log(res.data);
|
|
2757
|
+
*
|
|
2758
|
+
* // Example response
|
|
2759
|
+
* // {
|
|
2760
|
+
* // "locations": [],
|
|
2761
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
2762
|
+
* // }
|
|
2763
|
+
* }
|
|
2764
|
+
*
|
|
2765
|
+
* main().catch(e => {
|
|
2766
|
+
* console.error(e);
|
|
2767
|
+
* throw e;
|
|
2768
|
+
* });
|
|
2769
|
+
*
|
|
2770
|
+
* ```
|
|
2579
2771
|
*
|
|
2580
2772
|
* @param params - Parameters for request
|
|
2581
2773
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2715,6 +2907,94 @@ export namespace alloydb_v1alpha {
|
|
|
2715
2907
|
|
|
2716
2908
|
/**
|
|
2717
2909
|
* Creates a new Backup in a given project and location.
|
|
2910
|
+
* @example
|
|
2911
|
+
* ```js
|
|
2912
|
+
* // Before running the sample:
|
|
2913
|
+
* // - Enable the API at:
|
|
2914
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2915
|
+
* // - Login into gcloud by running:
|
|
2916
|
+
* // ```sh
|
|
2917
|
+
* // $ gcloud auth application-default login
|
|
2918
|
+
* // ```
|
|
2919
|
+
* // - Install the npm module by running:
|
|
2920
|
+
* // ```sh
|
|
2921
|
+
* // $ npm install googleapis
|
|
2922
|
+
* // ```
|
|
2923
|
+
*
|
|
2924
|
+
* const {google} = require('googleapis');
|
|
2925
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
2926
|
+
*
|
|
2927
|
+
* async function main() {
|
|
2928
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2929
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2930
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2931
|
+
* });
|
|
2932
|
+
*
|
|
2933
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2934
|
+
* const authClient = await auth.getClient();
|
|
2935
|
+
* google.options({auth: authClient});
|
|
2936
|
+
*
|
|
2937
|
+
* // Do the magic
|
|
2938
|
+
* const res = await alloydb.projects.locations.backups.create({
|
|
2939
|
+
* // Required. ID of the requesting object.
|
|
2940
|
+
* backupId: 'placeholder-value',
|
|
2941
|
+
* // Required. Value for parent.
|
|
2942
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2943
|
+
* // 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).
|
|
2944
|
+
* requestId: 'placeholder-value',
|
|
2945
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2946
|
+
* validateOnly: 'placeholder-value',
|
|
2947
|
+
*
|
|
2948
|
+
* // Request body metadata
|
|
2949
|
+
* requestBody: {
|
|
2950
|
+
* // request body parameters
|
|
2951
|
+
* // {
|
|
2952
|
+
* // "annotations": {},
|
|
2953
|
+
* // "clusterName": "my_clusterName",
|
|
2954
|
+
* // "clusterUid": "my_clusterUid",
|
|
2955
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
2956
|
+
* // "createTime": "my_createTime",
|
|
2957
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
2958
|
+
* // "deleteTime": "my_deleteTime",
|
|
2959
|
+
* // "description": "my_description",
|
|
2960
|
+
* // "displayName": "my_displayName",
|
|
2961
|
+
* // "encryptionConfig": {},
|
|
2962
|
+
* // "encryptionInfo": {},
|
|
2963
|
+
* // "etag": "my_etag",
|
|
2964
|
+
* // "expiryQuantity": {},
|
|
2965
|
+
* // "expiryTime": "my_expiryTime",
|
|
2966
|
+
* // "labels": {},
|
|
2967
|
+
* // "name": "my_name",
|
|
2968
|
+
* // "reconciling": false,
|
|
2969
|
+
* // "satisfiesPzi": false,
|
|
2970
|
+
* // "satisfiesPzs": false,
|
|
2971
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
2972
|
+
* // "state": "my_state",
|
|
2973
|
+
* // "tags": {},
|
|
2974
|
+
* // "type": "my_type",
|
|
2975
|
+
* // "uid": "my_uid",
|
|
2976
|
+
* // "updateTime": "my_updateTime"
|
|
2977
|
+
* // }
|
|
2978
|
+
* },
|
|
2979
|
+
* });
|
|
2980
|
+
* console.log(res.data);
|
|
2981
|
+
*
|
|
2982
|
+
* // Example response
|
|
2983
|
+
* // {
|
|
2984
|
+
* // "done": false,
|
|
2985
|
+
* // "error": {},
|
|
2986
|
+
* // "metadata": {},
|
|
2987
|
+
* // "name": "my_name",
|
|
2988
|
+
* // "response": {}
|
|
2989
|
+
* // }
|
|
2990
|
+
* }
|
|
2991
|
+
*
|
|
2992
|
+
* main().catch(e => {
|
|
2993
|
+
* console.error(e);
|
|
2994
|
+
* throw e;
|
|
2995
|
+
* });
|
|
2996
|
+
*
|
|
2997
|
+
* ```
|
|
2718
2998
|
*
|
|
2719
2999
|
* @param params - Parameters for request
|
|
2720
3000
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2806,6 +3086,62 @@ export namespace alloydb_v1alpha {
|
|
|
2806
3086
|
|
|
2807
3087
|
/**
|
|
2808
3088
|
* Deletes a single Backup.
|
|
3089
|
+
* @example
|
|
3090
|
+
* ```js
|
|
3091
|
+
* // Before running the sample:
|
|
3092
|
+
* // - Enable the API at:
|
|
3093
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3094
|
+
* // - Login into gcloud by running:
|
|
3095
|
+
* // ```sh
|
|
3096
|
+
* // $ gcloud auth application-default login
|
|
3097
|
+
* // ```
|
|
3098
|
+
* // - Install the npm module by running:
|
|
3099
|
+
* // ```sh
|
|
3100
|
+
* // $ npm install googleapis
|
|
3101
|
+
* // ```
|
|
3102
|
+
*
|
|
3103
|
+
* const {google} = require('googleapis');
|
|
3104
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3105
|
+
*
|
|
3106
|
+
* async function main() {
|
|
3107
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3108
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3109
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3110
|
+
* });
|
|
3111
|
+
*
|
|
3112
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3113
|
+
* const authClient = await auth.getClient();
|
|
3114
|
+
* google.options({auth: authClient});
|
|
3115
|
+
*
|
|
3116
|
+
* // Do the magic
|
|
3117
|
+
* const res = await alloydb.projects.locations.backups.delete({
|
|
3118
|
+
* // 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.
|
|
3119
|
+
* etag: 'placeholder-value',
|
|
3120
|
+
* // Required. Name of the resource. For the required format, see the comment on the Backup.name field.
|
|
3121
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3122
|
+
* // 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).
|
|
3123
|
+
* requestId: 'placeholder-value',
|
|
3124
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
3125
|
+
* validateOnly: 'placeholder-value',
|
|
3126
|
+
* });
|
|
3127
|
+
* console.log(res.data);
|
|
3128
|
+
*
|
|
3129
|
+
* // Example response
|
|
3130
|
+
* // {
|
|
3131
|
+
* // "done": false,
|
|
3132
|
+
* // "error": {},
|
|
3133
|
+
* // "metadata": {},
|
|
3134
|
+
* // "name": "my_name",
|
|
3135
|
+
* // "response": {}
|
|
3136
|
+
* // }
|
|
3137
|
+
* }
|
|
3138
|
+
*
|
|
3139
|
+
* main().catch(e => {
|
|
3140
|
+
* console.error(e);
|
|
3141
|
+
* throw e;
|
|
3142
|
+
* });
|
|
3143
|
+
*
|
|
3144
|
+
* ```
|
|
2809
3145
|
*
|
|
2810
3146
|
* @param params - Parameters for request
|
|
2811
3147
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2894,6 +3230,76 @@ export namespace alloydb_v1alpha {
|
|
|
2894
3230
|
|
|
2895
3231
|
/**
|
|
2896
3232
|
* Gets details of a single Backup.
|
|
3233
|
+
* @example
|
|
3234
|
+
* ```js
|
|
3235
|
+
* // Before running the sample:
|
|
3236
|
+
* // - Enable the API at:
|
|
3237
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3238
|
+
* // - Login into gcloud by running:
|
|
3239
|
+
* // ```sh
|
|
3240
|
+
* // $ gcloud auth application-default login
|
|
3241
|
+
* // ```
|
|
3242
|
+
* // - Install the npm module by running:
|
|
3243
|
+
* // ```sh
|
|
3244
|
+
* // $ npm install googleapis
|
|
3245
|
+
* // ```
|
|
3246
|
+
*
|
|
3247
|
+
* const {google} = require('googleapis');
|
|
3248
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3249
|
+
*
|
|
3250
|
+
* async function main() {
|
|
3251
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3252
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3253
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3254
|
+
* });
|
|
3255
|
+
*
|
|
3256
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3257
|
+
* const authClient = await auth.getClient();
|
|
3258
|
+
* google.options({auth: authClient});
|
|
3259
|
+
*
|
|
3260
|
+
* // Do the magic
|
|
3261
|
+
* const res = await alloydb.projects.locations.backups.get({
|
|
3262
|
+
* // Required. Name of the resource
|
|
3263
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3264
|
+
* });
|
|
3265
|
+
* console.log(res.data);
|
|
3266
|
+
*
|
|
3267
|
+
* // Example response
|
|
3268
|
+
* // {
|
|
3269
|
+
* // "annotations": {},
|
|
3270
|
+
* // "clusterName": "my_clusterName",
|
|
3271
|
+
* // "clusterUid": "my_clusterUid",
|
|
3272
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3273
|
+
* // "createTime": "my_createTime",
|
|
3274
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3275
|
+
* // "deleteTime": "my_deleteTime",
|
|
3276
|
+
* // "description": "my_description",
|
|
3277
|
+
* // "displayName": "my_displayName",
|
|
3278
|
+
* // "encryptionConfig": {},
|
|
3279
|
+
* // "encryptionInfo": {},
|
|
3280
|
+
* // "etag": "my_etag",
|
|
3281
|
+
* // "expiryQuantity": {},
|
|
3282
|
+
* // "expiryTime": "my_expiryTime",
|
|
3283
|
+
* // "labels": {},
|
|
3284
|
+
* // "name": "my_name",
|
|
3285
|
+
* // "reconciling": false,
|
|
3286
|
+
* // "satisfiesPzi": false,
|
|
3287
|
+
* // "satisfiesPzs": false,
|
|
3288
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3289
|
+
* // "state": "my_state",
|
|
3290
|
+
* // "tags": {},
|
|
3291
|
+
* // "type": "my_type",
|
|
3292
|
+
* // "uid": "my_uid",
|
|
3293
|
+
* // "updateTime": "my_updateTime"
|
|
3294
|
+
* // }
|
|
3295
|
+
* }
|
|
3296
|
+
*
|
|
3297
|
+
* main().catch(e => {
|
|
3298
|
+
* console.error(e);
|
|
3299
|
+
* throw e;
|
|
3300
|
+
* });
|
|
3301
|
+
*
|
|
3302
|
+
* ```
|
|
2897
3303
|
*
|
|
2898
3304
|
* @param params - Parameters for request
|
|
2899
3305
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -2982,6 +3388,62 @@ export namespace alloydb_v1alpha {
|
|
|
2982
3388
|
|
|
2983
3389
|
/**
|
|
2984
3390
|
* Lists Backups in a given project and location.
|
|
3391
|
+
* @example
|
|
3392
|
+
* ```js
|
|
3393
|
+
* // Before running the sample:
|
|
3394
|
+
* // - Enable the API at:
|
|
3395
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3396
|
+
* // - Login into gcloud by running:
|
|
3397
|
+
* // ```sh
|
|
3398
|
+
* // $ gcloud auth application-default login
|
|
3399
|
+
* // ```
|
|
3400
|
+
* // - Install the npm module by running:
|
|
3401
|
+
* // ```sh
|
|
3402
|
+
* // $ npm install googleapis
|
|
3403
|
+
* // ```
|
|
3404
|
+
*
|
|
3405
|
+
* const {google} = require('googleapis');
|
|
3406
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3407
|
+
*
|
|
3408
|
+
* async function main() {
|
|
3409
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3410
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3411
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3412
|
+
* });
|
|
3413
|
+
*
|
|
3414
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3415
|
+
* const authClient = await auth.getClient();
|
|
3416
|
+
* google.options({auth: authClient});
|
|
3417
|
+
*
|
|
3418
|
+
* // Do the magic
|
|
3419
|
+
* const res = await alloydb.projects.locations.backups.list({
|
|
3420
|
+
* // Filtering results
|
|
3421
|
+
* filter: 'placeholder-value',
|
|
3422
|
+
* // Hint for how to order the results
|
|
3423
|
+
* orderBy: 'placeholder-value',
|
|
3424
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
3425
|
+
* pageSize: 'placeholder-value',
|
|
3426
|
+
* // A token identifying a page of results the server should return.
|
|
3427
|
+
* pageToken: 'placeholder-value',
|
|
3428
|
+
* // Required. Parent value for ListBackupsRequest
|
|
3429
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3430
|
+
* });
|
|
3431
|
+
* console.log(res.data);
|
|
3432
|
+
*
|
|
3433
|
+
* // Example response
|
|
3434
|
+
* // {
|
|
3435
|
+
* // "backups": [],
|
|
3436
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3437
|
+
* // "unreachable": []
|
|
3438
|
+
* // }
|
|
3439
|
+
* }
|
|
3440
|
+
*
|
|
3441
|
+
* main().catch(e => {
|
|
3442
|
+
* console.error(e);
|
|
3443
|
+
* throw e;
|
|
3444
|
+
* });
|
|
3445
|
+
*
|
|
3446
|
+
* ```
|
|
2985
3447
|
*
|
|
2986
3448
|
* @param params - Parameters for request
|
|
2987
3449
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3073,6 +3535,96 @@ export namespace alloydb_v1alpha {
|
|
|
3073
3535
|
|
|
3074
3536
|
/**
|
|
3075
3537
|
* Updates the parameters of a single Backup.
|
|
3538
|
+
* @example
|
|
3539
|
+
* ```js
|
|
3540
|
+
* // Before running the sample:
|
|
3541
|
+
* // - Enable the API at:
|
|
3542
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3543
|
+
* // - Login into gcloud by running:
|
|
3544
|
+
* // ```sh
|
|
3545
|
+
* // $ gcloud auth application-default login
|
|
3546
|
+
* // ```
|
|
3547
|
+
* // - Install the npm module by running:
|
|
3548
|
+
* // ```sh
|
|
3549
|
+
* // $ npm install googleapis
|
|
3550
|
+
* // ```
|
|
3551
|
+
*
|
|
3552
|
+
* const {google} = require('googleapis');
|
|
3553
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3554
|
+
*
|
|
3555
|
+
* async function main() {
|
|
3556
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3557
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3558
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3559
|
+
* });
|
|
3560
|
+
*
|
|
3561
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3562
|
+
* const authClient = await auth.getClient();
|
|
3563
|
+
* google.options({auth: authClient});
|
|
3564
|
+
*
|
|
3565
|
+
* // Do the magic
|
|
3566
|
+
* const res = await alloydb.projects.locations.backups.patch({
|
|
3567
|
+
* // 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.
|
|
3568
|
+
* allowMissing: 'placeholder-value',
|
|
3569
|
+
* // 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\}
|
|
3570
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
3571
|
+
* // 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).
|
|
3572
|
+
* requestId: 'placeholder-value',
|
|
3573
|
+
* // 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.
|
|
3574
|
+
* updateMask: 'placeholder-value',
|
|
3575
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
3576
|
+
* validateOnly: 'placeholder-value',
|
|
3577
|
+
*
|
|
3578
|
+
* // Request body metadata
|
|
3579
|
+
* requestBody: {
|
|
3580
|
+
* // request body parameters
|
|
3581
|
+
* // {
|
|
3582
|
+
* // "annotations": {},
|
|
3583
|
+
* // "clusterName": "my_clusterName",
|
|
3584
|
+
* // "clusterUid": "my_clusterUid",
|
|
3585
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
3586
|
+
* // "createTime": "my_createTime",
|
|
3587
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3588
|
+
* // "deleteTime": "my_deleteTime",
|
|
3589
|
+
* // "description": "my_description",
|
|
3590
|
+
* // "displayName": "my_displayName",
|
|
3591
|
+
* // "encryptionConfig": {},
|
|
3592
|
+
* // "encryptionInfo": {},
|
|
3593
|
+
* // "etag": "my_etag",
|
|
3594
|
+
* // "expiryQuantity": {},
|
|
3595
|
+
* // "expiryTime": "my_expiryTime",
|
|
3596
|
+
* // "labels": {},
|
|
3597
|
+
* // "name": "my_name",
|
|
3598
|
+
* // "reconciling": false,
|
|
3599
|
+
* // "satisfiesPzi": false,
|
|
3600
|
+
* // "satisfiesPzs": false,
|
|
3601
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
3602
|
+
* // "state": "my_state",
|
|
3603
|
+
* // "tags": {},
|
|
3604
|
+
* // "type": "my_type",
|
|
3605
|
+
* // "uid": "my_uid",
|
|
3606
|
+
* // "updateTime": "my_updateTime"
|
|
3607
|
+
* // }
|
|
3608
|
+
* },
|
|
3609
|
+
* });
|
|
3610
|
+
* console.log(res.data);
|
|
3611
|
+
*
|
|
3612
|
+
* // Example response
|
|
3613
|
+
* // {
|
|
3614
|
+
* // "done": false,
|
|
3615
|
+
* // "error": {},
|
|
3616
|
+
* // "metadata": {},
|
|
3617
|
+
* // "name": "my_name",
|
|
3618
|
+
* // "response": {}
|
|
3619
|
+
* // }
|
|
3620
|
+
* }
|
|
3621
|
+
*
|
|
3622
|
+
* main().catch(e => {
|
|
3623
|
+
* console.error(e);
|
|
3624
|
+
* throw e;
|
|
3625
|
+
* });
|
|
3626
|
+
*
|
|
3627
|
+
* ```
|
|
3076
3628
|
*
|
|
3077
3629
|
* @param params - Parameters for request
|
|
3078
3630
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3276,6 +3828,106 @@ export namespace alloydb_v1alpha {
|
|
|
3276
3828
|
|
|
3277
3829
|
/**
|
|
3278
3830
|
* Creates a new Cluster in a given project and location.
|
|
3831
|
+
* @example
|
|
3832
|
+
* ```js
|
|
3833
|
+
* // Before running the sample:
|
|
3834
|
+
* // - Enable the API at:
|
|
3835
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3836
|
+
* // - Login into gcloud by running:
|
|
3837
|
+
* // ```sh
|
|
3838
|
+
* // $ gcloud auth application-default login
|
|
3839
|
+
* // ```
|
|
3840
|
+
* // - Install the npm module by running:
|
|
3841
|
+
* // ```sh
|
|
3842
|
+
* // $ npm install googleapis
|
|
3843
|
+
* // ```
|
|
3844
|
+
*
|
|
3845
|
+
* const {google} = require('googleapis');
|
|
3846
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
3847
|
+
*
|
|
3848
|
+
* async function main() {
|
|
3849
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3850
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3851
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3852
|
+
* });
|
|
3853
|
+
*
|
|
3854
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3855
|
+
* const authClient = await auth.getClient();
|
|
3856
|
+
* google.options({auth: authClient});
|
|
3857
|
+
*
|
|
3858
|
+
* // Do the magic
|
|
3859
|
+
* const res = await alloydb.projects.locations.clusters.create({
|
|
3860
|
+
* // Required. ID of the requesting object.
|
|
3861
|
+
* clusterId: 'placeholder-value',
|
|
3862
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3863
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3864
|
+
* // 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).
|
|
3865
|
+
* requestId: 'placeholder-value',
|
|
3866
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3867
|
+
* validateOnly: 'placeholder-value',
|
|
3868
|
+
*
|
|
3869
|
+
* // Request body metadata
|
|
3870
|
+
* requestBody: {
|
|
3871
|
+
* // request body parameters
|
|
3872
|
+
* // {
|
|
3873
|
+
* // "annotations": {},
|
|
3874
|
+
* // "automatedBackupPolicy": {},
|
|
3875
|
+
* // "backupSource": {},
|
|
3876
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3877
|
+
* // "clusterType": "my_clusterType",
|
|
3878
|
+
* // "continuousBackupConfig": {},
|
|
3879
|
+
* // "continuousBackupInfo": {},
|
|
3880
|
+
* // "createTime": "my_createTime",
|
|
3881
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3882
|
+
* // "deleteTime": "my_deleteTime",
|
|
3883
|
+
* // "displayName": "my_displayName",
|
|
3884
|
+
* // "encryptionConfig": {},
|
|
3885
|
+
* // "encryptionInfo": {},
|
|
3886
|
+
* // "etag": "my_etag",
|
|
3887
|
+
* // "geminiConfig": {},
|
|
3888
|
+
* // "initialUser": {},
|
|
3889
|
+
* // "labels": {},
|
|
3890
|
+
* // "maintenanceSchedule": {},
|
|
3891
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3892
|
+
* // "migrationSource": {},
|
|
3893
|
+
* // "name": "my_name",
|
|
3894
|
+
* // "network": "my_network",
|
|
3895
|
+
* // "networkConfig": {},
|
|
3896
|
+
* // "primaryConfig": {},
|
|
3897
|
+
* // "pscConfig": {},
|
|
3898
|
+
* // "reconciling": false,
|
|
3899
|
+
* // "satisfiesPzi": false,
|
|
3900
|
+
* // "satisfiesPzs": false,
|
|
3901
|
+
* // "secondaryConfig": {},
|
|
3902
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
3903
|
+
* // "sslConfig": {},
|
|
3904
|
+
* // "state": "my_state",
|
|
3905
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3906
|
+
* // "tags": {},
|
|
3907
|
+
* // "trialMetadata": {},
|
|
3908
|
+
* // "uid": "my_uid",
|
|
3909
|
+
* // "updateTime": "my_updateTime"
|
|
3910
|
+
* // }
|
|
3911
|
+
* },
|
|
3912
|
+
* });
|
|
3913
|
+
* console.log(res.data);
|
|
3914
|
+
*
|
|
3915
|
+
* // Example response
|
|
3916
|
+
* // {
|
|
3917
|
+
* // "done": false,
|
|
3918
|
+
* // "error": {},
|
|
3919
|
+
* // "metadata": {},
|
|
3920
|
+
* // "name": "my_name",
|
|
3921
|
+
* // "response": {}
|
|
3922
|
+
* // }
|
|
3923
|
+
* }
|
|
3924
|
+
*
|
|
3925
|
+
* main().catch(e => {
|
|
3926
|
+
* console.error(e);
|
|
3927
|
+
* throw e;
|
|
3928
|
+
* });
|
|
3929
|
+
*
|
|
3930
|
+
* ```
|
|
3279
3931
|
*
|
|
3280
3932
|
* @param params - Parameters for request
|
|
3281
3933
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3367,6 +4019,106 @@ export namespace alloydb_v1alpha {
|
|
|
3367
4019
|
|
|
3368
4020
|
/**
|
|
3369
4021
|
* Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
|
|
4022
|
+
* @example
|
|
4023
|
+
* ```js
|
|
4024
|
+
* // Before running the sample:
|
|
4025
|
+
* // - Enable the API at:
|
|
4026
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4027
|
+
* // - Login into gcloud by running:
|
|
4028
|
+
* // ```sh
|
|
4029
|
+
* // $ gcloud auth application-default login
|
|
4030
|
+
* // ```
|
|
4031
|
+
* // - Install the npm module by running:
|
|
4032
|
+
* // ```sh
|
|
4033
|
+
* // $ npm install googleapis
|
|
4034
|
+
* // ```
|
|
4035
|
+
*
|
|
4036
|
+
* const {google} = require('googleapis');
|
|
4037
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4038
|
+
*
|
|
4039
|
+
* async function main() {
|
|
4040
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4041
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4042
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4043
|
+
* });
|
|
4044
|
+
*
|
|
4045
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4046
|
+
* const authClient = await auth.getClient();
|
|
4047
|
+
* google.options({auth: authClient});
|
|
4048
|
+
*
|
|
4049
|
+
* // Do the magic
|
|
4050
|
+
* const res = await alloydb.projects.locations.clusters.createsecondary({
|
|
4051
|
+
* // Required. ID of the requesting object (the secondary cluster).
|
|
4052
|
+
* clusterId: 'placeholder-value',
|
|
4053
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
4054
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
4055
|
+
* // 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).
|
|
4056
|
+
* requestId: 'placeholder-value',
|
|
4057
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4058
|
+
* validateOnly: 'placeholder-value',
|
|
4059
|
+
*
|
|
4060
|
+
* // Request body metadata
|
|
4061
|
+
* requestBody: {
|
|
4062
|
+
* // request body parameters
|
|
4063
|
+
* // {
|
|
4064
|
+
* // "annotations": {},
|
|
4065
|
+
* // "automatedBackupPolicy": {},
|
|
4066
|
+
* // "backupSource": {},
|
|
4067
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4068
|
+
* // "clusterType": "my_clusterType",
|
|
4069
|
+
* // "continuousBackupConfig": {},
|
|
4070
|
+
* // "continuousBackupInfo": {},
|
|
4071
|
+
* // "createTime": "my_createTime",
|
|
4072
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4073
|
+
* // "deleteTime": "my_deleteTime",
|
|
4074
|
+
* // "displayName": "my_displayName",
|
|
4075
|
+
* // "encryptionConfig": {},
|
|
4076
|
+
* // "encryptionInfo": {},
|
|
4077
|
+
* // "etag": "my_etag",
|
|
4078
|
+
* // "geminiConfig": {},
|
|
4079
|
+
* // "initialUser": {},
|
|
4080
|
+
* // "labels": {},
|
|
4081
|
+
* // "maintenanceSchedule": {},
|
|
4082
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4083
|
+
* // "migrationSource": {},
|
|
4084
|
+
* // "name": "my_name",
|
|
4085
|
+
* // "network": "my_network",
|
|
4086
|
+
* // "networkConfig": {},
|
|
4087
|
+
* // "primaryConfig": {},
|
|
4088
|
+
* // "pscConfig": {},
|
|
4089
|
+
* // "reconciling": false,
|
|
4090
|
+
* // "satisfiesPzi": false,
|
|
4091
|
+
* // "satisfiesPzs": false,
|
|
4092
|
+
* // "secondaryConfig": {},
|
|
4093
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4094
|
+
* // "sslConfig": {},
|
|
4095
|
+
* // "state": "my_state",
|
|
4096
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4097
|
+
* // "tags": {},
|
|
4098
|
+
* // "trialMetadata": {},
|
|
4099
|
+
* // "uid": "my_uid",
|
|
4100
|
+
* // "updateTime": "my_updateTime"
|
|
4101
|
+
* // }
|
|
4102
|
+
* },
|
|
4103
|
+
* });
|
|
4104
|
+
* console.log(res.data);
|
|
4105
|
+
*
|
|
4106
|
+
* // Example response
|
|
4107
|
+
* // {
|
|
4108
|
+
* // "done": false,
|
|
4109
|
+
* // "error": {},
|
|
4110
|
+
* // "metadata": {},
|
|
4111
|
+
* // "name": "my_name",
|
|
4112
|
+
* // "response": {}
|
|
4113
|
+
* // }
|
|
4114
|
+
* }
|
|
4115
|
+
*
|
|
4116
|
+
* main().catch(e => {
|
|
4117
|
+
* console.error(e);
|
|
4118
|
+
* throw e;
|
|
4119
|
+
* });
|
|
4120
|
+
*
|
|
4121
|
+
* ```
|
|
3370
4122
|
*
|
|
3371
4123
|
* @param params - Parameters for request
|
|
3372
4124
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3458,6 +4210,64 @@ export namespace alloydb_v1alpha {
|
|
|
3458
4210
|
|
|
3459
4211
|
/**
|
|
3460
4212
|
* Deletes a single Cluster.
|
|
4213
|
+
* @example
|
|
4214
|
+
* ```js
|
|
4215
|
+
* // Before running the sample:
|
|
4216
|
+
* // - Enable the API at:
|
|
4217
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4218
|
+
* // - Login into gcloud by running:
|
|
4219
|
+
* // ```sh
|
|
4220
|
+
* // $ gcloud auth application-default login
|
|
4221
|
+
* // ```
|
|
4222
|
+
* // - Install the npm module by running:
|
|
4223
|
+
* // ```sh
|
|
4224
|
+
* // $ npm install googleapis
|
|
4225
|
+
* // ```
|
|
4226
|
+
*
|
|
4227
|
+
* const {google} = require('googleapis');
|
|
4228
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4229
|
+
*
|
|
4230
|
+
* async function main() {
|
|
4231
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4232
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4233
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4234
|
+
* });
|
|
4235
|
+
*
|
|
4236
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4237
|
+
* const authClient = await auth.getClient();
|
|
4238
|
+
* google.options({auth: authClient});
|
|
4239
|
+
*
|
|
4240
|
+
* // Do the magic
|
|
4241
|
+
* const res = await alloydb.projects.locations.clusters.delete({
|
|
4242
|
+
* // 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.
|
|
4243
|
+
* etag: 'placeholder-value',
|
|
4244
|
+
* // Optional. Whether to cascade delete child instances for given cluster.
|
|
4245
|
+
* force: 'placeholder-value',
|
|
4246
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4247
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4248
|
+
* // 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).
|
|
4249
|
+
* requestId: 'placeholder-value',
|
|
4250
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4251
|
+
* validateOnly: 'placeholder-value',
|
|
4252
|
+
* });
|
|
4253
|
+
* console.log(res.data);
|
|
4254
|
+
*
|
|
4255
|
+
* // Example response
|
|
4256
|
+
* // {
|
|
4257
|
+
* // "done": false,
|
|
4258
|
+
* // "error": {},
|
|
4259
|
+
* // "metadata": {},
|
|
4260
|
+
* // "name": "my_name",
|
|
4261
|
+
* // "response": {}
|
|
4262
|
+
* // }
|
|
4263
|
+
* }
|
|
4264
|
+
*
|
|
4265
|
+
* main().catch(e => {
|
|
4266
|
+
* console.error(e);
|
|
4267
|
+
* throw e;
|
|
4268
|
+
* });
|
|
4269
|
+
*
|
|
4270
|
+
* ```
|
|
3461
4271
|
*
|
|
3462
4272
|
* @param params - Parameters for request
|
|
3463
4273
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3546,6 +4356,67 @@ export namespace alloydb_v1alpha {
|
|
|
3546
4356
|
|
|
3547
4357
|
/**
|
|
3548
4358
|
* Exports data from the cluster. Imperative only.
|
|
4359
|
+
* @example
|
|
4360
|
+
* ```js
|
|
4361
|
+
* // Before running the sample:
|
|
4362
|
+
* // - Enable the API at:
|
|
4363
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4364
|
+
* // - Login into gcloud by running:
|
|
4365
|
+
* // ```sh
|
|
4366
|
+
* // $ gcloud auth application-default login
|
|
4367
|
+
* // ```
|
|
4368
|
+
* // - Install the npm module by running:
|
|
4369
|
+
* // ```sh
|
|
4370
|
+
* // $ npm install googleapis
|
|
4371
|
+
* // ```
|
|
4372
|
+
*
|
|
4373
|
+
* const {google} = require('googleapis');
|
|
4374
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4375
|
+
*
|
|
4376
|
+
* async function main() {
|
|
4377
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4378
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4379
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4380
|
+
* });
|
|
4381
|
+
*
|
|
4382
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4383
|
+
* const authClient = await auth.getClient();
|
|
4384
|
+
* google.options({auth: authClient});
|
|
4385
|
+
*
|
|
4386
|
+
* // Do the magic
|
|
4387
|
+
* const res = await alloydb.projects.locations.clusters.export({
|
|
4388
|
+
* // Required. The resource name of the cluster.
|
|
4389
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4390
|
+
*
|
|
4391
|
+
* // Request body metadata
|
|
4392
|
+
* requestBody: {
|
|
4393
|
+
* // request body parameters
|
|
4394
|
+
* // {
|
|
4395
|
+
* // "csvExportOptions": {},
|
|
4396
|
+
* // "database": "my_database",
|
|
4397
|
+
* // "gcsDestination": {},
|
|
4398
|
+
* // "sqlExportOptions": {}
|
|
4399
|
+
* // }
|
|
4400
|
+
* },
|
|
4401
|
+
* });
|
|
4402
|
+
* console.log(res.data);
|
|
4403
|
+
*
|
|
4404
|
+
* // Example response
|
|
4405
|
+
* // {
|
|
4406
|
+
* // "done": false,
|
|
4407
|
+
* // "error": {},
|
|
4408
|
+
* // "metadata": {},
|
|
4409
|
+
* // "name": "my_name",
|
|
4410
|
+
* // "response": {}
|
|
4411
|
+
* // }
|
|
4412
|
+
* }
|
|
4413
|
+
*
|
|
4414
|
+
* main().catch(e => {
|
|
4415
|
+
* console.error(e);
|
|
4416
|
+
* throw e;
|
|
4417
|
+
* });
|
|
4418
|
+
*
|
|
4419
|
+
* ```
|
|
3549
4420
|
*
|
|
3550
4421
|
* @param params - Parameters for request
|
|
3551
4422
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3637,6 +4508,90 @@ export namespace alloydb_v1alpha {
|
|
|
3637
4508
|
|
|
3638
4509
|
/**
|
|
3639
4510
|
* Gets details of a single Cluster.
|
|
4511
|
+
* @example
|
|
4512
|
+
* ```js
|
|
4513
|
+
* // Before running the sample:
|
|
4514
|
+
* // - Enable the API at:
|
|
4515
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4516
|
+
* // - Login into gcloud by running:
|
|
4517
|
+
* // ```sh
|
|
4518
|
+
* // $ gcloud auth application-default login
|
|
4519
|
+
* // ```
|
|
4520
|
+
* // - Install the npm module by running:
|
|
4521
|
+
* // ```sh
|
|
4522
|
+
* // $ npm install googleapis
|
|
4523
|
+
* // ```
|
|
4524
|
+
*
|
|
4525
|
+
* const {google} = require('googleapis');
|
|
4526
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4527
|
+
*
|
|
4528
|
+
* async function main() {
|
|
4529
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4530
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4531
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4532
|
+
* });
|
|
4533
|
+
*
|
|
4534
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4535
|
+
* const authClient = await auth.getClient();
|
|
4536
|
+
* google.options({auth: authClient});
|
|
4537
|
+
*
|
|
4538
|
+
* // Do the magic
|
|
4539
|
+
* const res = await alloydb.projects.locations.clusters.get({
|
|
4540
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
4541
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4542
|
+
* // Optional. The view of the cluster to return. Returns all default fields if not set.
|
|
4543
|
+
* view: 'placeholder-value',
|
|
4544
|
+
* });
|
|
4545
|
+
* console.log(res.data);
|
|
4546
|
+
*
|
|
4547
|
+
* // Example response
|
|
4548
|
+
* // {
|
|
4549
|
+
* // "annotations": {},
|
|
4550
|
+
* // "automatedBackupPolicy": {},
|
|
4551
|
+
* // "backupSource": {},
|
|
4552
|
+
* // "cloudsqlBackupRunSource": {},
|
|
4553
|
+
* // "clusterType": "my_clusterType",
|
|
4554
|
+
* // "continuousBackupConfig": {},
|
|
4555
|
+
* // "continuousBackupInfo": {},
|
|
4556
|
+
* // "createTime": "my_createTime",
|
|
4557
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
4558
|
+
* // "deleteTime": "my_deleteTime",
|
|
4559
|
+
* // "displayName": "my_displayName",
|
|
4560
|
+
* // "encryptionConfig": {},
|
|
4561
|
+
* // "encryptionInfo": {},
|
|
4562
|
+
* // "etag": "my_etag",
|
|
4563
|
+
* // "geminiConfig": {},
|
|
4564
|
+
* // "initialUser": {},
|
|
4565
|
+
* // "labels": {},
|
|
4566
|
+
* // "maintenanceSchedule": {},
|
|
4567
|
+
* // "maintenanceUpdatePolicy": {},
|
|
4568
|
+
* // "migrationSource": {},
|
|
4569
|
+
* // "name": "my_name",
|
|
4570
|
+
* // "network": "my_network",
|
|
4571
|
+
* // "networkConfig": {},
|
|
4572
|
+
* // "primaryConfig": {},
|
|
4573
|
+
* // "pscConfig": {},
|
|
4574
|
+
* // "reconciling": false,
|
|
4575
|
+
* // "satisfiesPzi": false,
|
|
4576
|
+
* // "satisfiesPzs": false,
|
|
4577
|
+
* // "secondaryConfig": {},
|
|
4578
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
4579
|
+
* // "sslConfig": {},
|
|
4580
|
+
* // "state": "my_state",
|
|
4581
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
4582
|
+
* // "tags": {},
|
|
4583
|
+
* // "trialMetadata": {},
|
|
4584
|
+
* // "uid": "my_uid",
|
|
4585
|
+
* // "updateTime": "my_updateTime"
|
|
4586
|
+
* // }
|
|
4587
|
+
* }
|
|
4588
|
+
*
|
|
4589
|
+
* main().catch(e => {
|
|
4590
|
+
* console.error(e);
|
|
4591
|
+
* throw e;
|
|
4592
|
+
* });
|
|
4593
|
+
*
|
|
4594
|
+
* ```
|
|
3640
4595
|
*
|
|
3641
4596
|
* @param params - Parameters for request
|
|
3642
4597
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3725,6 +4680,68 @@ export namespace alloydb_v1alpha {
|
|
|
3725
4680
|
|
|
3726
4681
|
/**
|
|
3727
4682
|
* Imports data to the cluster. Imperative only.
|
|
4683
|
+
* @example
|
|
4684
|
+
* ```js
|
|
4685
|
+
* // Before running the sample:
|
|
4686
|
+
* // - Enable the API at:
|
|
4687
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4688
|
+
* // - Login into gcloud by running:
|
|
4689
|
+
* // ```sh
|
|
4690
|
+
* // $ gcloud auth application-default login
|
|
4691
|
+
* // ```
|
|
4692
|
+
* // - Install the npm module by running:
|
|
4693
|
+
* // ```sh
|
|
4694
|
+
* // $ npm install googleapis
|
|
4695
|
+
* // ```
|
|
4696
|
+
*
|
|
4697
|
+
* const {google} = require('googleapis');
|
|
4698
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4699
|
+
*
|
|
4700
|
+
* async function main() {
|
|
4701
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4702
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4703
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4704
|
+
* });
|
|
4705
|
+
*
|
|
4706
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4707
|
+
* const authClient = await auth.getClient();
|
|
4708
|
+
* google.options({auth: authClient});
|
|
4709
|
+
*
|
|
4710
|
+
* // Do the magic
|
|
4711
|
+
* const res = await alloydb.projects.locations.clusters.import({
|
|
4712
|
+
* // Required. The resource name of the cluster.
|
|
4713
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4714
|
+
*
|
|
4715
|
+
* // Request body metadata
|
|
4716
|
+
* requestBody: {
|
|
4717
|
+
* // request body parameters
|
|
4718
|
+
* // {
|
|
4719
|
+
* // "csvImportOptions": {},
|
|
4720
|
+
* // "database": "my_database",
|
|
4721
|
+
* // "gcsUri": "my_gcsUri",
|
|
4722
|
+
* // "sqlImportOptions": {},
|
|
4723
|
+
* // "user": "my_user"
|
|
4724
|
+
* // }
|
|
4725
|
+
* },
|
|
4726
|
+
* });
|
|
4727
|
+
* console.log(res.data);
|
|
4728
|
+
*
|
|
4729
|
+
* // Example response
|
|
4730
|
+
* // {
|
|
4731
|
+
* // "done": false,
|
|
4732
|
+
* // "error": {},
|
|
4733
|
+
* // "metadata": {},
|
|
4734
|
+
* // "name": "my_name",
|
|
4735
|
+
* // "response": {}
|
|
4736
|
+
* // }
|
|
4737
|
+
* }
|
|
4738
|
+
*
|
|
4739
|
+
* main().catch(e => {
|
|
4740
|
+
* console.error(e);
|
|
4741
|
+
* throw e;
|
|
4742
|
+
* });
|
|
4743
|
+
*
|
|
4744
|
+
* ```
|
|
3728
4745
|
*
|
|
3729
4746
|
* @param params - Parameters for request
|
|
3730
4747
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3816,6 +4833,62 @@ export namespace alloydb_v1alpha {
|
|
|
3816
4833
|
|
|
3817
4834
|
/**
|
|
3818
4835
|
* Lists Clusters in a given project and location.
|
|
4836
|
+
* @example
|
|
4837
|
+
* ```js
|
|
4838
|
+
* // Before running the sample:
|
|
4839
|
+
* // - Enable the API at:
|
|
4840
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4841
|
+
* // - Login into gcloud by running:
|
|
4842
|
+
* // ```sh
|
|
4843
|
+
* // $ gcloud auth application-default login
|
|
4844
|
+
* // ```
|
|
4845
|
+
* // - Install the npm module by running:
|
|
4846
|
+
* // ```sh
|
|
4847
|
+
* // $ npm install googleapis
|
|
4848
|
+
* // ```
|
|
4849
|
+
*
|
|
4850
|
+
* const {google} = require('googleapis');
|
|
4851
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
4852
|
+
*
|
|
4853
|
+
* async function main() {
|
|
4854
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4855
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4856
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4857
|
+
* });
|
|
4858
|
+
*
|
|
4859
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4860
|
+
* const authClient = await auth.getClient();
|
|
4861
|
+
* google.options({auth: authClient});
|
|
4862
|
+
*
|
|
4863
|
+
* // Do the magic
|
|
4864
|
+
* const res = await alloydb.projects.locations.clusters.list({
|
|
4865
|
+
* // Optional. Filtering results
|
|
4866
|
+
* filter: 'placeholder-value',
|
|
4867
|
+
* // Optional. Hint for how to order the results
|
|
4868
|
+
* orderBy: 'placeholder-value',
|
|
4869
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
4870
|
+
* pageSize: 'placeholder-value',
|
|
4871
|
+
* // A token identifying a page of results the server should return.
|
|
4872
|
+
* pageToken: 'placeholder-value',
|
|
4873
|
+
* // 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/-
|
|
4874
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
4875
|
+
* });
|
|
4876
|
+
* console.log(res.data);
|
|
4877
|
+
*
|
|
4878
|
+
* // Example response
|
|
4879
|
+
* // {
|
|
4880
|
+
* // "clusters": [],
|
|
4881
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4882
|
+
* // "unreachable": []
|
|
4883
|
+
* // }
|
|
4884
|
+
* }
|
|
4885
|
+
*
|
|
4886
|
+
* main().catch(e => {
|
|
4887
|
+
* console.error(e);
|
|
4888
|
+
* throw e;
|
|
4889
|
+
* });
|
|
4890
|
+
*
|
|
4891
|
+
* ```
|
|
3819
4892
|
*
|
|
3820
4893
|
* @param params - Parameters for request
|
|
3821
4894
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3909,6 +4982,108 @@ export namespace alloydb_v1alpha {
|
|
|
3909
4982
|
|
|
3910
4983
|
/**
|
|
3911
4984
|
* Updates the parameters of a single Cluster.
|
|
4985
|
+
* @example
|
|
4986
|
+
* ```js
|
|
4987
|
+
* // Before running the sample:
|
|
4988
|
+
* // - Enable the API at:
|
|
4989
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4990
|
+
* // - Login into gcloud by running:
|
|
4991
|
+
* // ```sh
|
|
4992
|
+
* // $ gcloud auth application-default login
|
|
4993
|
+
* // ```
|
|
4994
|
+
* // - Install the npm module by running:
|
|
4995
|
+
* // ```sh
|
|
4996
|
+
* // $ npm install googleapis
|
|
4997
|
+
* // ```
|
|
4998
|
+
*
|
|
4999
|
+
* const {google} = require('googleapis');
|
|
5000
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5001
|
+
*
|
|
5002
|
+
* async function main() {
|
|
5003
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5004
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5005
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5006
|
+
* });
|
|
5007
|
+
*
|
|
5008
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5009
|
+
* const authClient = await auth.getClient();
|
|
5010
|
+
* google.options({auth: authClient});
|
|
5011
|
+
*
|
|
5012
|
+
* // Do the magic
|
|
5013
|
+
* const res = await alloydb.projects.locations.clusters.patch({
|
|
5014
|
+
* // 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.
|
|
5015
|
+
* allowMissing: 'placeholder-value',
|
|
5016
|
+
* // 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\}
|
|
5017
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5018
|
+
* // 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).
|
|
5019
|
+
* requestId: 'placeholder-value',
|
|
5020
|
+
* // 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.
|
|
5021
|
+
* updateMask: 'placeholder-value',
|
|
5022
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
5023
|
+
* validateOnly: 'placeholder-value',
|
|
5024
|
+
*
|
|
5025
|
+
* // Request body metadata
|
|
5026
|
+
* requestBody: {
|
|
5027
|
+
* // request body parameters
|
|
5028
|
+
* // {
|
|
5029
|
+
* // "annotations": {},
|
|
5030
|
+
* // "automatedBackupPolicy": {},
|
|
5031
|
+
* // "backupSource": {},
|
|
5032
|
+
* // "cloudsqlBackupRunSource": {},
|
|
5033
|
+
* // "clusterType": "my_clusterType",
|
|
5034
|
+
* // "continuousBackupConfig": {},
|
|
5035
|
+
* // "continuousBackupInfo": {},
|
|
5036
|
+
* // "createTime": "my_createTime",
|
|
5037
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
5038
|
+
* // "deleteTime": "my_deleteTime",
|
|
5039
|
+
* // "displayName": "my_displayName",
|
|
5040
|
+
* // "encryptionConfig": {},
|
|
5041
|
+
* // "encryptionInfo": {},
|
|
5042
|
+
* // "etag": "my_etag",
|
|
5043
|
+
* // "geminiConfig": {},
|
|
5044
|
+
* // "initialUser": {},
|
|
5045
|
+
* // "labels": {},
|
|
5046
|
+
* // "maintenanceSchedule": {},
|
|
5047
|
+
* // "maintenanceUpdatePolicy": {},
|
|
5048
|
+
* // "migrationSource": {},
|
|
5049
|
+
* // "name": "my_name",
|
|
5050
|
+
* // "network": "my_network",
|
|
5051
|
+
* // "networkConfig": {},
|
|
5052
|
+
* // "primaryConfig": {},
|
|
5053
|
+
* // "pscConfig": {},
|
|
5054
|
+
* // "reconciling": false,
|
|
5055
|
+
* // "satisfiesPzi": false,
|
|
5056
|
+
* // "satisfiesPzs": false,
|
|
5057
|
+
* // "secondaryConfig": {},
|
|
5058
|
+
* // "serviceAccountEmail": "my_serviceAccountEmail",
|
|
5059
|
+
* // "sslConfig": {},
|
|
5060
|
+
* // "state": "my_state",
|
|
5061
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
5062
|
+
* // "tags": {},
|
|
5063
|
+
* // "trialMetadata": {},
|
|
5064
|
+
* // "uid": "my_uid",
|
|
5065
|
+
* // "updateTime": "my_updateTime"
|
|
5066
|
+
* // }
|
|
5067
|
+
* },
|
|
5068
|
+
* });
|
|
5069
|
+
* console.log(res.data);
|
|
5070
|
+
*
|
|
5071
|
+
* // Example response
|
|
5072
|
+
* // {
|
|
5073
|
+
* // "done": false,
|
|
5074
|
+
* // "error": {},
|
|
5075
|
+
* // "metadata": {},
|
|
5076
|
+
* // "name": "my_name",
|
|
5077
|
+
* // "response": {}
|
|
5078
|
+
* // }
|
|
5079
|
+
* }
|
|
5080
|
+
*
|
|
5081
|
+
* main().catch(e => {
|
|
5082
|
+
* console.error(e);
|
|
5083
|
+
* throw e;
|
|
5084
|
+
* });
|
|
5085
|
+
*
|
|
5086
|
+
* ```
|
|
3912
5087
|
*
|
|
3913
5088
|
* @param params - Parameters for request
|
|
3914
5089
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -3997,6 +5172,66 @@ export namespace alloydb_v1alpha {
|
|
|
3997
5172
|
|
|
3998
5173
|
/**
|
|
3999
5174
|
* Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.
|
|
5175
|
+
* @example
|
|
5176
|
+
* ```js
|
|
5177
|
+
* // Before running the sample:
|
|
5178
|
+
* // - Enable the API at:
|
|
5179
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5180
|
+
* // - Login into gcloud by running:
|
|
5181
|
+
* // ```sh
|
|
5182
|
+
* // $ gcloud auth application-default login
|
|
5183
|
+
* // ```
|
|
5184
|
+
* // - Install the npm module by running:
|
|
5185
|
+
* // ```sh
|
|
5186
|
+
* // $ npm install googleapis
|
|
5187
|
+
* // ```
|
|
5188
|
+
*
|
|
5189
|
+
* const {google} = require('googleapis');
|
|
5190
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5191
|
+
*
|
|
5192
|
+
* async function main() {
|
|
5193
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5194
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5195
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5196
|
+
* });
|
|
5197
|
+
*
|
|
5198
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5199
|
+
* const authClient = await auth.getClient();
|
|
5200
|
+
* google.options({auth: authClient});
|
|
5201
|
+
*
|
|
5202
|
+
* // Do the magic
|
|
5203
|
+
* const res = await alloydb.projects.locations.clusters.promote({
|
|
5204
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5205
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5206
|
+
*
|
|
5207
|
+
* // Request body metadata
|
|
5208
|
+
* requestBody: {
|
|
5209
|
+
* // request body parameters
|
|
5210
|
+
* // {
|
|
5211
|
+
* // "etag": "my_etag",
|
|
5212
|
+
* // "requestId": "my_requestId",
|
|
5213
|
+
* // "validateOnly": false
|
|
5214
|
+
* // }
|
|
5215
|
+
* },
|
|
5216
|
+
* });
|
|
5217
|
+
* console.log(res.data);
|
|
5218
|
+
*
|
|
5219
|
+
* // Example response
|
|
5220
|
+
* // {
|
|
5221
|
+
* // "done": false,
|
|
5222
|
+
* // "error": {},
|
|
5223
|
+
* // "metadata": {},
|
|
5224
|
+
* // "name": "my_name",
|
|
5225
|
+
* // "response": {}
|
|
5226
|
+
* // }
|
|
5227
|
+
* }
|
|
5228
|
+
*
|
|
5229
|
+
* main().catch(e => {
|
|
5230
|
+
* console.error(e);
|
|
5231
|
+
* throw e;
|
|
5232
|
+
* });
|
|
5233
|
+
*
|
|
5234
|
+
* ```
|
|
4000
5235
|
*
|
|
4001
5236
|
* @param params - Parameters for request
|
|
4002
5237
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4088,6 +5323,69 @@ export namespace alloydb_v1alpha {
|
|
|
4088
5323
|
|
|
4089
5324
|
/**
|
|
4090
5325
|
* 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.
|
|
5326
|
+
* @example
|
|
5327
|
+
* ```js
|
|
5328
|
+
* // Before running the sample:
|
|
5329
|
+
* // - Enable the API at:
|
|
5330
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5331
|
+
* // - Login into gcloud by running:
|
|
5332
|
+
* // ```sh
|
|
5333
|
+
* // $ gcloud auth application-default login
|
|
5334
|
+
* // ```
|
|
5335
|
+
* // - Install the npm module by running:
|
|
5336
|
+
* // ```sh
|
|
5337
|
+
* // $ npm install googleapis
|
|
5338
|
+
* // ```
|
|
5339
|
+
*
|
|
5340
|
+
* const {google} = require('googleapis');
|
|
5341
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5342
|
+
*
|
|
5343
|
+
* async function main() {
|
|
5344
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5345
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5346
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5347
|
+
* });
|
|
5348
|
+
*
|
|
5349
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5350
|
+
* const authClient = await auth.getClient();
|
|
5351
|
+
* google.options({auth: authClient});
|
|
5352
|
+
*
|
|
5353
|
+
* // Do the magic
|
|
5354
|
+
* const res = await alloydb.projects.locations.clusters.restore({
|
|
5355
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.
|
|
5356
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5357
|
+
*
|
|
5358
|
+
* // Request body metadata
|
|
5359
|
+
* requestBody: {
|
|
5360
|
+
* // request body parameters
|
|
5361
|
+
* // {
|
|
5362
|
+
* // "backupSource": {},
|
|
5363
|
+
* // "cluster": {},
|
|
5364
|
+
* // "clusterId": "my_clusterId",
|
|
5365
|
+
* // "continuousBackupSource": {},
|
|
5366
|
+
* // "requestId": "my_requestId",
|
|
5367
|
+
* // "validateOnly": false
|
|
5368
|
+
* // }
|
|
5369
|
+
* },
|
|
5370
|
+
* });
|
|
5371
|
+
* console.log(res.data);
|
|
5372
|
+
*
|
|
5373
|
+
* // Example response
|
|
5374
|
+
* // {
|
|
5375
|
+
* // "done": false,
|
|
5376
|
+
* // "error": {},
|
|
5377
|
+
* // "metadata": {},
|
|
5378
|
+
* // "name": "my_name",
|
|
5379
|
+
* // "response": {}
|
|
5380
|
+
* // }
|
|
5381
|
+
* }
|
|
5382
|
+
*
|
|
5383
|
+
* main().catch(e => {
|
|
5384
|
+
* console.error(e);
|
|
5385
|
+
* throw e;
|
|
5386
|
+
* });
|
|
5387
|
+
*
|
|
5388
|
+
* ```
|
|
4091
5389
|
*
|
|
4092
5390
|
* @param params - Parameters for request
|
|
4093
5391
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4179,6 +5477,66 @@ export namespace alloydb_v1alpha {
|
|
|
4179
5477
|
|
|
4180
5478
|
/**
|
|
4181
5479
|
* Restores an AlloyDB cluster from a CloudSQL resource.
|
|
5480
|
+
* @example
|
|
5481
|
+
* ```js
|
|
5482
|
+
* // Before running the sample:
|
|
5483
|
+
* // - Enable the API at:
|
|
5484
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5485
|
+
* // - Login into gcloud by running:
|
|
5486
|
+
* // ```sh
|
|
5487
|
+
* // $ gcloud auth application-default login
|
|
5488
|
+
* // ```
|
|
5489
|
+
* // - Install the npm module by running:
|
|
5490
|
+
* // ```sh
|
|
5491
|
+
* // $ npm install googleapis
|
|
5492
|
+
* // ```
|
|
5493
|
+
*
|
|
5494
|
+
* const {google} = require('googleapis');
|
|
5495
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5496
|
+
*
|
|
5497
|
+
* async function main() {
|
|
5498
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5499
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5500
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5501
|
+
* });
|
|
5502
|
+
*
|
|
5503
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5504
|
+
* const authClient = await auth.getClient();
|
|
5505
|
+
* google.options({auth: authClient});
|
|
5506
|
+
*
|
|
5507
|
+
* // Do the magic
|
|
5508
|
+
* const res = await alloydb.projects.locations.clusters.restoreFromCloudSQL({
|
|
5509
|
+
* // Required. The location of the new cluster. For the required format, see the comment on Cluster.name field.
|
|
5510
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
5511
|
+
*
|
|
5512
|
+
* // Request body metadata
|
|
5513
|
+
* requestBody: {
|
|
5514
|
+
* // request body parameters
|
|
5515
|
+
* // {
|
|
5516
|
+
* // "cloudsqlBackupRunSource": {},
|
|
5517
|
+
* // "cluster": {},
|
|
5518
|
+
* // "clusterId": "my_clusterId"
|
|
5519
|
+
* // }
|
|
5520
|
+
* },
|
|
5521
|
+
* });
|
|
5522
|
+
* console.log(res.data);
|
|
5523
|
+
*
|
|
5524
|
+
* // Example response
|
|
5525
|
+
* // {
|
|
5526
|
+
* // "done": false,
|
|
5527
|
+
* // "error": {},
|
|
5528
|
+
* // "metadata": {},
|
|
5529
|
+
* // "name": "my_name",
|
|
5530
|
+
* // "response": {}
|
|
5531
|
+
* // }
|
|
5532
|
+
* }
|
|
5533
|
+
*
|
|
5534
|
+
* main().catch(e => {
|
|
5535
|
+
* console.error(e);
|
|
5536
|
+
* throw e;
|
|
5537
|
+
* });
|
|
5538
|
+
*
|
|
5539
|
+
* ```
|
|
4182
5540
|
*
|
|
4183
5541
|
* @param params - Parameters for request
|
|
4184
5542
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4270,6 +5628,65 @@ export namespace alloydb_v1alpha {
|
|
|
4270
5628
|
|
|
4271
5629
|
/**
|
|
4272
5630
|
* 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.
|
|
5631
|
+
* @example
|
|
5632
|
+
* ```js
|
|
5633
|
+
* // Before running the sample:
|
|
5634
|
+
* // - Enable the API at:
|
|
5635
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5636
|
+
* // - Login into gcloud by running:
|
|
5637
|
+
* // ```sh
|
|
5638
|
+
* // $ gcloud auth application-default login
|
|
5639
|
+
* // ```
|
|
5640
|
+
* // - Install the npm module by running:
|
|
5641
|
+
* // ```sh
|
|
5642
|
+
* // $ npm install googleapis
|
|
5643
|
+
* // ```
|
|
5644
|
+
*
|
|
5645
|
+
* const {google} = require('googleapis');
|
|
5646
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5647
|
+
*
|
|
5648
|
+
* async function main() {
|
|
5649
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5650
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5651
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5652
|
+
* });
|
|
5653
|
+
*
|
|
5654
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5655
|
+
* const authClient = await auth.getClient();
|
|
5656
|
+
* google.options({auth: authClient});
|
|
5657
|
+
*
|
|
5658
|
+
* // Do the magic
|
|
5659
|
+
* const res = await alloydb.projects.locations.clusters.switchover({
|
|
5660
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
5661
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5662
|
+
*
|
|
5663
|
+
* // Request body metadata
|
|
5664
|
+
* requestBody: {
|
|
5665
|
+
* // request body parameters
|
|
5666
|
+
* // {
|
|
5667
|
+
* // "requestId": "my_requestId",
|
|
5668
|
+
* // "validateOnly": false
|
|
5669
|
+
* // }
|
|
5670
|
+
* },
|
|
5671
|
+
* });
|
|
5672
|
+
* console.log(res.data);
|
|
5673
|
+
*
|
|
5674
|
+
* // Example response
|
|
5675
|
+
* // {
|
|
5676
|
+
* // "done": false,
|
|
5677
|
+
* // "error": {},
|
|
5678
|
+
* // "metadata": {},
|
|
5679
|
+
* // "name": "my_name",
|
|
5680
|
+
* // "response": {}
|
|
5681
|
+
* // }
|
|
5682
|
+
* }
|
|
5683
|
+
*
|
|
5684
|
+
* main().catch(e => {
|
|
5685
|
+
* console.error(e);
|
|
5686
|
+
* throw e;
|
|
5687
|
+
* });
|
|
5688
|
+
*
|
|
5689
|
+
* ```
|
|
4273
5690
|
*
|
|
4274
5691
|
* @param params - Parameters for request
|
|
4275
5692
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4361,6 +5778,67 @@ export namespace alloydb_v1alpha {
|
|
|
4361
5778
|
|
|
4362
5779
|
/**
|
|
4363
5780
|
* Upgrades a single Cluster. Imperative only.
|
|
5781
|
+
* @example
|
|
5782
|
+
* ```js
|
|
5783
|
+
* // Before running the sample:
|
|
5784
|
+
* // - Enable the API at:
|
|
5785
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5786
|
+
* // - Login into gcloud by running:
|
|
5787
|
+
* // ```sh
|
|
5788
|
+
* // $ gcloud auth application-default login
|
|
5789
|
+
* // ```
|
|
5790
|
+
* // - Install the npm module by running:
|
|
5791
|
+
* // ```sh
|
|
5792
|
+
* // $ npm install googleapis
|
|
5793
|
+
* // ```
|
|
5794
|
+
*
|
|
5795
|
+
* const {google} = require('googleapis');
|
|
5796
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
5797
|
+
*
|
|
5798
|
+
* async function main() {
|
|
5799
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5800
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5801
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5802
|
+
* });
|
|
5803
|
+
*
|
|
5804
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5805
|
+
* const authClient = await auth.getClient();
|
|
5806
|
+
* google.options({auth: authClient});
|
|
5807
|
+
*
|
|
5808
|
+
* // Do the magic
|
|
5809
|
+
* const res = await alloydb.projects.locations.clusters.upgrade({
|
|
5810
|
+
* // Required. The resource name of the cluster.
|
|
5811
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5812
|
+
*
|
|
5813
|
+
* // Request body metadata
|
|
5814
|
+
* requestBody: {
|
|
5815
|
+
* // request body parameters
|
|
5816
|
+
* // {
|
|
5817
|
+
* // "etag": "my_etag",
|
|
5818
|
+
* // "requestId": "my_requestId",
|
|
5819
|
+
* // "validateOnly": false,
|
|
5820
|
+
* // "version": "my_version"
|
|
5821
|
+
* // }
|
|
5822
|
+
* },
|
|
5823
|
+
* });
|
|
5824
|
+
* console.log(res.data);
|
|
5825
|
+
*
|
|
5826
|
+
* // Example response
|
|
5827
|
+
* // {
|
|
5828
|
+
* // "done": false,
|
|
5829
|
+
* // "error": {},
|
|
5830
|
+
* // "metadata": {},
|
|
5831
|
+
* // "name": "my_name",
|
|
5832
|
+
* // "response": {}
|
|
5833
|
+
* // }
|
|
5834
|
+
* }
|
|
5835
|
+
*
|
|
5836
|
+
* main().catch(e => {
|
|
5837
|
+
* console.error(e);
|
|
5838
|
+
* throw e;
|
|
5839
|
+
* });
|
|
5840
|
+
*
|
|
5841
|
+
* ```
|
|
4364
5842
|
*
|
|
4365
5843
|
* @param params - Parameters for request
|
|
4366
5844
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4677,6 +6155,103 @@ export namespace alloydb_v1alpha {
|
|
|
4677
6155
|
|
|
4678
6156
|
/**
|
|
4679
6157
|
* Creates a new Instance in a given project and location.
|
|
6158
|
+
* @example
|
|
6159
|
+
* ```js
|
|
6160
|
+
* // Before running the sample:
|
|
6161
|
+
* // - Enable the API at:
|
|
6162
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6163
|
+
* // - Login into gcloud by running:
|
|
6164
|
+
* // ```sh
|
|
6165
|
+
* // $ gcloud auth application-default login
|
|
6166
|
+
* // ```
|
|
6167
|
+
* // - Install the npm module by running:
|
|
6168
|
+
* // ```sh
|
|
6169
|
+
* // $ npm install googleapis
|
|
6170
|
+
* // ```
|
|
6171
|
+
*
|
|
6172
|
+
* const {google} = require('googleapis');
|
|
6173
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6174
|
+
*
|
|
6175
|
+
* async function main() {
|
|
6176
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6177
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6178
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6179
|
+
* });
|
|
6180
|
+
*
|
|
6181
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6182
|
+
* const authClient = await auth.getClient();
|
|
6183
|
+
* google.options({auth: authClient});
|
|
6184
|
+
*
|
|
6185
|
+
* // Do the magic
|
|
6186
|
+
* const res = await alloydb.projects.locations.clusters.instances.create({
|
|
6187
|
+
* // Required. ID of the requesting object.
|
|
6188
|
+
* instanceId: 'placeholder-value',
|
|
6189
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6190
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6191
|
+
* // 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).
|
|
6192
|
+
* requestId: 'placeholder-value',
|
|
6193
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6194
|
+
* validateOnly: 'placeholder-value',
|
|
6195
|
+
*
|
|
6196
|
+
* // Request body metadata
|
|
6197
|
+
* requestBody: {
|
|
6198
|
+
* // request body parameters
|
|
6199
|
+
* // {
|
|
6200
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6201
|
+
* // "annotations": {},
|
|
6202
|
+
* // "availabilityType": "my_availabilityType",
|
|
6203
|
+
* // "clientConnectionConfig": {},
|
|
6204
|
+
* // "connectionPoolConfig": {},
|
|
6205
|
+
* // "createTime": "my_createTime",
|
|
6206
|
+
* // "databaseFlags": {},
|
|
6207
|
+
* // "deleteTime": "my_deleteTime",
|
|
6208
|
+
* // "displayName": "my_displayName",
|
|
6209
|
+
* // "etag": "my_etag",
|
|
6210
|
+
* // "gcaConfig": {},
|
|
6211
|
+
* // "gceZone": "my_gceZone",
|
|
6212
|
+
* // "geminiConfig": {},
|
|
6213
|
+
* // "instanceType": "my_instanceType",
|
|
6214
|
+
* // "ipAddress": "my_ipAddress",
|
|
6215
|
+
* // "labels": {},
|
|
6216
|
+
* // "machineConfig": {},
|
|
6217
|
+
* // "name": "my_name",
|
|
6218
|
+
* // "networkConfig": {},
|
|
6219
|
+
* // "nodes": [],
|
|
6220
|
+
* // "observabilityConfig": {},
|
|
6221
|
+
* // "outboundPublicIpAddresses": [],
|
|
6222
|
+
* // "pscInstanceConfig": {},
|
|
6223
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6224
|
+
* // "queryInsightsConfig": {},
|
|
6225
|
+
* // "readPoolConfig": {},
|
|
6226
|
+
* // "reconciling": false,
|
|
6227
|
+
* // "satisfiesPzi": false,
|
|
6228
|
+
* // "satisfiesPzs": false,
|
|
6229
|
+
* // "state": "my_state",
|
|
6230
|
+
* // "uid": "my_uid",
|
|
6231
|
+
* // "updatePolicy": {},
|
|
6232
|
+
* // "updateTime": "my_updateTime",
|
|
6233
|
+
* // "writableNode": {}
|
|
6234
|
+
* // }
|
|
6235
|
+
* },
|
|
6236
|
+
* });
|
|
6237
|
+
* console.log(res.data);
|
|
6238
|
+
*
|
|
6239
|
+
* // Example response
|
|
6240
|
+
* // {
|
|
6241
|
+
* // "done": false,
|
|
6242
|
+
* // "error": {},
|
|
6243
|
+
* // "metadata": {},
|
|
6244
|
+
* // "name": "my_name",
|
|
6245
|
+
* // "response": {}
|
|
6246
|
+
* // }
|
|
6247
|
+
* }
|
|
6248
|
+
*
|
|
6249
|
+
* main().catch(e => {
|
|
6250
|
+
* console.error(e);
|
|
6251
|
+
* throw e;
|
|
6252
|
+
* });
|
|
6253
|
+
*
|
|
6254
|
+
* ```
|
|
4680
6255
|
*
|
|
4681
6256
|
* @param params - Parameters for request
|
|
4682
6257
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4769,6 +6344,104 @@ export namespace alloydb_v1alpha {
|
|
|
4769
6344
|
|
|
4770
6345
|
/**
|
|
4771
6346
|
* Creates a new SECONDARY Instance in a given project and location.
|
|
6347
|
+
* @example
|
|
6348
|
+
* ```js
|
|
6349
|
+
* // Before running the sample:
|
|
6350
|
+
* // - Enable the API at:
|
|
6351
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6352
|
+
* // - Login into gcloud by running:
|
|
6353
|
+
* // ```sh
|
|
6354
|
+
* // $ gcloud auth application-default login
|
|
6355
|
+
* // ```
|
|
6356
|
+
* // - Install the npm module by running:
|
|
6357
|
+
* // ```sh
|
|
6358
|
+
* // $ npm install googleapis
|
|
6359
|
+
* // ```
|
|
6360
|
+
*
|
|
6361
|
+
* const {google} = require('googleapis');
|
|
6362
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6363
|
+
*
|
|
6364
|
+
* async function main() {
|
|
6365
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6366
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6367
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6368
|
+
* });
|
|
6369
|
+
*
|
|
6370
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6371
|
+
* const authClient = await auth.getClient();
|
|
6372
|
+
* google.options({auth: authClient});
|
|
6373
|
+
*
|
|
6374
|
+
* // Do the magic
|
|
6375
|
+
* const res =
|
|
6376
|
+
* await alloydb.projects.locations.clusters.instances.createsecondary({
|
|
6377
|
+
* // Required. ID of the requesting object.
|
|
6378
|
+
* instanceId: 'placeholder-value',
|
|
6379
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
6380
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
6381
|
+
* // 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).
|
|
6382
|
+
* requestId: 'placeholder-value',
|
|
6383
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6384
|
+
* validateOnly: 'placeholder-value',
|
|
6385
|
+
*
|
|
6386
|
+
* // Request body metadata
|
|
6387
|
+
* requestBody: {
|
|
6388
|
+
* // request body parameters
|
|
6389
|
+
* // {
|
|
6390
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6391
|
+
* // "annotations": {},
|
|
6392
|
+
* // "availabilityType": "my_availabilityType",
|
|
6393
|
+
* // "clientConnectionConfig": {},
|
|
6394
|
+
* // "connectionPoolConfig": {},
|
|
6395
|
+
* // "createTime": "my_createTime",
|
|
6396
|
+
* // "databaseFlags": {},
|
|
6397
|
+
* // "deleteTime": "my_deleteTime",
|
|
6398
|
+
* // "displayName": "my_displayName",
|
|
6399
|
+
* // "etag": "my_etag",
|
|
6400
|
+
* // "gcaConfig": {},
|
|
6401
|
+
* // "gceZone": "my_gceZone",
|
|
6402
|
+
* // "geminiConfig": {},
|
|
6403
|
+
* // "instanceType": "my_instanceType",
|
|
6404
|
+
* // "ipAddress": "my_ipAddress",
|
|
6405
|
+
* // "labels": {},
|
|
6406
|
+
* // "machineConfig": {},
|
|
6407
|
+
* // "name": "my_name",
|
|
6408
|
+
* // "networkConfig": {},
|
|
6409
|
+
* // "nodes": [],
|
|
6410
|
+
* // "observabilityConfig": {},
|
|
6411
|
+
* // "outboundPublicIpAddresses": [],
|
|
6412
|
+
* // "pscInstanceConfig": {},
|
|
6413
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6414
|
+
* // "queryInsightsConfig": {},
|
|
6415
|
+
* // "readPoolConfig": {},
|
|
6416
|
+
* // "reconciling": false,
|
|
6417
|
+
* // "satisfiesPzi": false,
|
|
6418
|
+
* // "satisfiesPzs": false,
|
|
6419
|
+
* // "state": "my_state",
|
|
6420
|
+
* // "uid": "my_uid",
|
|
6421
|
+
* // "updatePolicy": {},
|
|
6422
|
+
* // "updateTime": "my_updateTime",
|
|
6423
|
+
* // "writableNode": {}
|
|
6424
|
+
* // }
|
|
6425
|
+
* },
|
|
6426
|
+
* });
|
|
6427
|
+
* console.log(res.data);
|
|
6428
|
+
*
|
|
6429
|
+
* // Example response
|
|
6430
|
+
* // {
|
|
6431
|
+
* // "done": false,
|
|
6432
|
+
* // "error": {},
|
|
6433
|
+
* // "metadata": {},
|
|
6434
|
+
* // "name": "my_name",
|
|
6435
|
+
* // "response": {}
|
|
6436
|
+
* // }
|
|
6437
|
+
* }
|
|
6438
|
+
*
|
|
6439
|
+
* main().catch(e => {
|
|
6440
|
+
* console.error(e);
|
|
6441
|
+
* throw e;
|
|
6442
|
+
* });
|
|
6443
|
+
*
|
|
6444
|
+
* ```
|
|
4772
6445
|
*
|
|
4773
6446
|
* @param params - Parameters for request
|
|
4774
6447
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4860,6 +6533,62 @@ export namespace alloydb_v1alpha {
|
|
|
4860
6533
|
|
|
4861
6534
|
/**
|
|
4862
6535
|
* Deletes a single Instance.
|
|
6536
|
+
* @example
|
|
6537
|
+
* ```js
|
|
6538
|
+
* // Before running the sample:
|
|
6539
|
+
* // - Enable the API at:
|
|
6540
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6541
|
+
* // - Login into gcloud by running:
|
|
6542
|
+
* // ```sh
|
|
6543
|
+
* // $ gcloud auth application-default login
|
|
6544
|
+
* // ```
|
|
6545
|
+
* // - Install the npm module by running:
|
|
6546
|
+
* // ```sh
|
|
6547
|
+
* // $ npm install googleapis
|
|
6548
|
+
* // ```
|
|
6549
|
+
*
|
|
6550
|
+
* const {google} = require('googleapis');
|
|
6551
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6552
|
+
*
|
|
6553
|
+
* async function main() {
|
|
6554
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6555
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6556
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6557
|
+
* });
|
|
6558
|
+
*
|
|
6559
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6560
|
+
* const authClient = await auth.getClient();
|
|
6561
|
+
* google.options({auth: authClient});
|
|
6562
|
+
*
|
|
6563
|
+
* // Do the magic
|
|
6564
|
+
* const res = await alloydb.projects.locations.clusters.instances.delete({
|
|
6565
|
+
* // 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.
|
|
6566
|
+
* etag: 'placeholder-value',
|
|
6567
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6568
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6569
|
+
* // 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).
|
|
6570
|
+
* requestId: 'placeholder-value',
|
|
6571
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
6572
|
+
* validateOnly: 'placeholder-value',
|
|
6573
|
+
* });
|
|
6574
|
+
* console.log(res.data);
|
|
6575
|
+
*
|
|
6576
|
+
* // Example response
|
|
6577
|
+
* // {
|
|
6578
|
+
* // "done": false,
|
|
6579
|
+
* // "error": {},
|
|
6580
|
+
* // "metadata": {},
|
|
6581
|
+
* // "name": "my_name",
|
|
6582
|
+
* // "response": {}
|
|
6583
|
+
* // }
|
|
6584
|
+
* }
|
|
6585
|
+
*
|
|
6586
|
+
* main().catch(e => {
|
|
6587
|
+
* console.error(e);
|
|
6588
|
+
* throw e;
|
|
6589
|
+
* });
|
|
6590
|
+
*
|
|
6591
|
+
* ```
|
|
4863
6592
|
*
|
|
4864
6593
|
* @param params - Parameters for request
|
|
4865
6594
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -4949,6 +6678,65 @@ export namespace alloydb_v1alpha {
|
|
|
4949
6678
|
|
|
4950
6679
|
/**
|
|
4951
6680
|
* Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.
|
|
6681
|
+
* @example
|
|
6682
|
+
* ```js
|
|
6683
|
+
* // Before running the sample:
|
|
6684
|
+
* // - Enable the API at:
|
|
6685
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6686
|
+
* // - Login into gcloud by running:
|
|
6687
|
+
* // ```sh
|
|
6688
|
+
* // $ gcloud auth application-default login
|
|
6689
|
+
* // ```
|
|
6690
|
+
* // - Install the npm module by running:
|
|
6691
|
+
* // ```sh
|
|
6692
|
+
* // $ npm install googleapis
|
|
6693
|
+
* // ```
|
|
6694
|
+
*
|
|
6695
|
+
* const {google} = require('googleapis');
|
|
6696
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6697
|
+
*
|
|
6698
|
+
* async function main() {
|
|
6699
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6700
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6701
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6702
|
+
* });
|
|
6703
|
+
*
|
|
6704
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6705
|
+
* const authClient = await auth.getClient();
|
|
6706
|
+
* google.options({auth: authClient});
|
|
6707
|
+
*
|
|
6708
|
+
* // Do the magic
|
|
6709
|
+
* const res = await alloydb.projects.locations.clusters.instances.failover({
|
|
6710
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6711
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6712
|
+
*
|
|
6713
|
+
* // Request body metadata
|
|
6714
|
+
* requestBody: {
|
|
6715
|
+
* // request body parameters
|
|
6716
|
+
* // {
|
|
6717
|
+
* // "requestId": "my_requestId",
|
|
6718
|
+
* // "validateOnly": false
|
|
6719
|
+
* // }
|
|
6720
|
+
* },
|
|
6721
|
+
* });
|
|
6722
|
+
* console.log(res.data);
|
|
6723
|
+
*
|
|
6724
|
+
* // Example response
|
|
6725
|
+
* // {
|
|
6726
|
+
* // "done": false,
|
|
6727
|
+
* // "error": {},
|
|
6728
|
+
* // "metadata": {},
|
|
6729
|
+
* // "name": "my_name",
|
|
6730
|
+
* // "response": {}
|
|
6731
|
+
* // }
|
|
6732
|
+
* }
|
|
6733
|
+
*
|
|
6734
|
+
* main().catch(e => {
|
|
6735
|
+
* console.error(e);
|
|
6736
|
+
* throw e;
|
|
6737
|
+
* });
|
|
6738
|
+
*
|
|
6739
|
+
* ```
|
|
4952
6740
|
*
|
|
4953
6741
|
* @param params - Parameters for request
|
|
4954
6742
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5041,6 +6829,87 @@ export namespace alloydb_v1alpha {
|
|
|
5041
6829
|
|
|
5042
6830
|
/**
|
|
5043
6831
|
* Gets details of a single Instance.
|
|
6832
|
+
* @example
|
|
6833
|
+
* ```js
|
|
6834
|
+
* // Before running the sample:
|
|
6835
|
+
* // - Enable the API at:
|
|
6836
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6837
|
+
* // - Login into gcloud by running:
|
|
6838
|
+
* // ```sh
|
|
6839
|
+
* // $ gcloud auth application-default login
|
|
6840
|
+
* // ```
|
|
6841
|
+
* // - Install the npm module by running:
|
|
6842
|
+
* // ```sh
|
|
6843
|
+
* // $ npm install googleapis
|
|
6844
|
+
* // ```
|
|
6845
|
+
*
|
|
6846
|
+
* const {google} = require('googleapis');
|
|
6847
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
6848
|
+
*
|
|
6849
|
+
* async function main() {
|
|
6850
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6851
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6852
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6853
|
+
* });
|
|
6854
|
+
*
|
|
6855
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6856
|
+
* const authClient = await auth.getClient();
|
|
6857
|
+
* google.options({auth: authClient});
|
|
6858
|
+
*
|
|
6859
|
+
* // Do the magic
|
|
6860
|
+
* const res = await alloydb.projects.locations.clusters.instances.get({
|
|
6861
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
6862
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
6863
|
+
* // The view of the instance to return.
|
|
6864
|
+
* view: 'placeholder-value',
|
|
6865
|
+
* });
|
|
6866
|
+
* console.log(res.data);
|
|
6867
|
+
*
|
|
6868
|
+
* // Example response
|
|
6869
|
+
* // {
|
|
6870
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
6871
|
+
* // "annotations": {},
|
|
6872
|
+
* // "availabilityType": "my_availabilityType",
|
|
6873
|
+
* // "clientConnectionConfig": {},
|
|
6874
|
+
* // "connectionPoolConfig": {},
|
|
6875
|
+
* // "createTime": "my_createTime",
|
|
6876
|
+
* // "databaseFlags": {},
|
|
6877
|
+
* // "deleteTime": "my_deleteTime",
|
|
6878
|
+
* // "displayName": "my_displayName",
|
|
6879
|
+
* // "etag": "my_etag",
|
|
6880
|
+
* // "gcaConfig": {},
|
|
6881
|
+
* // "gceZone": "my_gceZone",
|
|
6882
|
+
* // "geminiConfig": {},
|
|
6883
|
+
* // "instanceType": "my_instanceType",
|
|
6884
|
+
* // "ipAddress": "my_ipAddress",
|
|
6885
|
+
* // "labels": {},
|
|
6886
|
+
* // "machineConfig": {},
|
|
6887
|
+
* // "name": "my_name",
|
|
6888
|
+
* // "networkConfig": {},
|
|
6889
|
+
* // "nodes": [],
|
|
6890
|
+
* // "observabilityConfig": {},
|
|
6891
|
+
* // "outboundPublicIpAddresses": [],
|
|
6892
|
+
* // "pscInstanceConfig": {},
|
|
6893
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
6894
|
+
* // "queryInsightsConfig": {},
|
|
6895
|
+
* // "readPoolConfig": {},
|
|
6896
|
+
* // "reconciling": false,
|
|
6897
|
+
* // "satisfiesPzi": false,
|
|
6898
|
+
* // "satisfiesPzs": false,
|
|
6899
|
+
* // "state": "my_state",
|
|
6900
|
+
* // "uid": "my_uid",
|
|
6901
|
+
* // "updatePolicy": {},
|
|
6902
|
+
* // "updateTime": "my_updateTime",
|
|
6903
|
+
* // "writableNode": {}
|
|
6904
|
+
* // }
|
|
6905
|
+
* }
|
|
6906
|
+
*
|
|
6907
|
+
* main().catch(e => {
|
|
6908
|
+
* console.error(e);
|
|
6909
|
+
* throw e;
|
|
6910
|
+
* });
|
|
6911
|
+
*
|
|
6912
|
+
* ```
|
|
5044
6913
|
*
|
|
5045
6914
|
* @param params - Parameters for request
|
|
5046
6915
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5130,6 +6999,61 @@ export namespace alloydb_v1alpha {
|
|
|
5130
6999
|
|
|
5131
7000
|
/**
|
|
5132
7001
|
* Get instance metadata used for a connection.
|
|
7002
|
+
* @example
|
|
7003
|
+
* ```js
|
|
7004
|
+
* // Before running the sample:
|
|
7005
|
+
* // - Enable the API at:
|
|
7006
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7007
|
+
* // - Login into gcloud by running:
|
|
7008
|
+
* // ```sh
|
|
7009
|
+
* // $ gcloud auth application-default login
|
|
7010
|
+
* // ```
|
|
7011
|
+
* // - Install the npm module by running:
|
|
7012
|
+
* // ```sh
|
|
7013
|
+
* // $ npm install googleapis
|
|
7014
|
+
* // ```
|
|
7015
|
+
*
|
|
7016
|
+
* const {google} = require('googleapis');
|
|
7017
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7018
|
+
*
|
|
7019
|
+
* async function main() {
|
|
7020
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7021
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7022
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7023
|
+
* });
|
|
7024
|
+
*
|
|
7025
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7026
|
+
* const authClient = await auth.getClient();
|
|
7027
|
+
* google.options({auth: authClient});
|
|
7028
|
+
*
|
|
7029
|
+
* // Do the magic
|
|
7030
|
+
* const res =
|
|
7031
|
+
* await alloydb.projects.locations.clusters.instances.getConnectionInfo({
|
|
7032
|
+
* // Required. The name of the parent resource. The required format is: projects/{project\}/locations/{location\}/clusters/{cluster\}/instances/{instance\}
|
|
7033
|
+
* parent:
|
|
7034
|
+
* 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7035
|
+
* // 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).
|
|
7036
|
+
* requestId: 'placeholder-value',
|
|
7037
|
+
* });
|
|
7038
|
+
* console.log(res.data);
|
|
7039
|
+
*
|
|
7040
|
+
* // Example response
|
|
7041
|
+
* // {
|
|
7042
|
+
* // "instanceUid": "my_instanceUid",
|
|
7043
|
+
* // "ipAddress": "my_ipAddress",
|
|
7044
|
+
* // "name": "my_name",
|
|
7045
|
+
* // "pemCertificateChain": [],
|
|
7046
|
+
* // "pscDnsName": "my_pscDnsName",
|
|
7047
|
+
* // "publicIpAddress": "my_publicIpAddress"
|
|
7048
|
+
* // }
|
|
7049
|
+
* }
|
|
7050
|
+
*
|
|
7051
|
+
* main().catch(e => {
|
|
7052
|
+
* console.error(e);
|
|
7053
|
+
* throw e;
|
|
7054
|
+
* });
|
|
7055
|
+
*
|
|
7056
|
+
* ```
|
|
5133
7057
|
*
|
|
5134
7058
|
* @param params - Parameters for request
|
|
5135
7059
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5224,6 +7148,66 @@ export namespace alloydb_v1alpha {
|
|
|
5224
7148
|
|
|
5225
7149
|
/**
|
|
5226
7150
|
* Injects fault in an instance. Imperative only.
|
|
7151
|
+
* @example
|
|
7152
|
+
* ```js
|
|
7153
|
+
* // Before running the sample:
|
|
7154
|
+
* // - Enable the API at:
|
|
7155
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7156
|
+
* // - Login into gcloud by running:
|
|
7157
|
+
* // ```sh
|
|
7158
|
+
* // $ gcloud auth application-default login
|
|
7159
|
+
* // ```
|
|
7160
|
+
* // - Install the npm module by running:
|
|
7161
|
+
* // ```sh
|
|
7162
|
+
* // $ npm install googleapis
|
|
7163
|
+
* // ```
|
|
7164
|
+
*
|
|
7165
|
+
* const {google} = require('googleapis');
|
|
7166
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7167
|
+
*
|
|
7168
|
+
* async function main() {
|
|
7169
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7170
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7171
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7172
|
+
* });
|
|
7173
|
+
*
|
|
7174
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7175
|
+
* const authClient = await auth.getClient();
|
|
7176
|
+
* google.options({auth: authClient});
|
|
7177
|
+
*
|
|
7178
|
+
* // Do the magic
|
|
7179
|
+
* const res = await alloydb.projects.locations.clusters.instances.injectFault({
|
|
7180
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7181
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7182
|
+
*
|
|
7183
|
+
* // Request body metadata
|
|
7184
|
+
* requestBody: {
|
|
7185
|
+
* // request body parameters
|
|
7186
|
+
* // {
|
|
7187
|
+
* // "faultType": "my_faultType",
|
|
7188
|
+
* // "requestId": "my_requestId",
|
|
7189
|
+
* // "validateOnly": false
|
|
7190
|
+
* // }
|
|
7191
|
+
* },
|
|
7192
|
+
* });
|
|
7193
|
+
* console.log(res.data);
|
|
7194
|
+
*
|
|
7195
|
+
* // Example response
|
|
7196
|
+
* // {
|
|
7197
|
+
* // "done": false,
|
|
7198
|
+
* // "error": {},
|
|
7199
|
+
* // "metadata": {},
|
|
7200
|
+
* // "name": "my_name",
|
|
7201
|
+
* // "response": {}
|
|
7202
|
+
* // }
|
|
7203
|
+
* }
|
|
7204
|
+
*
|
|
7205
|
+
* main().catch(e => {
|
|
7206
|
+
* console.error(e);
|
|
7207
|
+
* throw e;
|
|
7208
|
+
* });
|
|
7209
|
+
*
|
|
7210
|
+
* ```
|
|
5227
7211
|
*
|
|
5228
7212
|
* @param params - Parameters for request
|
|
5229
7213
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5316,6 +7300,62 @@ export namespace alloydb_v1alpha {
|
|
|
5316
7300
|
|
|
5317
7301
|
/**
|
|
5318
7302
|
* Lists Instances in a given project and location.
|
|
7303
|
+
* @example
|
|
7304
|
+
* ```js
|
|
7305
|
+
* // Before running the sample:
|
|
7306
|
+
* // - Enable the API at:
|
|
7307
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7308
|
+
* // - Login into gcloud by running:
|
|
7309
|
+
* // ```sh
|
|
7310
|
+
* // $ gcloud auth application-default login
|
|
7311
|
+
* // ```
|
|
7312
|
+
* // - Install the npm module by running:
|
|
7313
|
+
* // ```sh
|
|
7314
|
+
* // $ npm install googleapis
|
|
7315
|
+
* // ```
|
|
7316
|
+
*
|
|
7317
|
+
* const {google} = require('googleapis');
|
|
7318
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7319
|
+
*
|
|
7320
|
+
* async function main() {
|
|
7321
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7322
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7323
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7324
|
+
* });
|
|
7325
|
+
*
|
|
7326
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7327
|
+
* const authClient = await auth.getClient();
|
|
7328
|
+
* google.options({auth: authClient});
|
|
7329
|
+
*
|
|
7330
|
+
* // Do the magic
|
|
7331
|
+
* const res = await alloydb.projects.locations.clusters.instances.list({
|
|
7332
|
+
* // Optional. Filtering results
|
|
7333
|
+
* filter: 'placeholder-value',
|
|
7334
|
+
* // Optional. Hint for how to order the results
|
|
7335
|
+
* orderBy: 'placeholder-value',
|
|
7336
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
7337
|
+
* pageSize: 'placeholder-value',
|
|
7338
|
+
* // A token identifying a page of results the server should return.
|
|
7339
|
+
* pageToken: 'placeholder-value',
|
|
7340
|
+
* // 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/-
|
|
7341
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
7342
|
+
* });
|
|
7343
|
+
* console.log(res.data);
|
|
7344
|
+
*
|
|
7345
|
+
* // Example response
|
|
7346
|
+
* // {
|
|
7347
|
+
* // "instances": [],
|
|
7348
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
7349
|
+
* // "unreachable": []
|
|
7350
|
+
* // }
|
|
7351
|
+
* }
|
|
7352
|
+
*
|
|
7353
|
+
* main().catch(e => {
|
|
7354
|
+
* console.error(e);
|
|
7355
|
+
* throw e;
|
|
7356
|
+
* });
|
|
7357
|
+
*
|
|
7358
|
+
* ```
|
|
5319
7359
|
*
|
|
5320
7360
|
* @param params - Parameters for request
|
|
5321
7361
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5410,6 +7450,105 @@ export namespace alloydb_v1alpha {
|
|
|
5410
7450
|
|
|
5411
7451
|
/**
|
|
5412
7452
|
* Updates the parameters of a single Instance.
|
|
7453
|
+
* @example
|
|
7454
|
+
* ```js
|
|
7455
|
+
* // Before running the sample:
|
|
7456
|
+
* // - Enable the API at:
|
|
7457
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7458
|
+
* // - Login into gcloud by running:
|
|
7459
|
+
* // ```sh
|
|
7460
|
+
* // $ gcloud auth application-default login
|
|
7461
|
+
* // ```
|
|
7462
|
+
* // - Install the npm module by running:
|
|
7463
|
+
* // ```sh
|
|
7464
|
+
* // $ npm install googleapis
|
|
7465
|
+
* // ```
|
|
7466
|
+
*
|
|
7467
|
+
* const {google} = require('googleapis');
|
|
7468
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7469
|
+
*
|
|
7470
|
+
* async function main() {
|
|
7471
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7472
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7473
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7474
|
+
* });
|
|
7475
|
+
*
|
|
7476
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7477
|
+
* const authClient = await auth.getClient();
|
|
7478
|
+
* google.options({auth: authClient});
|
|
7479
|
+
*
|
|
7480
|
+
* // Do the magic
|
|
7481
|
+
* const res = await alloydb.projects.locations.clusters.instances.patch({
|
|
7482
|
+
* // 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.
|
|
7483
|
+
* allowMissing: 'placeholder-value',
|
|
7484
|
+
* // 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\}
|
|
7485
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7486
|
+
* // 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).
|
|
7487
|
+
* requestId: 'placeholder-value',
|
|
7488
|
+
* // 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.
|
|
7489
|
+
* updateMask: 'placeholder-value',
|
|
7490
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
7491
|
+
* validateOnly: 'placeholder-value',
|
|
7492
|
+
*
|
|
7493
|
+
* // Request body metadata
|
|
7494
|
+
* requestBody: {
|
|
7495
|
+
* // request body parameters
|
|
7496
|
+
* // {
|
|
7497
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
7498
|
+
* // "annotations": {},
|
|
7499
|
+
* // "availabilityType": "my_availabilityType",
|
|
7500
|
+
* // "clientConnectionConfig": {},
|
|
7501
|
+
* // "connectionPoolConfig": {},
|
|
7502
|
+
* // "createTime": "my_createTime",
|
|
7503
|
+
* // "databaseFlags": {},
|
|
7504
|
+
* // "deleteTime": "my_deleteTime",
|
|
7505
|
+
* // "displayName": "my_displayName",
|
|
7506
|
+
* // "etag": "my_etag",
|
|
7507
|
+
* // "gcaConfig": {},
|
|
7508
|
+
* // "gceZone": "my_gceZone",
|
|
7509
|
+
* // "geminiConfig": {},
|
|
7510
|
+
* // "instanceType": "my_instanceType",
|
|
7511
|
+
* // "ipAddress": "my_ipAddress",
|
|
7512
|
+
* // "labels": {},
|
|
7513
|
+
* // "machineConfig": {},
|
|
7514
|
+
* // "name": "my_name",
|
|
7515
|
+
* // "networkConfig": {},
|
|
7516
|
+
* // "nodes": [],
|
|
7517
|
+
* // "observabilityConfig": {},
|
|
7518
|
+
* // "outboundPublicIpAddresses": [],
|
|
7519
|
+
* // "pscInstanceConfig": {},
|
|
7520
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
7521
|
+
* // "queryInsightsConfig": {},
|
|
7522
|
+
* // "readPoolConfig": {},
|
|
7523
|
+
* // "reconciling": false,
|
|
7524
|
+
* // "satisfiesPzi": false,
|
|
7525
|
+
* // "satisfiesPzs": false,
|
|
7526
|
+
* // "state": "my_state",
|
|
7527
|
+
* // "uid": "my_uid",
|
|
7528
|
+
* // "updatePolicy": {},
|
|
7529
|
+
* // "updateTime": "my_updateTime",
|
|
7530
|
+
* // "writableNode": {}
|
|
7531
|
+
* // }
|
|
7532
|
+
* },
|
|
7533
|
+
* });
|
|
7534
|
+
* console.log(res.data);
|
|
7535
|
+
*
|
|
7536
|
+
* // Example response
|
|
7537
|
+
* // {
|
|
7538
|
+
* // "done": false,
|
|
7539
|
+
* // "error": {},
|
|
7540
|
+
* // "metadata": {},
|
|
7541
|
+
* // "name": "my_name",
|
|
7542
|
+
* // "response": {}
|
|
7543
|
+
* // }
|
|
7544
|
+
* }
|
|
7545
|
+
*
|
|
7546
|
+
* main().catch(e => {
|
|
7547
|
+
* console.error(e);
|
|
7548
|
+
* throw e;
|
|
7549
|
+
* });
|
|
7550
|
+
*
|
|
7551
|
+
* ```
|
|
5413
7552
|
*
|
|
5414
7553
|
* @param params - Parameters for request
|
|
5415
7554
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5499,6 +7638,66 @@ export namespace alloydb_v1alpha {
|
|
|
5499
7638
|
|
|
5500
7639
|
/**
|
|
5501
7640
|
* Restart an Instance in a cluster. Imperative only.
|
|
7641
|
+
* @example
|
|
7642
|
+
* ```js
|
|
7643
|
+
* // Before running the sample:
|
|
7644
|
+
* // - Enable the API at:
|
|
7645
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7646
|
+
* // - Login into gcloud by running:
|
|
7647
|
+
* // ```sh
|
|
7648
|
+
* // $ gcloud auth application-default login
|
|
7649
|
+
* // ```
|
|
7650
|
+
* // - Install the npm module by running:
|
|
7651
|
+
* // ```sh
|
|
7652
|
+
* // $ npm install googleapis
|
|
7653
|
+
* // ```
|
|
7654
|
+
*
|
|
7655
|
+
* const {google} = require('googleapis');
|
|
7656
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7657
|
+
*
|
|
7658
|
+
* async function main() {
|
|
7659
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7660
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7661
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7662
|
+
* });
|
|
7663
|
+
*
|
|
7664
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
7665
|
+
* const authClient = await auth.getClient();
|
|
7666
|
+
* google.options({auth: authClient});
|
|
7667
|
+
*
|
|
7668
|
+
* // Do the magic
|
|
7669
|
+
* const res = await alloydb.projects.locations.clusters.instances.restart({
|
|
7670
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
7671
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
7672
|
+
*
|
|
7673
|
+
* // Request body metadata
|
|
7674
|
+
* requestBody: {
|
|
7675
|
+
* // request body parameters
|
|
7676
|
+
* // {
|
|
7677
|
+
* // "nodeIds": [],
|
|
7678
|
+
* // "requestId": "my_requestId",
|
|
7679
|
+
* // "validateOnly": false
|
|
7680
|
+
* // }
|
|
7681
|
+
* },
|
|
7682
|
+
* });
|
|
7683
|
+
* console.log(res.data);
|
|
7684
|
+
*
|
|
7685
|
+
* // Example response
|
|
7686
|
+
* // {
|
|
7687
|
+
* // "done": false,
|
|
7688
|
+
* // "error": {},
|
|
7689
|
+
* // "metadata": {},
|
|
7690
|
+
* // "name": "my_name",
|
|
7691
|
+
* // "response": {}
|
|
7692
|
+
* // }
|
|
7693
|
+
* }
|
|
7694
|
+
*
|
|
7695
|
+
* main().catch(e => {
|
|
7696
|
+
* console.error(e);
|
|
7697
|
+
* throw e;
|
|
7698
|
+
* });
|
|
7699
|
+
*
|
|
7700
|
+
* ```
|
|
5502
7701
|
*
|
|
5503
7702
|
* @param params - Parameters for request
|
|
5504
7703
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5775,6 +7974,74 @@ export namespace alloydb_v1alpha {
|
|
|
5775
7974
|
|
|
5776
7975
|
/**
|
|
5777
7976
|
* Creates a new User in a given project, location, and cluster.
|
|
7977
|
+
* @example
|
|
7978
|
+
* ```js
|
|
7979
|
+
* // Before running the sample:
|
|
7980
|
+
* // - Enable the API at:
|
|
7981
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
7982
|
+
* // - Login into gcloud by running:
|
|
7983
|
+
* // ```sh
|
|
7984
|
+
* // $ gcloud auth application-default login
|
|
7985
|
+
* // ```
|
|
7986
|
+
* // - Install the npm module by running:
|
|
7987
|
+
* // ```sh
|
|
7988
|
+
* // $ npm install googleapis
|
|
7989
|
+
* // ```
|
|
7990
|
+
*
|
|
7991
|
+
* const {google} = require('googleapis');
|
|
7992
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
7993
|
+
*
|
|
7994
|
+
* async function main() {
|
|
7995
|
+
* const auth = new google.auth.GoogleAuth({
|
|
7996
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
7997
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
7998
|
+
* });
|
|
7999
|
+
*
|
|
8000
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8001
|
+
* const authClient = await auth.getClient();
|
|
8002
|
+
* google.options({auth: authClient});
|
|
8003
|
+
*
|
|
8004
|
+
* // Do the magic
|
|
8005
|
+
* const res = await alloydb.projects.locations.clusters.users.create({
|
|
8006
|
+
* // Required. Value for parent.
|
|
8007
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
8008
|
+
* // 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).
|
|
8009
|
+
* requestId: 'placeholder-value',
|
|
8010
|
+
* // Required. ID of the requesting object.
|
|
8011
|
+
* userId: 'placeholder-value',
|
|
8012
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8013
|
+
* validateOnly: 'placeholder-value',
|
|
8014
|
+
*
|
|
8015
|
+
* // Request body metadata
|
|
8016
|
+
* requestBody: {
|
|
8017
|
+
* // request body parameters
|
|
8018
|
+
* // {
|
|
8019
|
+
* // "databaseRoles": [],
|
|
8020
|
+
* // "keepExtraRoles": false,
|
|
8021
|
+
* // "name": "my_name",
|
|
8022
|
+
* // "password": "my_password",
|
|
8023
|
+
* // "userType": "my_userType"
|
|
8024
|
+
* // }
|
|
8025
|
+
* },
|
|
8026
|
+
* });
|
|
8027
|
+
* console.log(res.data);
|
|
8028
|
+
*
|
|
8029
|
+
* // Example response
|
|
8030
|
+
* // {
|
|
8031
|
+
* // "databaseRoles": [],
|
|
8032
|
+
* // "keepExtraRoles": false,
|
|
8033
|
+
* // "name": "my_name",
|
|
8034
|
+
* // "password": "my_password",
|
|
8035
|
+
* // "userType": "my_userType"
|
|
8036
|
+
* // }
|
|
8037
|
+
* }
|
|
8038
|
+
*
|
|
8039
|
+
* main().catch(e => {
|
|
8040
|
+
* console.error(e);
|
|
8041
|
+
* throw e;
|
|
8042
|
+
* });
|
|
8043
|
+
*
|
|
8044
|
+
* ```
|
|
5778
8045
|
*
|
|
5779
8046
|
* @param params - Parameters for request
|
|
5780
8047
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5866,6 +8133,54 @@ export namespace alloydb_v1alpha {
|
|
|
5866
8133
|
|
|
5867
8134
|
/**
|
|
5868
8135
|
* Deletes a single User.
|
|
8136
|
+
* @example
|
|
8137
|
+
* ```js
|
|
8138
|
+
* // Before running the sample:
|
|
8139
|
+
* // - Enable the API at:
|
|
8140
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8141
|
+
* // - Login into gcloud by running:
|
|
8142
|
+
* // ```sh
|
|
8143
|
+
* // $ gcloud auth application-default login
|
|
8144
|
+
* // ```
|
|
8145
|
+
* // - Install the npm module by running:
|
|
8146
|
+
* // ```sh
|
|
8147
|
+
* // $ npm install googleapis
|
|
8148
|
+
* // ```
|
|
8149
|
+
*
|
|
8150
|
+
* const {google} = require('googleapis');
|
|
8151
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8152
|
+
*
|
|
8153
|
+
* async function main() {
|
|
8154
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8155
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8156
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8157
|
+
* });
|
|
8158
|
+
*
|
|
8159
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8160
|
+
* const authClient = await auth.getClient();
|
|
8161
|
+
* google.options({auth: authClient});
|
|
8162
|
+
*
|
|
8163
|
+
* // Do the magic
|
|
8164
|
+
* const res = await alloydb.projects.locations.clusters.users.delete({
|
|
8165
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
8166
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8167
|
+
* // 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).
|
|
8168
|
+
* requestId: 'placeholder-value',
|
|
8169
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8170
|
+
* validateOnly: 'placeholder-value',
|
|
8171
|
+
* });
|
|
8172
|
+
* console.log(res.data);
|
|
8173
|
+
*
|
|
8174
|
+
* // Example response
|
|
8175
|
+
* // {}
|
|
8176
|
+
* }
|
|
8177
|
+
*
|
|
8178
|
+
* main().catch(e => {
|
|
8179
|
+
* console.error(e);
|
|
8180
|
+
* throw e;
|
|
8181
|
+
* });
|
|
8182
|
+
*
|
|
8183
|
+
* ```
|
|
5869
8184
|
*
|
|
5870
8185
|
* @param params - Parameters for request
|
|
5871
8186
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -5954,6 +8269,56 @@ export namespace alloydb_v1alpha {
|
|
|
5954
8269
|
|
|
5955
8270
|
/**
|
|
5956
8271
|
* Gets details of a single User.
|
|
8272
|
+
* @example
|
|
8273
|
+
* ```js
|
|
8274
|
+
* // Before running the sample:
|
|
8275
|
+
* // - Enable the API at:
|
|
8276
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8277
|
+
* // - Login into gcloud by running:
|
|
8278
|
+
* // ```sh
|
|
8279
|
+
* // $ gcloud auth application-default login
|
|
8280
|
+
* // ```
|
|
8281
|
+
* // - Install the npm module by running:
|
|
8282
|
+
* // ```sh
|
|
8283
|
+
* // $ npm install googleapis
|
|
8284
|
+
* // ```
|
|
8285
|
+
*
|
|
8286
|
+
* const {google} = require('googleapis');
|
|
8287
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8288
|
+
*
|
|
8289
|
+
* async function main() {
|
|
8290
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8291
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8292
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8293
|
+
* });
|
|
8294
|
+
*
|
|
8295
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8296
|
+
* const authClient = await auth.getClient();
|
|
8297
|
+
* google.options({auth: authClient});
|
|
8298
|
+
*
|
|
8299
|
+
* // Do the magic
|
|
8300
|
+
* const res = await alloydb.projects.locations.clusters.users.get({
|
|
8301
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
8302
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8303
|
+
* });
|
|
8304
|
+
* console.log(res.data);
|
|
8305
|
+
*
|
|
8306
|
+
* // Example response
|
|
8307
|
+
* // {
|
|
8308
|
+
* // "databaseRoles": [],
|
|
8309
|
+
* // "keepExtraRoles": false,
|
|
8310
|
+
* // "name": "my_name",
|
|
8311
|
+
* // "password": "my_password",
|
|
8312
|
+
* // "userType": "my_userType"
|
|
8313
|
+
* // }
|
|
8314
|
+
* }
|
|
8315
|
+
*
|
|
8316
|
+
* main().catch(e => {
|
|
8317
|
+
* console.error(e);
|
|
8318
|
+
* throw e;
|
|
8319
|
+
* });
|
|
8320
|
+
*
|
|
8321
|
+
* ```
|
|
5957
8322
|
*
|
|
5958
8323
|
* @param params - Parameters for request
|
|
5959
8324
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6042,6 +8407,62 @@ export namespace alloydb_v1alpha {
|
|
|
6042
8407
|
|
|
6043
8408
|
/**
|
|
6044
8409
|
* Lists Users in a given project and location.
|
|
8410
|
+
* @example
|
|
8411
|
+
* ```js
|
|
8412
|
+
* // Before running the sample:
|
|
8413
|
+
* // - Enable the API at:
|
|
8414
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8415
|
+
* // - Login into gcloud by running:
|
|
8416
|
+
* // ```sh
|
|
8417
|
+
* // $ gcloud auth application-default login
|
|
8418
|
+
* // ```
|
|
8419
|
+
* // - Install the npm module by running:
|
|
8420
|
+
* // ```sh
|
|
8421
|
+
* // $ npm install googleapis
|
|
8422
|
+
* // ```
|
|
8423
|
+
*
|
|
8424
|
+
* const {google} = require('googleapis');
|
|
8425
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8426
|
+
*
|
|
8427
|
+
* async function main() {
|
|
8428
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8429
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8430
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8431
|
+
* });
|
|
8432
|
+
*
|
|
8433
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8434
|
+
* const authClient = await auth.getClient();
|
|
8435
|
+
* google.options({auth: authClient});
|
|
8436
|
+
*
|
|
8437
|
+
* // Do the magic
|
|
8438
|
+
* const res = await alloydb.projects.locations.clusters.users.list({
|
|
8439
|
+
* // Optional. Filtering results
|
|
8440
|
+
* filter: 'placeholder-value',
|
|
8441
|
+
* // Optional. Hint for how to order the results
|
|
8442
|
+
* orderBy: 'placeholder-value',
|
|
8443
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
8444
|
+
* pageSize: 'placeholder-value',
|
|
8445
|
+
* // Optional. A token identifying a page of results the server should return.
|
|
8446
|
+
* pageToken: 'placeholder-value',
|
|
8447
|
+
* // Required. Parent value for ListUsersRequest
|
|
8448
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
8449
|
+
* });
|
|
8450
|
+
* console.log(res.data);
|
|
8451
|
+
*
|
|
8452
|
+
* // Example response
|
|
8453
|
+
* // {
|
|
8454
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
8455
|
+
* // "unreachable": [],
|
|
8456
|
+
* // "users": []
|
|
8457
|
+
* // }
|
|
8458
|
+
* }
|
|
8459
|
+
*
|
|
8460
|
+
* main().catch(e => {
|
|
8461
|
+
* console.error(e);
|
|
8462
|
+
* throw e;
|
|
8463
|
+
* });
|
|
8464
|
+
*
|
|
8465
|
+
* ```
|
|
6045
8466
|
*
|
|
6046
8467
|
* @param params - Parameters for request
|
|
6047
8468
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6133,6 +8554,76 @@ export namespace alloydb_v1alpha {
|
|
|
6133
8554
|
|
|
6134
8555
|
/**
|
|
6135
8556
|
* Updates the parameters of a single User.
|
|
8557
|
+
* @example
|
|
8558
|
+
* ```js
|
|
8559
|
+
* // Before running the sample:
|
|
8560
|
+
* // - Enable the API at:
|
|
8561
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8562
|
+
* // - Login into gcloud by running:
|
|
8563
|
+
* // ```sh
|
|
8564
|
+
* // $ gcloud auth application-default login
|
|
8565
|
+
* // ```
|
|
8566
|
+
* // - Install the npm module by running:
|
|
8567
|
+
* // ```sh
|
|
8568
|
+
* // $ npm install googleapis
|
|
8569
|
+
* // ```
|
|
8570
|
+
*
|
|
8571
|
+
* const {google} = require('googleapis');
|
|
8572
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8573
|
+
*
|
|
8574
|
+
* async function main() {
|
|
8575
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8576
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8577
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8578
|
+
* });
|
|
8579
|
+
*
|
|
8580
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8581
|
+
* const authClient = await auth.getClient();
|
|
8582
|
+
* google.options({auth: authClient});
|
|
8583
|
+
*
|
|
8584
|
+
* // Do the magic
|
|
8585
|
+
* const res = await alloydb.projects.locations.clusters.users.patch({
|
|
8586
|
+
* // Optional. Allow missing fields in the update mask.
|
|
8587
|
+
* allowMissing: 'placeholder-value',
|
|
8588
|
+
* // Output only. Name of the resource in the form of projects/{project\}/locations/{location\}/cluster/{cluster\}/users/{user\}.
|
|
8589
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
8590
|
+
* // 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).
|
|
8591
|
+
* requestId: 'placeholder-value',
|
|
8592
|
+
* // 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.
|
|
8593
|
+
* updateMask: 'placeholder-value',
|
|
8594
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
8595
|
+
* validateOnly: 'placeholder-value',
|
|
8596
|
+
*
|
|
8597
|
+
* // Request body metadata
|
|
8598
|
+
* requestBody: {
|
|
8599
|
+
* // request body parameters
|
|
8600
|
+
* // {
|
|
8601
|
+
* // "databaseRoles": [],
|
|
8602
|
+
* // "keepExtraRoles": false,
|
|
8603
|
+
* // "name": "my_name",
|
|
8604
|
+
* // "password": "my_password",
|
|
8605
|
+
* // "userType": "my_userType"
|
|
8606
|
+
* // }
|
|
8607
|
+
* },
|
|
8608
|
+
* });
|
|
8609
|
+
* console.log(res.data);
|
|
8610
|
+
*
|
|
8611
|
+
* // Example response
|
|
8612
|
+
* // {
|
|
8613
|
+
* // "databaseRoles": [],
|
|
8614
|
+
* // "keepExtraRoles": false,
|
|
8615
|
+
* // "name": "my_name",
|
|
8616
|
+
* // "password": "my_password",
|
|
8617
|
+
* // "userType": "my_userType"
|
|
8618
|
+
* // }
|
|
8619
|
+
* }
|
|
8620
|
+
*
|
|
8621
|
+
* main().catch(e => {
|
|
8622
|
+
* console.error(e);
|
|
8623
|
+
* throw e;
|
|
8624
|
+
* });
|
|
8625
|
+
*
|
|
8626
|
+
* ```
|
|
6136
8627
|
*
|
|
6137
8628
|
* @param params - Parameters for request
|
|
6138
8629
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6326,6 +8817,56 @@ export namespace alloydb_v1alpha {
|
|
|
6326
8817
|
|
|
6327
8818
|
/**
|
|
6328
8819
|
* 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`.
|
|
8820
|
+
* @example
|
|
8821
|
+
* ```js
|
|
8822
|
+
* // Before running the sample:
|
|
8823
|
+
* // - Enable the API at:
|
|
8824
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8825
|
+
* // - Login into gcloud by running:
|
|
8826
|
+
* // ```sh
|
|
8827
|
+
* // $ gcloud auth application-default login
|
|
8828
|
+
* // ```
|
|
8829
|
+
* // - Install the npm module by running:
|
|
8830
|
+
* // ```sh
|
|
8831
|
+
* // $ npm install googleapis
|
|
8832
|
+
* // ```
|
|
8833
|
+
*
|
|
8834
|
+
* const {google} = require('googleapis');
|
|
8835
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8836
|
+
*
|
|
8837
|
+
* async function main() {
|
|
8838
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8839
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8840
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8841
|
+
* });
|
|
8842
|
+
*
|
|
8843
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8844
|
+
* const authClient = await auth.getClient();
|
|
8845
|
+
* google.options({auth: authClient});
|
|
8846
|
+
*
|
|
8847
|
+
* // Do the magic
|
|
8848
|
+
* const res = await alloydb.projects.locations.operations.cancel({
|
|
8849
|
+
* // The name of the operation resource to be cancelled.
|
|
8850
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8851
|
+
*
|
|
8852
|
+
* // Request body metadata
|
|
8853
|
+
* requestBody: {
|
|
8854
|
+
* // request body parameters
|
|
8855
|
+
* // {}
|
|
8856
|
+
* },
|
|
8857
|
+
* });
|
|
8858
|
+
* console.log(res.data);
|
|
8859
|
+
*
|
|
8860
|
+
* // Example response
|
|
8861
|
+
* // {}
|
|
8862
|
+
* }
|
|
8863
|
+
*
|
|
8864
|
+
* main().catch(e => {
|
|
8865
|
+
* console.error(e);
|
|
8866
|
+
* throw e;
|
|
8867
|
+
* });
|
|
8868
|
+
*
|
|
8869
|
+
* ```
|
|
6329
8870
|
*
|
|
6330
8871
|
* @param params - Parameters for request
|
|
6331
8872
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6417,6 +8958,50 @@ export namespace alloydb_v1alpha {
|
|
|
6417
8958
|
|
|
6418
8959
|
/**
|
|
6419
8960
|
* 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`.
|
|
8961
|
+
* @example
|
|
8962
|
+
* ```js
|
|
8963
|
+
* // Before running the sample:
|
|
8964
|
+
* // - Enable the API at:
|
|
8965
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
8966
|
+
* // - Login into gcloud by running:
|
|
8967
|
+
* // ```sh
|
|
8968
|
+
* // $ gcloud auth application-default login
|
|
8969
|
+
* // ```
|
|
8970
|
+
* // - Install the npm module by running:
|
|
8971
|
+
* // ```sh
|
|
8972
|
+
* // $ npm install googleapis
|
|
8973
|
+
* // ```
|
|
8974
|
+
*
|
|
8975
|
+
* const {google} = require('googleapis');
|
|
8976
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
8977
|
+
*
|
|
8978
|
+
* async function main() {
|
|
8979
|
+
* const auth = new google.auth.GoogleAuth({
|
|
8980
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
8981
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
8982
|
+
* });
|
|
8983
|
+
*
|
|
8984
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
8985
|
+
* const authClient = await auth.getClient();
|
|
8986
|
+
* google.options({auth: authClient});
|
|
8987
|
+
*
|
|
8988
|
+
* // Do the magic
|
|
8989
|
+
* const res = await alloydb.projects.locations.operations.delete({
|
|
8990
|
+
* // The name of the operation resource to be deleted.
|
|
8991
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
8992
|
+
* });
|
|
8993
|
+
* console.log(res.data);
|
|
8994
|
+
*
|
|
8995
|
+
* // Example response
|
|
8996
|
+
* // {}
|
|
8997
|
+
* }
|
|
8998
|
+
*
|
|
8999
|
+
* main().catch(e => {
|
|
9000
|
+
* console.error(e);
|
|
9001
|
+
* throw e;
|
|
9002
|
+
* });
|
|
9003
|
+
*
|
|
9004
|
+
* ```
|
|
6420
9005
|
*
|
|
6421
9006
|
* @param params - Parameters for request
|
|
6422
9007
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6505,6 +9090,56 @@ export namespace alloydb_v1alpha {
|
|
|
6505
9090
|
|
|
6506
9091
|
/**
|
|
6507
9092
|
* 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.
|
|
9093
|
+
* @example
|
|
9094
|
+
* ```js
|
|
9095
|
+
* // Before running the sample:
|
|
9096
|
+
* // - Enable the API at:
|
|
9097
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9098
|
+
* // - Login into gcloud by running:
|
|
9099
|
+
* // ```sh
|
|
9100
|
+
* // $ gcloud auth application-default login
|
|
9101
|
+
* // ```
|
|
9102
|
+
* // - Install the npm module by running:
|
|
9103
|
+
* // ```sh
|
|
9104
|
+
* // $ npm install googleapis
|
|
9105
|
+
* // ```
|
|
9106
|
+
*
|
|
9107
|
+
* const {google} = require('googleapis');
|
|
9108
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
9109
|
+
*
|
|
9110
|
+
* async function main() {
|
|
9111
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9112
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9113
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9114
|
+
* });
|
|
9115
|
+
*
|
|
9116
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9117
|
+
* const authClient = await auth.getClient();
|
|
9118
|
+
* google.options({auth: authClient});
|
|
9119
|
+
*
|
|
9120
|
+
* // Do the magic
|
|
9121
|
+
* const res = await alloydb.projects.locations.operations.get({
|
|
9122
|
+
* // The name of the operation resource.
|
|
9123
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
9124
|
+
* });
|
|
9125
|
+
* console.log(res.data);
|
|
9126
|
+
*
|
|
9127
|
+
* // Example response
|
|
9128
|
+
* // {
|
|
9129
|
+
* // "done": false,
|
|
9130
|
+
* // "error": {},
|
|
9131
|
+
* // "metadata": {},
|
|
9132
|
+
* // "name": "my_name",
|
|
9133
|
+
* // "response": {}
|
|
9134
|
+
* // }
|
|
9135
|
+
* }
|
|
9136
|
+
*
|
|
9137
|
+
* main().catch(e => {
|
|
9138
|
+
* console.error(e);
|
|
9139
|
+
* throw e;
|
|
9140
|
+
* });
|
|
9141
|
+
*
|
|
9142
|
+
* ```
|
|
6508
9143
|
*
|
|
6509
9144
|
* @param params - Parameters for request
|
|
6510
9145
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6593,6 +9228,59 @@ export namespace alloydb_v1alpha {
|
|
|
6593
9228
|
|
|
6594
9229
|
/**
|
|
6595
9230
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
9231
|
+
* @example
|
|
9232
|
+
* ```js
|
|
9233
|
+
* // Before running the sample:
|
|
9234
|
+
* // - Enable the API at:
|
|
9235
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9236
|
+
* // - Login into gcloud by running:
|
|
9237
|
+
* // ```sh
|
|
9238
|
+
* // $ gcloud auth application-default login
|
|
9239
|
+
* // ```
|
|
9240
|
+
* // - Install the npm module by running:
|
|
9241
|
+
* // ```sh
|
|
9242
|
+
* // $ npm install googleapis
|
|
9243
|
+
* // ```
|
|
9244
|
+
*
|
|
9245
|
+
* const {google} = require('googleapis');
|
|
9246
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
9247
|
+
*
|
|
9248
|
+
* async function main() {
|
|
9249
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9250
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9251
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9252
|
+
* });
|
|
9253
|
+
*
|
|
9254
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9255
|
+
* const authClient = await auth.getClient();
|
|
9256
|
+
* google.options({auth: authClient});
|
|
9257
|
+
*
|
|
9258
|
+
* // Do the magic
|
|
9259
|
+
* const res = await alloydb.projects.locations.operations.list({
|
|
9260
|
+
* // The standard list filter.
|
|
9261
|
+
* filter: 'placeholder-value',
|
|
9262
|
+
* // The name of the operation's parent resource.
|
|
9263
|
+
* name: 'projects/my-project/locations/my-location',
|
|
9264
|
+
* // The standard list page size.
|
|
9265
|
+
* pageSize: 'placeholder-value',
|
|
9266
|
+
* // The standard list page token.
|
|
9267
|
+
* pageToken: 'placeholder-value',
|
|
9268
|
+
* });
|
|
9269
|
+
* console.log(res.data);
|
|
9270
|
+
*
|
|
9271
|
+
* // Example response
|
|
9272
|
+
* // {
|
|
9273
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9274
|
+
* // "operations": []
|
|
9275
|
+
* // }
|
|
9276
|
+
* }
|
|
9277
|
+
*
|
|
9278
|
+
* main().catch(e => {
|
|
9279
|
+
* console.error(e);
|
|
9280
|
+
* throw e;
|
|
9281
|
+
* });
|
|
9282
|
+
*
|
|
9283
|
+
* ```
|
|
6596
9284
|
*
|
|
6597
9285
|
* @param params - Parameters for request
|
|
6598
9286
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -6739,6 +9427,59 @@ export namespace alloydb_v1alpha {
|
|
|
6739
9427
|
|
|
6740
9428
|
/**
|
|
6741
9429
|
* Lists SupportedDatabaseFlags for a given project and location.
|
|
9430
|
+
* @example
|
|
9431
|
+
* ```js
|
|
9432
|
+
* // Before running the sample:
|
|
9433
|
+
* // - Enable the API at:
|
|
9434
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
9435
|
+
* // - Login into gcloud by running:
|
|
9436
|
+
* // ```sh
|
|
9437
|
+
* // $ gcloud auth application-default login
|
|
9438
|
+
* // ```
|
|
9439
|
+
* // - Install the npm module by running:
|
|
9440
|
+
* // ```sh
|
|
9441
|
+
* // $ npm install googleapis
|
|
9442
|
+
* // ```
|
|
9443
|
+
*
|
|
9444
|
+
* const {google} = require('googleapis');
|
|
9445
|
+
* const alloydb = google.alloydb('v1alpha');
|
|
9446
|
+
*
|
|
9447
|
+
* async function main() {
|
|
9448
|
+
* const auth = new google.auth.GoogleAuth({
|
|
9449
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
9450
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
9451
|
+
* });
|
|
9452
|
+
*
|
|
9453
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
9454
|
+
* const authClient = await auth.getClient();
|
|
9455
|
+
* google.options({auth: authClient});
|
|
9456
|
+
*
|
|
9457
|
+
* // Do the magic
|
|
9458
|
+
* const res = await alloydb.projects.locations.supportedDatabaseFlags.list({
|
|
9459
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
9460
|
+
* pageSize: 'placeholder-value',
|
|
9461
|
+
* // A token identifying a page of results the server should return.
|
|
9462
|
+
* pageToken: 'placeholder-value',
|
|
9463
|
+
* // 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.
|
|
9464
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
9465
|
+
* // Optional. The scope for which supported flags are requested. If not specified, default is DATABASE.
|
|
9466
|
+
* scope: 'placeholder-value',
|
|
9467
|
+
* });
|
|
9468
|
+
* console.log(res.data);
|
|
9469
|
+
*
|
|
9470
|
+
* // Example response
|
|
9471
|
+
* // {
|
|
9472
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
9473
|
+
* // "supportedDatabaseFlags": []
|
|
9474
|
+
* // }
|
|
9475
|
+
* }
|
|
9476
|
+
*
|
|
9477
|
+
* main().catch(e => {
|
|
9478
|
+
* console.error(e);
|
|
9479
|
+
* throw e;
|
|
9480
|
+
* });
|
|
9481
|
+
*
|
|
9482
|
+
* ```
|
|
6742
9483
|
*
|
|
6743
9484
|
* @param params - Parameters for request
|
|
6744
9485
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|