@googleapis/alloydb 12.1.0 → 14.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v1.d.ts +2715 -86
- package/build/v1.js.map +1 -1
- package/build/v1alpha.d.ts +2775 -97
- package/build/v1alpha.js.map +1 -1
- package/build/v1beta.d.ts +2758 -97
- package/build/v1beta.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v1.ts +2867 -134
- package/v1alpha.ts +2927 -145
- package/v1beta.ts +2910 -145
package/build/v1.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient,
|
|
2
|
+
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
export declare namespace alloydb_v1 {
|
|
5
5
|
export interface Options extends GlobalOptions {
|
|
@@ -503,7 +503,7 @@ export declare namespace alloydb_v1 {
|
|
|
503
503
|
*/
|
|
504
504
|
export interface Schema$ContinuousBackupInfo {
|
|
505
505
|
/**
|
|
506
|
-
* Output only. The earliest restorable time that can be restored to.
|
|
506
|
+
* Output only. The earliest restorable time that can be restored to. If continuous backups and recovery was recently enabled, the earliest restorable time is the creation time of the earliest eligible backup within this cluster's continuous backup recovery window. After a cluster has had continuous backups enabled for the duration of its recovery window, the earliest restorable time becomes "now minus the recovery window". For example, assuming a point in time recovery is attempted at 04/16/2025 3:23:00PM with a 14d recovery window, the earliest restorable time would be 04/02/2025 3:23:00PM. This field is only visible if the CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided.
|
|
507
507
|
*/
|
|
508
508
|
earliestRestorableTime?: string | null;
|
|
509
509
|
/**
|
|
@@ -515,7 +515,7 @@ export declare namespace alloydb_v1 {
|
|
|
515
515
|
*/
|
|
516
516
|
encryptionInfo?: Schema$EncryptionInfo;
|
|
517
517
|
/**
|
|
518
|
-
* Output only. Days of the week on which a continuous backup is taken.
|
|
518
|
+
* Output only. Days of the week on which a continuous backup is taken.
|
|
519
519
|
*/
|
|
520
520
|
schedule?: string[] | null;
|
|
521
521
|
}
|
|
@@ -809,6 +809,10 @@ export declare namespace alloydb_v1 {
|
|
|
809
809
|
* An Instance is a computing unit that an end customer can connect to. It's the main unit of computing resources in AlloyDB.
|
|
810
810
|
*/
|
|
811
811
|
export interface Schema$Instance {
|
|
812
|
+
/**
|
|
813
|
+
* Optional. Specifies whether an instance needs to spin up. Once the instance is active, the activation policy can be updated to the `NEVER` to stop the instance. Likewise, the activation policy can be updated to `ALWAYS` to start the instance. There are restrictions around when an instance can/cannot be activated (for example, a read pool instance should be stopped before stopping primary etc.). Please refer to the API documentation for more details.
|
|
814
|
+
*/
|
|
815
|
+
activationPolicy?: string | null;
|
|
812
816
|
/**
|
|
813
817
|
* Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
|
|
814
818
|
*/
|
|
@@ -932,6 +936,10 @@ export declare namespace alloydb_v1 {
|
|
|
932
936
|
* Metadata related to instance-level network configuration.
|
|
933
937
|
*/
|
|
934
938
|
export interface Schema$InstanceNetworkConfig {
|
|
939
|
+
/**
|
|
940
|
+
* 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])?.
|
|
941
|
+
*/
|
|
942
|
+
allocatedIpRangeOverride?: string | null;
|
|
935
943
|
/**
|
|
936
944
|
* Optional. A list of external network authorized to access this instance.
|
|
937
945
|
*/
|
|
@@ -950,7 +958,7 @@ export declare namespace alloydb_v1 {
|
|
|
950
958
|
network?: string | null;
|
|
951
959
|
}
|
|
952
960
|
/**
|
|
953
|
-
* Details regarding the upgrade of
|
|
961
|
+
* Details regarding the upgrade of instances associated with a cluster.
|
|
954
962
|
*/
|
|
955
963
|
export interface Schema$InstanceUpgradeDetails {
|
|
956
964
|
/**
|
|
@@ -1696,7 +1704,7 @@ export declare namespace alloydb_v1 {
|
|
|
1696
1704
|
internalResourceMetadata?: Schema$StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata[];
|
|
1697
1705
|
}
|
|
1698
1706
|
/**
|
|
1699
|
-
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.
|
|
1707
|
+
* DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. Next ID: 8
|
|
1700
1708
|
*/
|
|
1701
1709
|
export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed {
|
|
1702
1710
|
/**
|
|
@@ -1742,6 +1750,10 @@ export declare namespace alloydb_v1 {
|
|
|
1742
1750
|
* 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.
|
|
1743
1751
|
*/
|
|
1744
1752
|
externalUri?: string | null;
|
|
1753
|
+
/**
|
|
1754
|
+
* This is used to identify the location of the resource. Example: "us-central1"
|
|
1755
|
+
*/
|
|
1756
|
+
location?: string | null;
|
|
1745
1757
|
/**
|
|
1746
1758
|
* Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.
|
|
1747
1759
|
*/
|
|
@@ -1789,7 +1801,7 @@ export declare namespace alloydb_v1 {
|
|
|
1789
1801
|
*/
|
|
1790
1802
|
providerDescription?: string | null;
|
|
1791
1803
|
/**
|
|
1792
|
-
* Required. The type of resource this ID is identifying. Ex
|
|
1804
|
+
* 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
|
|
1793
1805
|
*/
|
|
1794
1806
|
resourceType?: string | null;
|
|
1795
1807
|
/**
|
|
@@ -2334,28 +2346,133 @@ export declare namespace alloydb_v1 {
|
|
|
2334
2346
|
constructor(context: APIRequestContext);
|
|
2335
2347
|
/**
|
|
2336
2348
|
* Gets information about a location.
|
|
2349
|
+
* @example
|
|
2350
|
+
* ```js
|
|
2351
|
+
* // Before running the sample:
|
|
2352
|
+
* // - Enable the API at:
|
|
2353
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2354
|
+
* // - Login into gcloud by running:
|
|
2355
|
+
* // ```sh
|
|
2356
|
+
* // $ gcloud auth application-default login
|
|
2357
|
+
* // ```
|
|
2358
|
+
* // - Install the npm module by running:
|
|
2359
|
+
* // ```sh
|
|
2360
|
+
* // $ npm install googleapis
|
|
2361
|
+
* // ```
|
|
2362
|
+
*
|
|
2363
|
+
* const {google} = require('googleapis');
|
|
2364
|
+
* const alloydb = google.alloydb('v1');
|
|
2365
|
+
*
|
|
2366
|
+
* async function main() {
|
|
2367
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2368
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2369
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2370
|
+
* });
|
|
2371
|
+
*
|
|
2372
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2373
|
+
* const authClient = await auth.getClient();
|
|
2374
|
+
* google.options({auth: authClient});
|
|
2375
|
+
*
|
|
2376
|
+
* // Do the magic
|
|
2377
|
+
* const res = await alloydb.projects.locations.get({
|
|
2378
|
+
* // Resource name for the location.
|
|
2379
|
+
* name: 'projects/my-project/locations/my-location',
|
|
2380
|
+
* });
|
|
2381
|
+
* console.log(res.data);
|
|
2382
|
+
*
|
|
2383
|
+
* // Example response
|
|
2384
|
+
* // {
|
|
2385
|
+
* // "displayName": "my_displayName",
|
|
2386
|
+
* // "labels": {},
|
|
2387
|
+
* // "locationId": "my_locationId",
|
|
2388
|
+
* // "metadata": {},
|
|
2389
|
+
* // "name": "my_name"
|
|
2390
|
+
* // }
|
|
2391
|
+
* }
|
|
2392
|
+
*
|
|
2393
|
+
* main().catch(e => {
|
|
2394
|
+
* console.error(e);
|
|
2395
|
+
* throw e;
|
|
2396
|
+
* });
|
|
2397
|
+
*
|
|
2398
|
+
* ```
|
|
2337
2399
|
*
|
|
2338
2400
|
* @param params - Parameters for request
|
|
2339
2401
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2340
2402
|
* @param callback - Optional callback that handles the response.
|
|
2341
2403
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2342
2404
|
*/
|
|
2343
|
-
get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions):
|
|
2344
|
-
get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions):
|
|
2405
|
+
get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2406
|
+
get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudLocationLocation>>;
|
|
2345
2407
|
get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2346
2408
|
get(params: Params$Resource$Projects$Locations$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudLocationLocation>, callback: BodyResponseCallback<Schema$GoogleCloudLocationLocation>): void;
|
|
2347
2409
|
get(params: Params$Resource$Projects$Locations$Get, callback: BodyResponseCallback<Schema$GoogleCloudLocationLocation>): void;
|
|
2348
2410
|
get(callback: BodyResponseCallback<Schema$GoogleCloudLocationLocation>): void;
|
|
2349
2411
|
/**
|
|
2350
2412
|
* Lists information about the supported locations for this service.
|
|
2413
|
+
* @example
|
|
2414
|
+
* ```js
|
|
2415
|
+
* // Before running the sample:
|
|
2416
|
+
* // - Enable the API at:
|
|
2417
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2418
|
+
* // - Login into gcloud by running:
|
|
2419
|
+
* // ```sh
|
|
2420
|
+
* // $ gcloud auth application-default login
|
|
2421
|
+
* // ```
|
|
2422
|
+
* // - Install the npm module by running:
|
|
2423
|
+
* // ```sh
|
|
2424
|
+
* // $ npm install googleapis
|
|
2425
|
+
* // ```
|
|
2426
|
+
*
|
|
2427
|
+
* const {google} = require('googleapis');
|
|
2428
|
+
* const alloydb = google.alloydb('v1');
|
|
2429
|
+
*
|
|
2430
|
+
* async function main() {
|
|
2431
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2432
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2433
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2434
|
+
* });
|
|
2435
|
+
*
|
|
2436
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2437
|
+
* const authClient = await auth.getClient();
|
|
2438
|
+
* google.options({auth: authClient});
|
|
2439
|
+
*
|
|
2440
|
+
* // Do the magic
|
|
2441
|
+
* const res = await alloydb.projects.locations.list({
|
|
2442
|
+
* // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
|
|
2443
|
+
* extraLocationTypes: 'placeholder-value',
|
|
2444
|
+
* // 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).
|
|
2445
|
+
* filter: 'placeholder-value',
|
|
2446
|
+
* // The resource that owns the locations collection, if applicable.
|
|
2447
|
+
* name: 'projects/my-project',
|
|
2448
|
+
* // The maximum number of results to return. If not set, the service selects a default.
|
|
2449
|
+
* pageSize: 'placeholder-value',
|
|
2450
|
+
* // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
|
|
2451
|
+
* pageToken: 'placeholder-value',
|
|
2452
|
+
* });
|
|
2453
|
+
* console.log(res.data);
|
|
2454
|
+
*
|
|
2455
|
+
* // Example response
|
|
2456
|
+
* // {
|
|
2457
|
+
* // "locations": [],
|
|
2458
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
2459
|
+
* // }
|
|
2460
|
+
* }
|
|
2461
|
+
*
|
|
2462
|
+
* main().catch(e => {
|
|
2463
|
+
* console.error(e);
|
|
2464
|
+
* throw e;
|
|
2465
|
+
* });
|
|
2466
|
+
*
|
|
2467
|
+
* ```
|
|
2351
2468
|
*
|
|
2352
2469
|
* @param params - Parameters for request
|
|
2353
2470
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2354
2471
|
* @param callback - Optional callback that handles the response.
|
|
2355
2472
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2356
2473
|
*/
|
|
2357
|
-
list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions):
|
|
2358
|
-
list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions):
|
|
2474
|
+
list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2475
|
+
list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudLocationListLocationsResponse>>;
|
|
2359
2476
|
list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2360
2477
|
list(params: Params$Resource$Projects$Locations$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudLocationListLocationsResponse>, callback: BodyResponseCallback<Schema$GoogleCloudLocationListLocationsResponse>): void;
|
|
2361
2478
|
list(params: Params$Resource$Projects$Locations$List, callback: BodyResponseCallback<Schema$GoogleCloudLocationListLocationsResponse>): void;
|
|
@@ -2394,70 +2511,427 @@ export declare namespace alloydb_v1 {
|
|
|
2394
2511
|
constructor(context: APIRequestContext);
|
|
2395
2512
|
/**
|
|
2396
2513
|
* Creates a new Backup in a given project and location.
|
|
2514
|
+
* @example
|
|
2515
|
+
* ```js
|
|
2516
|
+
* // Before running the sample:
|
|
2517
|
+
* // - Enable the API at:
|
|
2518
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2519
|
+
* // - Login into gcloud by running:
|
|
2520
|
+
* // ```sh
|
|
2521
|
+
* // $ gcloud auth application-default login
|
|
2522
|
+
* // ```
|
|
2523
|
+
* // - Install the npm module by running:
|
|
2524
|
+
* // ```sh
|
|
2525
|
+
* // $ npm install googleapis
|
|
2526
|
+
* // ```
|
|
2527
|
+
*
|
|
2528
|
+
* const {google} = require('googleapis');
|
|
2529
|
+
* const alloydb = google.alloydb('v1');
|
|
2530
|
+
*
|
|
2531
|
+
* async function main() {
|
|
2532
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2533
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2534
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2535
|
+
* });
|
|
2536
|
+
*
|
|
2537
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2538
|
+
* const authClient = await auth.getClient();
|
|
2539
|
+
* google.options({auth: authClient});
|
|
2540
|
+
*
|
|
2541
|
+
* // Do the magic
|
|
2542
|
+
* const res = await alloydb.projects.locations.backups.create({
|
|
2543
|
+
* // Required. ID of the requesting object.
|
|
2544
|
+
* backupId: 'placeholder-value',
|
|
2545
|
+
* // Required. Value for parent.
|
|
2546
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2547
|
+
* // 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).
|
|
2548
|
+
* requestId: 'placeholder-value',
|
|
2549
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2550
|
+
* validateOnly: 'placeholder-value',
|
|
2551
|
+
*
|
|
2552
|
+
* // Request body metadata
|
|
2553
|
+
* requestBody: {
|
|
2554
|
+
* // request body parameters
|
|
2555
|
+
* // {
|
|
2556
|
+
* // "annotations": {},
|
|
2557
|
+
* // "clusterName": "my_clusterName",
|
|
2558
|
+
* // "clusterUid": "my_clusterUid",
|
|
2559
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
2560
|
+
* // "createTime": "my_createTime",
|
|
2561
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
2562
|
+
* // "deleteTime": "my_deleteTime",
|
|
2563
|
+
* // "description": "my_description",
|
|
2564
|
+
* // "displayName": "my_displayName",
|
|
2565
|
+
* // "encryptionConfig": {},
|
|
2566
|
+
* // "encryptionInfo": {},
|
|
2567
|
+
* // "etag": "my_etag",
|
|
2568
|
+
* // "expiryQuantity": {},
|
|
2569
|
+
* // "expiryTime": "my_expiryTime",
|
|
2570
|
+
* // "labels": {},
|
|
2571
|
+
* // "name": "my_name",
|
|
2572
|
+
* // "reconciling": false,
|
|
2573
|
+
* // "satisfiesPzs": false,
|
|
2574
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
2575
|
+
* // "state": "my_state",
|
|
2576
|
+
* // "tags": {},
|
|
2577
|
+
* // "type": "my_type",
|
|
2578
|
+
* // "uid": "my_uid",
|
|
2579
|
+
* // "updateTime": "my_updateTime"
|
|
2580
|
+
* // }
|
|
2581
|
+
* },
|
|
2582
|
+
* });
|
|
2583
|
+
* console.log(res.data);
|
|
2584
|
+
*
|
|
2585
|
+
* // Example response
|
|
2586
|
+
* // {
|
|
2587
|
+
* // "done": false,
|
|
2588
|
+
* // "error": {},
|
|
2589
|
+
* // "metadata": {},
|
|
2590
|
+
* // "name": "my_name",
|
|
2591
|
+
* // "response": {}
|
|
2592
|
+
* // }
|
|
2593
|
+
* }
|
|
2594
|
+
*
|
|
2595
|
+
* main().catch(e => {
|
|
2596
|
+
* console.error(e);
|
|
2597
|
+
* throw e;
|
|
2598
|
+
* });
|
|
2599
|
+
*
|
|
2600
|
+
* ```
|
|
2397
2601
|
*
|
|
2398
2602
|
* @param params - Parameters for request
|
|
2399
2603
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2400
2604
|
* @param callback - Optional callback that handles the response.
|
|
2401
2605
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2402
2606
|
*/
|
|
2403
|
-
create(params: Params$Resource$Projects$Locations$Backups$Create, options: StreamMethodOptions):
|
|
2404
|
-
create(params?: Params$Resource$Projects$Locations$Backups$Create, options?: MethodOptions):
|
|
2607
|
+
create(params: Params$Resource$Projects$Locations$Backups$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2608
|
+
create(params?: Params$Resource$Projects$Locations$Backups$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2405
2609
|
create(params: Params$Resource$Projects$Locations$Backups$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2406
2610
|
create(params: Params$Resource$Projects$Locations$Backups$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2407
2611
|
create(params: Params$Resource$Projects$Locations$Backups$Create, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2408
2612
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2409
2613
|
/**
|
|
2410
2614
|
* Deletes a single Backup.
|
|
2615
|
+
* @example
|
|
2616
|
+
* ```js
|
|
2617
|
+
* // Before running the sample:
|
|
2618
|
+
* // - Enable the API at:
|
|
2619
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2620
|
+
* // - Login into gcloud by running:
|
|
2621
|
+
* // ```sh
|
|
2622
|
+
* // $ gcloud auth application-default login
|
|
2623
|
+
* // ```
|
|
2624
|
+
* // - Install the npm module by running:
|
|
2625
|
+
* // ```sh
|
|
2626
|
+
* // $ npm install googleapis
|
|
2627
|
+
* // ```
|
|
2628
|
+
*
|
|
2629
|
+
* const {google} = require('googleapis');
|
|
2630
|
+
* const alloydb = google.alloydb('v1');
|
|
2631
|
+
*
|
|
2632
|
+
* async function main() {
|
|
2633
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2634
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2635
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2636
|
+
* });
|
|
2637
|
+
*
|
|
2638
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2639
|
+
* const authClient = await auth.getClient();
|
|
2640
|
+
* google.options({auth: authClient});
|
|
2641
|
+
*
|
|
2642
|
+
* // Do the magic
|
|
2643
|
+
* const res = await alloydb.projects.locations.backups.delete({
|
|
2644
|
+
* // 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.
|
|
2645
|
+
* etag: 'placeholder-value',
|
|
2646
|
+
* // Required. Name of the resource. For the required format, see the comment on the Backup.name field.
|
|
2647
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
2648
|
+
* // 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).
|
|
2649
|
+
* requestId: 'placeholder-value',
|
|
2650
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2651
|
+
* validateOnly: 'placeholder-value',
|
|
2652
|
+
* });
|
|
2653
|
+
* console.log(res.data);
|
|
2654
|
+
*
|
|
2655
|
+
* // Example response
|
|
2656
|
+
* // {
|
|
2657
|
+
* // "done": false,
|
|
2658
|
+
* // "error": {},
|
|
2659
|
+
* // "metadata": {},
|
|
2660
|
+
* // "name": "my_name",
|
|
2661
|
+
* // "response": {}
|
|
2662
|
+
* // }
|
|
2663
|
+
* }
|
|
2664
|
+
*
|
|
2665
|
+
* main().catch(e => {
|
|
2666
|
+
* console.error(e);
|
|
2667
|
+
* throw e;
|
|
2668
|
+
* });
|
|
2669
|
+
*
|
|
2670
|
+
* ```
|
|
2411
2671
|
*
|
|
2412
2672
|
* @param params - Parameters for request
|
|
2413
2673
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2414
2674
|
* @param callback - Optional callback that handles the response.
|
|
2415
2675
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2416
2676
|
*/
|
|
2417
|
-
delete(params: Params$Resource$Projects$Locations$Backups$Delete, options: StreamMethodOptions):
|
|
2418
|
-
delete(params?: Params$Resource$Projects$Locations$Backups$Delete, options?: MethodOptions):
|
|
2677
|
+
delete(params: Params$Resource$Projects$Locations$Backups$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2678
|
+
delete(params?: Params$Resource$Projects$Locations$Backups$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2419
2679
|
delete(params: Params$Resource$Projects$Locations$Backups$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2420
2680
|
delete(params: Params$Resource$Projects$Locations$Backups$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2421
2681
|
delete(params: Params$Resource$Projects$Locations$Backups$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2422
2682
|
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2423
2683
|
/**
|
|
2424
2684
|
* Gets details of a single Backup.
|
|
2685
|
+
* @example
|
|
2686
|
+
* ```js
|
|
2687
|
+
* // Before running the sample:
|
|
2688
|
+
* // - Enable the API at:
|
|
2689
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2690
|
+
* // - Login into gcloud by running:
|
|
2691
|
+
* // ```sh
|
|
2692
|
+
* // $ gcloud auth application-default login
|
|
2693
|
+
* // ```
|
|
2694
|
+
* // - Install the npm module by running:
|
|
2695
|
+
* // ```sh
|
|
2696
|
+
* // $ npm install googleapis
|
|
2697
|
+
* // ```
|
|
2698
|
+
*
|
|
2699
|
+
* const {google} = require('googleapis');
|
|
2700
|
+
* const alloydb = google.alloydb('v1');
|
|
2701
|
+
*
|
|
2702
|
+
* async function main() {
|
|
2703
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2704
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2705
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2706
|
+
* });
|
|
2707
|
+
*
|
|
2708
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2709
|
+
* const authClient = await auth.getClient();
|
|
2710
|
+
* google.options({auth: authClient});
|
|
2711
|
+
*
|
|
2712
|
+
* // Do the magic
|
|
2713
|
+
* const res = await alloydb.projects.locations.backups.get({
|
|
2714
|
+
* // Required. Name of the resource
|
|
2715
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
2716
|
+
* });
|
|
2717
|
+
* console.log(res.data);
|
|
2718
|
+
*
|
|
2719
|
+
* // Example response
|
|
2720
|
+
* // {
|
|
2721
|
+
* // "annotations": {},
|
|
2722
|
+
* // "clusterName": "my_clusterName",
|
|
2723
|
+
* // "clusterUid": "my_clusterUid",
|
|
2724
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
2725
|
+
* // "createTime": "my_createTime",
|
|
2726
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
2727
|
+
* // "deleteTime": "my_deleteTime",
|
|
2728
|
+
* // "description": "my_description",
|
|
2729
|
+
* // "displayName": "my_displayName",
|
|
2730
|
+
* // "encryptionConfig": {},
|
|
2731
|
+
* // "encryptionInfo": {},
|
|
2732
|
+
* // "etag": "my_etag",
|
|
2733
|
+
* // "expiryQuantity": {},
|
|
2734
|
+
* // "expiryTime": "my_expiryTime",
|
|
2735
|
+
* // "labels": {},
|
|
2736
|
+
* // "name": "my_name",
|
|
2737
|
+
* // "reconciling": false,
|
|
2738
|
+
* // "satisfiesPzs": false,
|
|
2739
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
2740
|
+
* // "state": "my_state",
|
|
2741
|
+
* // "tags": {},
|
|
2742
|
+
* // "type": "my_type",
|
|
2743
|
+
* // "uid": "my_uid",
|
|
2744
|
+
* // "updateTime": "my_updateTime"
|
|
2745
|
+
* // }
|
|
2746
|
+
* }
|
|
2747
|
+
*
|
|
2748
|
+
* main().catch(e => {
|
|
2749
|
+
* console.error(e);
|
|
2750
|
+
* throw e;
|
|
2751
|
+
* });
|
|
2752
|
+
*
|
|
2753
|
+
* ```
|
|
2425
2754
|
*
|
|
2426
2755
|
* @param params - Parameters for request
|
|
2427
2756
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2428
2757
|
* @param callback - Optional callback that handles the response.
|
|
2429
2758
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2430
2759
|
*/
|
|
2431
|
-
get(params: Params$Resource$Projects$Locations$Backups$Get, options: StreamMethodOptions):
|
|
2432
|
-
get(params?: Params$Resource$Projects$Locations$Backups$Get, options?: MethodOptions):
|
|
2760
|
+
get(params: Params$Resource$Projects$Locations$Backups$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2761
|
+
get(params?: Params$Resource$Projects$Locations$Backups$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Backup>>;
|
|
2433
2762
|
get(params: Params$Resource$Projects$Locations$Backups$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2434
2763
|
get(params: Params$Resource$Projects$Locations$Backups$Get, options: MethodOptions | BodyResponseCallback<Schema$Backup>, callback: BodyResponseCallback<Schema$Backup>): void;
|
|
2435
2764
|
get(params: Params$Resource$Projects$Locations$Backups$Get, callback: BodyResponseCallback<Schema$Backup>): void;
|
|
2436
2765
|
get(callback: BodyResponseCallback<Schema$Backup>): void;
|
|
2437
2766
|
/**
|
|
2438
2767
|
* Lists Backups in a given project and location.
|
|
2768
|
+
* @example
|
|
2769
|
+
* ```js
|
|
2770
|
+
* // Before running the sample:
|
|
2771
|
+
* // - Enable the API at:
|
|
2772
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2773
|
+
* // - Login into gcloud by running:
|
|
2774
|
+
* // ```sh
|
|
2775
|
+
* // $ gcloud auth application-default login
|
|
2776
|
+
* // ```
|
|
2777
|
+
* // - Install the npm module by running:
|
|
2778
|
+
* // ```sh
|
|
2779
|
+
* // $ npm install googleapis
|
|
2780
|
+
* // ```
|
|
2781
|
+
*
|
|
2782
|
+
* const {google} = require('googleapis');
|
|
2783
|
+
* const alloydb = google.alloydb('v1');
|
|
2784
|
+
*
|
|
2785
|
+
* async function main() {
|
|
2786
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2787
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2788
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2789
|
+
* });
|
|
2790
|
+
*
|
|
2791
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2792
|
+
* const authClient = await auth.getClient();
|
|
2793
|
+
* google.options({auth: authClient});
|
|
2794
|
+
*
|
|
2795
|
+
* // Do the magic
|
|
2796
|
+
* const res = await alloydb.projects.locations.backups.list({
|
|
2797
|
+
* // Filtering results
|
|
2798
|
+
* filter: 'placeholder-value',
|
|
2799
|
+
* // Hint for how to order the results
|
|
2800
|
+
* orderBy: 'placeholder-value',
|
|
2801
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
2802
|
+
* pageSize: 'placeholder-value',
|
|
2803
|
+
* // A token identifying a page of results the server should return.
|
|
2804
|
+
* pageToken: 'placeholder-value',
|
|
2805
|
+
* // Required. Parent value for ListBackupsRequest
|
|
2806
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
2807
|
+
* });
|
|
2808
|
+
* console.log(res.data);
|
|
2809
|
+
*
|
|
2810
|
+
* // Example response
|
|
2811
|
+
* // {
|
|
2812
|
+
* // "backups": [],
|
|
2813
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
2814
|
+
* // "unreachable": []
|
|
2815
|
+
* // }
|
|
2816
|
+
* }
|
|
2817
|
+
*
|
|
2818
|
+
* main().catch(e => {
|
|
2819
|
+
* console.error(e);
|
|
2820
|
+
* throw e;
|
|
2821
|
+
* });
|
|
2822
|
+
*
|
|
2823
|
+
* ```
|
|
2439
2824
|
*
|
|
2440
2825
|
* @param params - Parameters for request
|
|
2441
2826
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2442
2827
|
* @param callback - Optional callback that handles the response.
|
|
2443
2828
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2444
2829
|
*/
|
|
2445
|
-
list(params: Params$Resource$Projects$Locations$Backups$List, options: StreamMethodOptions):
|
|
2446
|
-
list(params?: Params$Resource$Projects$Locations$Backups$List, options?: MethodOptions):
|
|
2830
|
+
list(params: Params$Resource$Projects$Locations$Backups$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2831
|
+
list(params?: Params$Resource$Projects$Locations$Backups$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListBackupsResponse>>;
|
|
2447
2832
|
list(params: Params$Resource$Projects$Locations$Backups$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2448
2833
|
list(params: Params$Resource$Projects$Locations$Backups$List, options: MethodOptions | BodyResponseCallback<Schema$ListBackupsResponse>, callback: BodyResponseCallback<Schema$ListBackupsResponse>): void;
|
|
2449
2834
|
list(params: Params$Resource$Projects$Locations$Backups$List, callback: BodyResponseCallback<Schema$ListBackupsResponse>): void;
|
|
2450
2835
|
list(callback: BodyResponseCallback<Schema$ListBackupsResponse>): void;
|
|
2451
2836
|
/**
|
|
2452
2837
|
* Updates the parameters of a single Backup.
|
|
2838
|
+
* @example
|
|
2839
|
+
* ```js
|
|
2840
|
+
* // Before running the sample:
|
|
2841
|
+
* // - Enable the API at:
|
|
2842
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
2843
|
+
* // - Login into gcloud by running:
|
|
2844
|
+
* // ```sh
|
|
2845
|
+
* // $ gcloud auth application-default login
|
|
2846
|
+
* // ```
|
|
2847
|
+
* // - Install the npm module by running:
|
|
2848
|
+
* // ```sh
|
|
2849
|
+
* // $ npm install googleapis
|
|
2850
|
+
* // ```
|
|
2851
|
+
*
|
|
2852
|
+
* const {google} = require('googleapis');
|
|
2853
|
+
* const alloydb = google.alloydb('v1');
|
|
2854
|
+
*
|
|
2855
|
+
* async function main() {
|
|
2856
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2857
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2858
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
2859
|
+
* });
|
|
2860
|
+
*
|
|
2861
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2862
|
+
* const authClient = await auth.getClient();
|
|
2863
|
+
* google.options({auth: authClient});
|
|
2864
|
+
*
|
|
2865
|
+
* // Do the magic
|
|
2866
|
+
* const res = await alloydb.projects.locations.backups.patch({
|
|
2867
|
+
* // 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.
|
|
2868
|
+
* allowMissing: 'placeholder-value',
|
|
2869
|
+
* // 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\}
|
|
2870
|
+
* name: 'projects/my-project/locations/my-location/backups/my-backup',
|
|
2871
|
+
* // 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).
|
|
2872
|
+
* requestId: 'placeholder-value',
|
|
2873
|
+
* // 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.
|
|
2874
|
+
* updateMask: 'placeholder-value',
|
|
2875
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
2876
|
+
* validateOnly: 'placeholder-value',
|
|
2877
|
+
*
|
|
2878
|
+
* // Request body metadata
|
|
2879
|
+
* requestBody: {
|
|
2880
|
+
* // request body parameters
|
|
2881
|
+
* // {
|
|
2882
|
+
* // "annotations": {},
|
|
2883
|
+
* // "clusterName": "my_clusterName",
|
|
2884
|
+
* // "clusterUid": "my_clusterUid",
|
|
2885
|
+
* // "createCompletionTime": "my_createCompletionTime",
|
|
2886
|
+
* // "createTime": "my_createTime",
|
|
2887
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
2888
|
+
* // "deleteTime": "my_deleteTime",
|
|
2889
|
+
* // "description": "my_description",
|
|
2890
|
+
* // "displayName": "my_displayName",
|
|
2891
|
+
* // "encryptionConfig": {},
|
|
2892
|
+
* // "encryptionInfo": {},
|
|
2893
|
+
* // "etag": "my_etag",
|
|
2894
|
+
* // "expiryQuantity": {},
|
|
2895
|
+
* // "expiryTime": "my_expiryTime",
|
|
2896
|
+
* // "labels": {},
|
|
2897
|
+
* // "name": "my_name",
|
|
2898
|
+
* // "reconciling": false,
|
|
2899
|
+
* // "satisfiesPzs": false,
|
|
2900
|
+
* // "sizeBytes": "my_sizeBytes",
|
|
2901
|
+
* // "state": "my_state",
|
|
2902
|
+
* // "tags": {},
|
|
2903
|
+
* // "type": "my_type",
|
|
2904
|
+
* // "uid": "my_uid",
|
|
2905
|
+
* // "updateTime": "my_updateTime"
|
|
2906
|
+
* // }
|
|
2907
|
+
* },
|
|
2908
|
+
* });
|
|
2909
|
+
* console.log(res.data);
|
|
2910
|
+
*
|
|
2911
|
+
* // Example response
|
|
2912
|
+
* // {
|
|
2913
|
+
* // "done": false,
|
|
2914
|
+
* // "error": {},
|
|
2915
|
+
* // "metadata": {},
|
|
2916
|
+
* // "name": "my_name",
|
|
2917
|
+
* // "response": {}
|
|
2918
|
+
* // }
|
|
2919
|
+
* }
|
|
2920
|
+
*
|
|
2921
|
+
* main().catch(e => {
|
|
2922
|
+
* console.error(e);
|
|
2923
|
+
* throw e;
|
|
2924
|
+
* });
|
|
2925
|
+
*
|
|
2926
|
+
* ```
|
|
2453
2927
|
*
|
|
2454
2928
|
* @param params - Parameters for request
|
|
2455
2929
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2456
2930
|
* @param callback - Optional callback that handles the response.
|
|
2457
2931
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2458
2932
|
*/
|
|
2459
|
-
patch(params: Params$Resource$Projects$Locations$Backups$Patch, options: StreamMethodOptions):
|
|
2460
|
-
patch(params?: Params$Resource$Projects$Locations$Backups$Patch, options?: MethodOptions):
|
|
2933
|
+
patch(params: Params$Resource$Projects$Locations$Backups$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2934
|
+
patch(params?: Params$Resource$Projects$Locations$Backups$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2461
2935
|
patch(params: Params$Resource$Projects$Locations$Backups$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2462
2936
|
patch(params: Params$Resource$Projects$Locations$Backups$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2463
2937
|
patch(params: Params$Resource$Projects$Locations$Backups$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
@@ -2564,182 +3038,1096 @@ export declare namespace alloydb_v1 {
|
|
|
2564
3038
|
constructor(context: APIRequestContext);
|
|
2565
3039
|
/**
|
|
2566
3040
|
* Creates a new Cluster in a given project and location.
|
|
3041
|
+
* @example
|
|
3042
|
+
* ```js
|
|
3043
|
+
* // Before running the sample:
|
|
3044
|
+
* // - Enable the API at:
|
|
3045
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3046
|
+
* // - Login into gcloud by running:
|
|
3047
|
+
* // ```sh
|
|
3048
|
+
* // $ gcloud auth application-default login
|
|
3049
|
+
* // ```
|
|
3050
|
+
* // - Install the npm module by running:
|
|
3051
|
+
* // ```sh
|
|
3052
|
+
* // $ npm install googleapis
|
|
3053
|
+
* // ```
|
|
3054
|
+
*
|
|
3055
|
+
* const {google} = require('googleapis');
|
|
3056
|
+
* const alloydb = google.alloydb('v1');
|
|
3057
|
+
*
|
|
3058
|
+
* async function main() {
|
|
3059
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3060
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3061
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3062
|
+
* });
|
|
3063
|
+
*
|
|
3064
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3065
|
+
* const authClient = await auth.getClient();
|
|
3066
|
+
* google.options({auth: authClient});
|
|
3067
|
+
*
|
|
3068
|
+
* // Do the magic
|
|
3069
|
+
* const res = await alloydb.projects.locations.clusters.create({
|
|
3070
|
+
* // Required. ID of the requesting object.
|
|
3071
|
+
* clusterId: 'placeholder-value',
|
|
3072
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3073
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3074
|
+
* // 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).
|
|
3075
|
+
* requestId: 'placeholder-value',
|
|
3076
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3077
|
+
* validateOnly: 'placeholder-value',
|
|
3078
|
+
*
|
|
3079
|
+
* // Request body metadata
|
|
3080
|
+
* requestBody: {
|
|
3081
|
+
* // request body parameters
|
|
3082
|
+
* // {
|
|
3083
|
+
* // "annotations": {},
|
|
3084
|
+
* // "automatedBackupPolicy": {},
|
|
3085
|
+
* // "backupSource": {},
|
|
3086
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3087
|
+
* // "clusterType": "my_clusterType",
|
|
3088
|
+
* // "continuousBackupConfig": {},
|
|
3089
|
+
* // "continuousBackupInfo": {},
|
|
3090
|
+
* // "createTime": "my_createTime",
|
|
3091
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3092
|
+
* // "deleteTime": "my_deleteTime",
|
|
3093
|
+
* // "displayName": "my_displayName",
|
|
3094
|
+
* // "encryptionConfig": {},
|
|
3095
|
+
* // "encryptionInfo": {},
|
|
3096
|
+
* // "etag": "my_etag",
|
|
3097
|
+
* // "initialUser": {},
|
|
3098
|
+
* // "labels": {},
|
|
3099
|
+
* // "maintenanceSchedule": {},
|
|
3100
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3101
|
+
* // "migrationSource": {},
|
|
3102
|
+
* // "name": "my_name",
|
|
3103
|
+
* // "network": "my_network",
|
|
3104
|
+
* // "networkConfig": {},
|
|
3105
|
+
* // "primaryConfig": {},
|
|
3106
|
+
* // "pscConfig": {},
|
|
3107
|
+
* // "reconciling": false,
|
|
3108
|
+
* // "satisfiesPzs": false,
|
|
3109
|
+
* // "secondaryConfig": {},
|
|
3110
|
+
* // "sslConfig": {},
|
|
3111
|
+
* // "state": "my_state",
|
|
3112
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3113
|
+
* // "tags": {},
|
|
3114
|
+
* // "trialMetadata": {},
|
|
3115
|
+
* // "uid": "my_uid",
|
|
3116
|
+
* // "updateTime": "my_updateTime"
|
|
3117
|
+
* // }
|
|
3118
|
+
* },
|
|
3119
|
+
* });
|
|
3120
|
+
* console.log(res.data);
|
|
3121
|
+
*
|
|
3122
|
+
* // Example response
|
|
3123
|
+
* // {
|
|
3124
|
+
* // "done": false,
|
|
3125
|
+
* // "error": {},
|
|
3126
|
+
* // "metadata": {},
|
|
3127
|
+
* // "name": "my_name",
|
|
3128
|
+
* // "response": {}
|
|
3129
|
+
* // }
|
|
3130
|
+
* }
|
|
3131
|
+
*
|
|
3132
|
+
* main().catch(e => {
|
|
3133
|
+
* console.error(e);
|
|
3134
|
+
* throw e;
|
|
3135
|
+
* });
|
|
3136
|
+
*
|
|
3137
|
+
* ```
|
|
2567
3138
|
*
|
|
2568
3139
|
* @param params - Parameters for request
|
|
2569
3140
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2570
3141
|
* @param callback - Optional callback that handles the response.
|
|
2571
3142
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2572
3143
|
*/
|
|
2573
|
-
create(params: Params$Resource$Projects$Locations$Clusters$Create, options: StreamMethodOptions):
|
|
2574
|
-
create(params?: Params$Resource$Projects$Locations$Clusters$Create, options?: MethodOptions):
|
|
3144
|
+
create(params: Params$Resource$Projects$Locations$Clusters$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3145
|
+
create(params?: Params$Resource$Projects$Locations$Clusters$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2575
3146
|
create(params: Params$Resource$Projects$Locations$Clusters$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2576
3147
|
create(params: Params$Resource$Projects$Locations$Clusters$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2577
3148
|
create(params: Params$Resource$Projects$Locations$Clusters$Create, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2578
3149
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2579
3150
|
/**
|
|
2580
3151
|
* Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
|
|
3152
|
+
* @example
|
|
3153
|
+
* ```js
|
|
3154
|
+
* // Before running the sample:
|
|
3155
|
+
* // - Enable the API at:
|
|
3156
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3157
|
+
* // - Login into gcloud by running:
|
|
3158
|
+
* // ```sh
|
|
3159
|
+
* // $ gcloud auth application-default login
|
|
3160
|
+
* // ```
|
|
3161
|
+
* // - Install the npm module by running:
|
|
3162
|
+
* // ```sh
|
|
3163
|
+
* // $ npm install googleapis
|
|
3164
|
+
* // ```
|
|
3165
|
+
*
|
|
3166
|
+
* const {google} = require('googleapis');
|
|
3167
|
+
* const alloydb = google.alloydb('v1');
|
|
3168
|
+
*
|
|
3169
|
+
* async function main() {
|
|
3170
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3171
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3172
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3173
|
+
* });
|
|
3174
|
+
*
|
|
3175
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3176
|
+
* const authClient = await auth.getClient();
|
|
3177
|
+
* google.options({auth: authClient});
|
|
3178
|
+
*
|
|
3179
|
+
* // Do the magic
|
|
3180
|
+
* const res = await alloydb.projects.locations.clusters.createsecondary({
|
|
3181
|
+
* // Required. ID of the requesting object (the secondary cluster).
|
|
3182
|
+
* clusterId: 'placeholder-value',
|
|
3183
|
+
* // Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.
|
|
3184
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3185
|
+
* // 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).
|
|
3186
|
+
* requestId: 'placeholder-value',
|
|
3187
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3188
|
+
* validateOnly: 'placeholder-value',
|
|
3189
|
+
*
|
|
3190
|
+
* // Request body metadata
|
|
3191
|
+
* requestBody: {
|
|
3192
|
+
* // request body parameters
|
|
3193
|
+
* // {
|
|
3194
|
+
* // "annotations": {},
|
|
3195
|
+
* // "automatedBackupPolicy": {},
|
|
3196
|
+
* // "backupSource": {},
|
|
3197
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3198
|
+
* // "clusterType": "my_clusterType",
|
|
3199
|
+
* // "continuousBackupConfig": {},
|
|
3200
|
+
* // "continuousBackupInfo": {},
|
|
3201
|
+
* // "createTime": "my_createTime",
|
|
3202
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3203
|
+
* // "deleteTime": "my_deleteTime",
|
|
3204
|
+
* // "displayName": "my_displayName",
|
|
3205
|
+
* // "encryptionConfig": {},
|
|
3206
|
+
* // "encryptionInfo": {},
|
|
3207
|
+
* // "etag": "my_etag",
|
|
3208
|
+
* // "initialUser": {},
|
|
3209
|
+
* // "labels": {},
|
|
3210
|
+
* // "maintenanceSchedule": {},
|
|
3211
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3212
|
+
* // "migrationSource": {},
|
|
3213
|
+
* // "name": "my_name",
|
|
3214
|
+
* // "network": "my_network",
|
|
3215
|
+
* // "networkConfig": {},
|
|
3216
|
+
* // "primaryConfig": {},
|
|
3217
|
+
* // "pscConfig": {},
|
|
3218
|
+
* // "reconciling": false,
|
|
3219
|
+
* // "satisfiesPzs": false,
|
|
3220
|
+
* // "secondaryConfig": {},
|
|
3221
|
+
* // "sslConfig": {},
|
|
3222
|
+
* // "state": "my_state",
|
|
3223
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3224
|
+
* // "tags": {},
|
|
3225
|
+
* // "trialMetadata": {},
|
|
3226
|
+
* // "uid": "my_uid",
|
|
3227
|
+
* // "updateTime": "my_updateTime"
|
|
3228
|
+
* // }
|
|
3229
|
+
* },
|
|
3230
|
+
* });
|
|
3231
|
+
* console.log(res.data);
|
|
3232
|
+
*
|
|
3233
|
+
* // Example response
|
|
3234
|
+
* // {
|
|
3235
|
+
* // "done": false,
|
|
3236
|
+
* // "error": {},
|
|
3237
|
+
* // "metadata": {},
|
|
3238
|
+
* // "name": "my_name",
|
|
3239
|
+
* // "response": {}
|
|
3240
|
+
* // }
|
|
3241
|
+
* }
|
|
3242
|
+
*
|
|
3243
|
+
* main().catch(e => {
|
|
3244
|
+
* console.error(e);
|
|
3245
|
+
* throw e;
|
|
3246
|
+
* });
|
|
3247
|
+
*
|
|
3248
|
+
* ```
|
|
2581
3249
|
*
|
|
2582
3250
|
* @param params - Parameters for request
|
|
2583
3251
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2584
3252
|
* @param callback - Optional callback that handles the response.
|
|
2585
3253
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2586
3254
|
*/
|
|
2587
|
-
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Createsecondary, options: StreamMethodOptions):
|
|
2588
|
-
createsecondary(params?: Params$Resource$Projects$Locations$Clusters$Createsecondary, options?: MethodOptions):
|
|
3255
|
+
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Createsecondary, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3256
|
+
createsecondary(params?: Params$Resource$Projects$Locations$Clusters$Createsecondary, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2589
3257
|
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Createsecondary, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2590
3258
|
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Createsecondary, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2591
3259
|
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Createsecondary, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2592
3260
|
createsecondary(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2593
3261
|
/**
|
|
2594
3262
|
* Deletes a single Cluster.
|
|
3263
|
+
* @example
|
|
3264
|
+
* ```js
|
|
3265
|
+
* // Before running the sample:
|
|
3266
|
+
* // - Enable the API at:
|
|
3267
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3268
|
+
* // - Login into gcloud by running:
|
|
3269
|
+
* // ```sh
|
|
3270
|
+
* // $ gcloud auth application-default login
|
|
3271
|
+
* // ```
|
|
3272
|
+
* // - Install the npm module by running:
|
|
3273
|
+
* // ```sh
|
|
3274
|
+
* // $ npm install googleapis
|
|
3275
|
+
* // ```
|
|
3276
|
+
*
|
|
3277
|
+
* const {google} = require('googleapis');
|
|
3278
|
+
* const alloydb = google.alloydb('v1');
|
|
3279
|
+
*
|
|
3280
|
+
* async function main() {
|
|
3281
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3282
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3283
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3284
|
+
* });
|
|
3285
|
+
*
|
|
3286
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3287
|
+
* const authClient = await auth.getClient();
|
|
3288
|
+
* google.options({auth: authClient});
|
|
3289
|
+
*
|
|
3290
|
+
* // Do the magic
|
|
3291
|
+
* const res = await alloydb.projects.locations.clusters.delete({
|
|
3292
|
+
* // 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.
|
|
3293
|
+
* etag: 'placeholder-value',
|
|
3294
|
+
* // Optional. Whether to cascade delete child instances for given cluster.
|
|
3295
|
+
* force: 'placeholder-value',
|
|
3296
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
3297
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
3298
|
+
* // 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).
|
|
3299
|
+
* requestId: 'placeholder-value',
|
|
3300
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3301
|
+
* validateOnly: 'placeholder-value',
|
|
3302
|
+
* });
|
|
3303
|
+
* console.log(res.data);
|
|
3304
|
+
*
|
|
3305
|
+
* // Example response
|
|
3306
|
+
* // {
|
|
3307
|
+
* // "done": false,
|
|
3308
|
+
* // "error": {},
|
|
3309
|
+
* // "metadata": {},
|
|
3310
|
+
* // "name": "my_name",
|
|
3311
|
+
* // "response": {}
|
|
3312
|
+
* // }
|
|
3313
|
+
* }
|
|
3314
|
+
*
|
|
3315
|
+
* main().catch(e => {
|
|
3316
|
+
* console.error(e);
|
|
3317
|
+
* throw e;
|
|
3318
|
+
* });
|
|
3319
|
+
*
|
|
3320
|
+
* ```
|
|
2595
3321
|
*
|
|
2596
3322
|
* @param params - Parameters for request
|
|
2597
3323
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2598
3324
|
* @param callback - Optional callback that handles the response.
|
|
2599
3325
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2600
3326
|
*/
|
|
2601
|
-
delete(params: Params$Resource$Projects$Locations$Clusters$Delete, options: StreamMethodOptions):
|
|
2602
|
-
delete(params?: Params$Resource$Projects$Locations$Clusters$Delete, options?: MethodOptions):
|
|
3327
|
+
delete(params: Params$Resource$Projects$Locations$Clusters$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3328
|
+
delete(params?: Params$Resource$Projects$Locations$Clusters$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2603
3329
|
delete(params: Params$Resource$Projects$Locations$Clusters$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2604
3330
|
delete(params: Params$Resource$Projects$Locations$Clusters$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2605
3331
|
delete(params: Params$Resource$Projects$Locations$Clusters$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2606
3332
|
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2607
3333
|
/**
|
|
2608
3334
|
* Exports data from the cluster. Imperative only.
|
|
3335
|
+
* @example
|
|
3336
|
+
* ```js
|
|
3337
|
+
* // Before running the sample:
|
|
3338
|
+
* // - Enable the API at:
|
|
3339
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3340
|
+
* // - Login into gcloud by running:
|
|
3341
|
+
* // ```sh
|
|
3342
|
+
* // $ gcloud auth application-default login
|
|
3343
|
+
* // ```
|
|
3344
|
+
* // - Install the npm module by running:
|
|
3345
|
+
* // ```sh
|
|
3346
|
+
* // $ npm install googleapis
|
|
3347
|
+
* // ```
|
|
3348
|
+
*
|
|
3349
|
+
* const {google} = require('googleapis');
|
|
3350
|
+
* const alloydb = google.alloydb('v1');
|
|
3351
|
+
*
|
|
3352
|
+
* async function main() {
|
|
3353
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3354
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3355
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3356
|
+
* });
|
|
3357
|
+
*
|
|
3358
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3359
|
+
* const authClient = await auth.getClient();
|
|
3360
|
+
* google.options({auth: authClient});
|
|
3361
|
+
*
|
|
3362
|
+
* // Do the magic
|
|
3363
|
+
* const res = await alloydb.projects.locations.clusters.export({
|
|
3364
|
+
* // Required. The resource name of the cluster.
|
|
3365
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
3366
|
+
*
|
|
3367
|
+
* // Request body metadata
|
|
3368
|
+
* requestBody: {
|
|
3369
|
+
* // request body parameters
|
|
3370
|
+
* // {
|
|
3371
|
+
* // "csvExportOptions": {},
|
|
3372
|
+
* // "database": "my_database",
|
|
3373
|
+
* // "gcsDestination": {},
|
|
3374
|
+
* // "sqlExportOptions": {}
|
|
3375
|
+
* // }
|
|
3376
|
+
* },
|
|
3377
|
+
* });
|
|
3378
|
+
* console.log(res.data);
|
|
3379
|
+
*
|
|
3380
|
+
* // Example response
|
|
3381
|
+
* // {
|
|
3382
|
+
* // "done": false,
|
|
3383
|
+
* // "error": {},
|
|
3384
|
+
* // "metadata": {},
|
|
3385
|
+
* // "name": "my_name",
|
|
3386
|
+
* // "response": {}
|
|
3387
|
+
* // }
|
|
3388
|
+
* }
|
|
3389
|
+
*
|
|
3390
|
+
* main().catch(e => {
|
|
3391
|
+
* console.error(e);
|
|
3392
|
+
* throw e;
|
|
3393
|
+
* });
|
|
3394
|
+
*
|
|
3395
|
+
* ```
|
|
2609
3396
|
*
|
|
2610
3397
|
* @param params - Parameters for request
|
|
2611
3398
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2612
3399
|
* @param callback - Optional callback that handles the response.
|
|
2613
3400
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2614
3401
|
*/
|
|
2615
|
-
export(params: Params$Resource$Projects$Locations$Clusters$Export, options: StreamMethodOptions):
|
|
2616
|
-
export(params?: Params$Resource$Projects$Locations$Clusters$Export, options?: MethodOptions):
|
|
3402
|
+
export(params: Params$Resource$Projects$Locations$Clusters$Export, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3403
|
+
export(params?: Params$Resource$Projects$Locations$Clusters$Export, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2617
3404
|
export(params: Params$Resource$Projects$Locations$Clusters$Export, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2618
3405
|
export(params: Params$Resource$Projects$Locations$Clusters$Export, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2619
3406
|
export(params: Params$Resource$Projects$Locations$Clusters$Export, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2620
3407
|
export(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2621
3408
|
/**
|
|
2622
3409
|
* Gets details of a single Cluster.
|
|
3410
|
+
* @example
|
|
3411
|
+
* ```js
|
|
3412
|
+
* // Before running the sample:
|
|
3413
|
+
* // - Enable the API at:
|
|
3414
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3415
|
+
* // - Login into gcloud by running:
|
|
3416
|
+
* // ```sh
|
|
3417
|
+
* // $ gcloud auth application-default login
|
|
3418
|
+
* // ```
|
|
3419
|
+
* // - Install the npm module by running:
|
|
3420
|
+
* // ```sh
|
|
3421
|
+
* // $ npm install googleapis
|
|
3422
|
+
* // ```
|
|
3423
|
+
*
|
|
3424
|
+
* const {google} = require('googleapis');
|
|
3425
|
+
* const alloydb = google.alloydb('v1');
|
|
3426
|
+
*
|
|
3427
|
+
* async function main() {
|
|
3428
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3429
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3430
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3431
|
+
* });
|
|
3432
|
+
*
|
|
3433
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3434
|
+
* const authClient = await auth.getClient();
|
|
3435
|
+
* google.options({auth: authClient});
|
|
3436
|
+
*
|
|
3437
|
+
* // Do the magic
|
|
3438
|
+
* const res = await alloydb.projects.locations.clusters.get({
|
|
3439
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field.
|
|
3440
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
3441
|
+
* // Optional. The view of the cluster to return. Returns all default fields if not set.
|
|
3442
|
+
* view: 'placeholder-value',
|
|
3443
|
+
* });
|
|
3444
|
+
* console.log(res.data);
|
|
3445
|
+
*
|
|
3446
|
+
* // Example response
|
|
3447
|
+
* // {
|
|
3448
|
+
* // "annotations": {},
|
|
3449
|
+
* // "automatedBackupPolicy": {},
|
|
3450
|
+
* // "backupSource": {},
|
|
3451
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3452
|
+
* // "clusterType": "my_clusterType",
|
|
3453
|
+
* // "continuousBackupConfig": {},
|
|
3454
|
+
* // "continuousBackupInfo": {},
|
|
3455
|
+
* // "createTime": "my_createTime",
|
|
3456
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3457
|
+
* // "deleteTime": "my_deleteTime",
|
|
3458
|
+
* // "displayName": "my_displayName",
|
|
3459
|
+
* // "encryptionConfig": {},
|
|
3460
|
+
* // "encryptionInfo": {},
|
|
3461
|
+
* // "etag": "my_etag",
|
|
3462
|
+
* // "initialUser": {},
|
|
3463
|
+
* // "labels": {},
|
|
3464
|
+
* // "maintenanceSchedule": {},
|
|
3465
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3466
|
+
* // "migrationSource": {},
|
|
3467
|
+
* // "name": "my_name",
|
|
3468
|
+
* // "network": "my_network",
|
|
3469
|
+
* // "networkConfig": {},
|
|
3470
|
+
* // "primaryConfig": {},
|
|
3471
|
+
* // "pscConfig": {},
|
|
3472
|
+
* // "reconciling": false,
|
|
3473
|
+
* // "satisfiesPzs": false,
|
|
3474
|
+
* // "secondaryConfig": {},
|
|
3475
|
+
* // "sslConfig": {},
|
|
3476
|
+
* // "state": "my_state",
|
|
3477
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3478
|
+
* // "tags": {},
|
|
3479
|
+
* // "trialMetadata": {},
|
|
3480
|
+
* // "uid": "my_uid",
|
|
3481
|
+
* // "updateTime": "my_updateTime"
|
|
3482
|
+
* // }
|
|
3483
|
+
* }
|
|
3484
|
+
*
|
|
3485
|
+
* main().catch(e => {
|
|
3486
|
+
* console.error(e);
|
|
3487
|
+
* throw e;
|
|
3488
|
+
* });
|
|
3489
|
+
*
|
|
3490
|
+
* ```
|
|
2623
3491
|
*
|
|
2624
3492
|
* @param params - Parameters for request
|
|
2625
3493
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2626
3494
|
* @param callback - Optional callback that handles the response.
|
|
2627
3495
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2628
3496
|
*/
|
|
2629
|
-
get(params: Params$Resource$Projects$Locations$Clusters$Get, options: StreamMethodOptions):
|
|
2630
|
-
get(params?: Params$Resource$Projects$Locations$Clusters$Get, options?: MethodOptions):
|
|
3497
|
+
get(params: Params$Resource$Projects$Locations$Clusters$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3498
|
+
get(params?: Params$Resource$Projects$Locations$Clusters$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Cluster>>;
|
|
2631
3499
|
get(params: Params$Resource$Projects$Locations$Clusters$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2632
3500
|
get(params: Params$Resource$Projects$Locations$Clusters$Get, options: MethodOptions | BodyResponseCallback<Schema$Cluster>, callback: BodyResponseCallback<Schema$Cluster>): void;
|
|
2633
3501
|
get(params: Params$Resource$Projects$Locations$Clusters$Get, callback: BodyResponseCallback<Schema$Cluster>): void;
|
|
2634
3502
|
get(callback: BodyResponseCallback<Schema$Cluster>): void;
|
|
2635
3503
|
/**
|
|
2636
3504
|
* Imports data to the cluster. Imperative only.
|
|
3505
|
+
* @example
|
|
3506
|
+
* ```js
|
|
3507
|
+
* // Before running the sample:
|
|
3508
|
+
* // - Enable the API at:
|
|
3509
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3510
|
+
* // - Login into gcloud by running:
|
|
3511
|
+
* // ```sh
|
|
3512
|
+
* // $ gcloud auth application-default login
|
|
3513
|
+
* // ```
|
|
3514
|
+
* // - Install the npm module by running:
|
|
3515
|
+
* // ```sh
|
|
3516
|
+
* // $ npm install googleapis
|
|
3517
|
+
* // ```
|
|
3518
|
+
*
|
|
3519
|
+
* const {google} = require('googleapis');
|
|
3520
|
+
* const alloydb = google.alloydb('v1');
|
|
3521
|
+
*
|
|
3522
|
+
* async function main() {
|
|
3523
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3524
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3525
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3526
|
+
* });
|
|
3527
|
+
*
|
|
3528
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3529
|
+
* const authClient = await auth.getClient();
|
|
3530
|
+
* google.options({auth: authClient});
|
|
3531
|
+
*
|
|
3532
|
+
* // Do the magic
|
|
3533
|
+
* const res = await alloydb.projects.locations.clusters.import({
|
|
3534
|
+
* // Required. The resource name of the cluster.
|
|
3535
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
3536
|
+
*
|
|
3537
|
+
* // Request body metadata
|
|
3538
|
+
* requestBody: {
|
|
3539
|
+
* // request body parameters
|
|
3540
|
+
* // {
|
|
3541
|
+
* // "csvImportOptions": {},
|
|
3542
|
+
* // "database": "my_database",
|
|
3543
|
+
* // "gcsUri": "my_gcsUri",
|
|
3544
|
+
* // "sqlImportOptions": {},
|
|
3545
|
+
* // "user": "my_user"
|
|
3546
|
+
* // }
|
|
3547
|
+
* },
|
|
3548
|
+
* });
|
|
3549
|
+
* console.log(res.data);
|
|
3550
|
+
*
|
|
3551
|
+
* // Example response
|
|
3552
|
+
* // {
|
|
3553
|
+
* // "done": false,
|
|
3554
|
+
* // "error": {},
|
|
3555
|
+
* // "metadata": {},
|
|
3556
|
+
* // "name": "my_name",
|
|
3557
|
+
* // "response": {}
|
|
3558
|
+
* // }
|
|
3559
|
+
* }
|
|
3560
|
+
*
|
|
3561
|
+
* main().catch(e => {
|
|
3562
|
+
* console.error(e);
|
|
3563
|
+
* throw e;
|
|
3564
|
+
* });
|
|
3565
|
+
*
|
|
3566
|
+
* ```
|
|
2637
3567
|
*
|
|
2638
3568
|
* @param params - Parameters for request
|
|
2639
3569
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2640
3570
|
* @param callback - Optional callback that handles the response.
|
|
2641
3571
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2642
3572
|
*/
|
|
2643
|
-
import(params: Params$Resource$Projects$Locations$Clusters$Import, options: StreamMethodOptions):
|
|
2644
|
-
import(params?: Params$Resource$Projects$Locations$Clusters$Import, options?: MethodOptions):
|
|
3573
|
+
import(params: Params$Resource$Projects$Locations$Clusters$Import, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3574
|
+
import(params?: Params$Resource$Projects$Locations$Clusters$Import, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2645
3575
|
import(params: Params$Resource$Projects$Locations$Clusters$Import, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2646
3576
|
import(params: Params$Resource$Projects$Locations$Clusters$Import, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2647
3577
|
import(params: Params$Resource$Projects$Locations$Clusters$Import, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2648
3578
|
import(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2649
3579
|
/**
|
|
2650
3580
|
* Lists Clusters in a given project and location.
|
|
3581
|
+
* @example
|
|
3582
|
+
* ```js
|
|
3583
|
+
* // Before running the sample:
|
|
3584
|
+
* // - Enable the API at:
|
|
3585
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3586
|
+
* // - Login into gcloud by running:
|
|
3587
|
+
* // ```sh
|
|
3588
|
+
* // $ gcloud auth application-default login
|
|
3589
|
+
* // ```
|
|
3590
|
+
* // - Install the npm module by running:
|
|
3591
|
+
* // ```sh
|
|
3592
|
+
* // $ npm install googleapis
|
|
3593
|
+
* // ```
|
|
3594
|
+
*
|
|
3595
|
+
* const {google} = require('googleapis');
|
|
3596
|
+
* const alloydb = google.alloydb('v1');
|
|
3597
|
+
*
|
|
3598
|
+
* async function main() {
|
|
3599
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3600
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3601
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3602
|
+
* });
|
|
3603
|
+
*
|
|
3604
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3605
|
+
* const authClient = await auth.getClient();
|
|
3606
|
+
* google.options({auth: authClient});
|
|
3607
|
+
*
|
|
3608
|
+
* // Do the magic
|
|
3609
|
+
* const res = await alloydb.projects.locations.clusters.list({
|
|
3610
|
+
* // Optional. Filtering results
|
|
3611
|
+
* filter: 'placeholder-value',
|
|
3612
|
+
* // Optional. Hint for how to order the results
|
|
3613
|
+
* orderBy: 'placeholder-value',
|
|
3614
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
3615
|
+
* pageSize: 'placeholder-value',
|
|
3616
|
+
* // A token identifying a page of results the server should return.
|
|
3617
|
+
* pageToken: 'placeholder-value',
|
|
3618
|
+
* // 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/-
|
|
3619
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3620
|
+
* });
|
|
3621
|
+
* console.log(res.data);
|
|
3622
|
+
*
|
|
3623
|
+
* // Example response
|
|
3624
|
+
* // {
|
|
3625
|
+
* // "clusters": [],
|
|
3626
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
3627
|
+
* // "unreachable": []
|
|
3628
|
+
* // }
|
|
3629
|
+
* }
|
|
3630
|
+
*
|
|
3631
|
+
* main().catch(e => {
|
|
3632
|
+
* console.error(e);
|
|
3633
|
+
* throw e;
|
|
3634
|
+
* });
|
|
3635
|
+
*
|
|
3636
|
+
* ```
|
|
2651
3637
|
*
|
|
2652
3638
|
* @param params - Parameters for request
|
|
2653
3639
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2654
3640
|
* @param callback - Optional callback that handles the response.
|
|
2655
3641
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2656
3642
|
*/
|
|
2657
|
-
list(params: Params$Resource$Projects$Locations$Clusters$List, options: StreamMethodOptions):
|
|
2658
|
-
list(params?: Params$Resource$Projects$Locations$Clusters$List, options?: MethodOptions):
|
|
3643
|
+
list(params: Params$Resource$Projects$Locations$Clusters$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3644
|
+
list(params?: Params$Resource$Projects$Locations$Clusters$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListClustersResponse>>;
|
|
2659
3645
|
list(params: Params$Resource$Projects$Locations$Clusters$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2660
3646
|
list(params: Params$Resource$Projects$Locations$Clusters$List, options: MethodOptions | BodyResponseCallback<Schema$ListClustersResponse>, callback: BodyResponseCallback<Schema$ListClustersResponse>): void;
|
|
2661
3647
|
list(params: Params$Resource$Projects$Locations$Clusters$List, callback: BodyResponseCallback<Schema$ListClustersResponse>): void;
|
|
2662
3648
|
list(callback: BodyResponseCallback<Schema$ListClustersResponse>): void;
|
|
2663
3649
|
/**
|
|
2664
3650
|
* Updates the parameters of a single Cluster.
|
|
3651
|
+
* @example
|
|
3652
|
+
* ```js
|
|
3653
|
+
* // Before running the sample:
|
|
3654
|
+
* // - Enable the API at:
|
|
3655
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3656
|
+
* // - Login into gcloud by running:
|
|
3657
|
+
* // ```sh
|
|
3658
|
+
* // $ gcloud auth application-default login
|
|
3659
|
+
* // ```
|
|
3660
|
+
* // - Install the npm module by running:
|
|
3661
|
+
* // ```sh
|
|
3662
|
+
* // $ npm install googleapis
|
|
3663
|
+
* // ```
|
|
3664
|
+
*
|
|
3665
|
+
* const {google} = require('googleapis');
|
|
3666
|
+
* const alloydb = google.alloydb('v1');
|
|
3667
|
+
*
|
|
3668
|
+
* async function main() {
|
|
3669
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3670
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3671
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3672
|
+
* });
|
|
3673
|
+
*
|
|
3674
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3675
|
+
* const authClient = await auth.getClient();
|
|
3676
|
+
* google.options({auth: authClient});
|
|
3677
|
+
*
|
|
3678
|
+
* // Do the magic
|
|
3679
|
+
* const res = await alloydb.projects.locations.clusters.patch({
|
|
3680
|
+
* // 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.
|
|
3681
|
+
* allowMissing: 'placeholder-value',
|
|
3682
|
+
* // 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\}
|
|
3683
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
3684
|
+
* // 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).
|
|
3685
|
+
* requestId: 'placeholder-value',
|
|
3686
|
+
* // 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.
|
|
3687
|
+
* updateMask: 'placeholder-value',
|
|
3688
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
3689
|
+
* validateOnly: 'placeholder-value',
|
|
3690
|
+
*
|
|
3691
|
+
* // Request body metadata
|
|
3692
|
+
* requestBody: {
|
|
3693
|
+
* // request body parameters
|
|
3694
|
+
* // {
|
|
3695
|
+
* // "annotations": {},
|
|
3696
|
+
* // "automatedBackupPolicy": {},
|
|
3697
|
+
* // "backupSource": {},
|
|
3698
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3699
|
+
* // "clusterType": "my_clusterType",
|
|
3700
|
+
* // "continuousBackupConfig": {},
|
|
3701
|
+
* // "continuousBackupInfo": {},
|
|
3702
|
+
* // "createTime": "my_createTime",
|
|
3703
|
+
* // "databaseVersion": "my_databaseVersion",
|
|
3704
|
+
* // "deleteTime": "my_deleteTime",
|
|
3705
|
+
* // "displayName": "my_displayName",
|
|
3706
|
+
* // "encryptionConfig": {},
|
|
3707
|
+
* // "encryptionInfo": {},
|
|
3708
|
+
* // "etag": "my_etag",
|
|
3709
|
+
* // "initialUser": {},
|
|
3710
|
+
* // "labels": {},
|
|
3711
|
+
* // "maintenanceSchedule": {},
|
|
3712
|
+
* // "maintenanceUpdatePolicy": {},
|
|
3713
|
+
* // "migrationSource": {},
|
|
3714
|
+
* // "name": "my_name",
|
|
3715
|
+
* // "network": "my_network",
|
|
3716
|
+
* // "networkConfig": {},
|
|
3717
|
+
* // "primaryConfig": {},
|
|
3718
|
+
* // "pscConfig": {},
|
|
3719
|
+
* // "reconciling": false,
|
|
3720
|
+
* // "satisfiesPzs": false,
|
|
3721
|
+
* // "secondaryConfig": {},
|
|
3722
|
+
* // "sslConfig": {},
|
|
3723
|
+
* // "state": "my_state",
|
|
3724
|
+
* // "subscriptionType": "my_subscriptionType",
|
|
3725
|
+
* // "tags": {},
|
|
3726
|
+
* // "trialMetadata": {},
|
|
3727
|
+
* // "uid": "my_uid",
|
|
3728
|
+
* // "updateTime": "my_updateTime"
|
|
3729
|
+
* // }
|
|
3730
|
+
* },
|
|
3731
|
+
* });
|
|
3732
|
+
* console.log(res.data);
|
|
3733
|
+
*
|
|
3734
|
+
* // Example response
|
|
3735
|
+
* // {
|
|
3736
|
+
* // "done": false,
|
|
3737
|
+
* // "error": {},
|
|
3738
|
+
* // "metadata": {},
|
|
3739
|
+
* // "name": "my_name",
|
|
3740
|
+
* // "response": {}
|
|
3741
|
+
* // }
|
|
3742
|
+
* }
|
|
3743
|
+
*
|
|
3744
|
+
* main().catch(e => {
|
|
3745
|
+
* console.error(e);
|
|
3746
|
+
* throw e;
|
|
3747
|
+
* });
|
|
3748
|
+
*
|
|
3749
|
+
* ```
|
|
2665
3750
|
*
|
|
2666
3751
|
* @param params - Parameters for request
|
|
2667
3752
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2668
3753
|
* @param callback - Optional callback that handles the response.
|
|
2669
3754
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2670
3755
|
*/
|
|
2671
|
-
patch(params: Params$Resource$Projects$Locations$Clusters$Patch, options: StreamMethodOptions):
|
|
2672
|
-
patch(params?: Params$Resource$Projects$Locations$Clusters$Patch, options?: MethodOptions):
|
|
3756
|
+
patch(params: Params$Resource$Projects$Locations$Clusters$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3757
|
+
patch(params?: Params$Resource$Projects$Locations$Clusters$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2673
3758
|
patch(params: Params$Resource$Projects$Locations$Clusters$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2674
3759
|
patch(params: Params$Resource$Projects$Locations$Clusters$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2675
3760
|
patch(params: Params$Resource$Projects$Locations$Clusters$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2676
3761
|
patch(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2677
3762
|
/**
|
|
2678
3763
|
* Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.
|
|
3764
|
+
* @example
|
|
3765
|
+
* ```js
|
|
3766
|
+
* // Before running the sample:
|
|
3767
|
+
* // - Enable the API at:
|
|
3768
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3769
|
+
* // - Login into gcloud by running:
|
|
3770
|
+
* // ```sh
|
|
3771
|
+
* // $ gcloud auth application-default login
|
|
3772
|
+
* // ```
|
|
3773
|
+
* // - Install the npm module by running:
|
|
3774
|
+
* // ```sh
|
|
3775
|
+
* // $ npm install googleapis
|
|
3776
|
+
* // ```
|
|
3777
|
+
*
|
|
3778
|
+
* const {google} = require('googleapis');
|
|
3779
|
+
* const alloydb = google.alloydb('v1');
|
|
3780
|
+
*
|
|
3781
|
+
* async function main() {
|
|
3782
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3783
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3784
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3785
|
+
* });
|
|
3786
|
+
*
|
|
3787
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3788
|
+
* const authClient = await auth.getClient();
|
|
3789
|
+
* google.options({auth: authClient});
|
|
3790
|
+
*
|
|
3791
|
+
* // Do the magic
|
|
3792
|
+
* const res = await alloydb.projects.locations.clusters.promote({
|
|
3793
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
3794
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
3795
|
+
*
|
|
3796
|
+
* // Request body metadata
|
|
3797
|
+
* requestBody: {
|
|
3798
|
+
* // request body parameters
|
|
3799
|
+
* // {
|
|
3800
|
+
* // "etag": "my_etag",
|
|
3801
|
+
* // "requestId": "my_requestId",
|
|
3802
|
+
* // "validateOnly": false
|
|
3803
|
+
* // }
|
|
3804
|
+
* },
|
|
3805
|
+
* });
|
|
3806
|
+
* console.log(res.data);
|
|
3807
|
+
*
|
|
3808
|
+
* // Example response
|
|
3809
|
+
* // {
|
|
3810
|
+
* // "done": false,
|
|
3811
|
+
* // "error": {},
|
|
3812
|
+
* // "metadata": {},
|
|
3813
|
+
* // "name": "my_name",
|
|
3814
|
+
* // "response": {}
|
|
3815
|
+
* // }
|
|
3816
|
+
* }
|
|
3817
|
+
*
|
|
3818
|
+
* main().catch(e => {
|
|
3819
|
+
* console.error(e);
|
|
3820
|
+
* throw e;
|
|
3821
|
+
* });
|
|
3822
|
+
*
|
|
3823
|
+
* ```
|
|
2679
3824
|
*
|
|
2680
3825
|
* @param params - Parameters for request
|
|
2681
3826
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2682
3827
|
* @param callback - Optional callback that handles the response.
|
|
2683
3828
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2684
3829
|
*/
|
|
2685
|
-
promote(params: Params$Resource$Projects$Locations$Clusters$Promote, options: StreamMethodOptions):
|
|
2686
|
-
promote(params?: Params$Resource$Projects$Locations$Clusters$Promote, options?: MethodOptions):
|
|
3830
|
+
promote(params: Params$Resource$Projects$Locations$Clusters$Promote, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3831
|
+
promote(params?: Params$Resource$Projects$Locations$Clusters$Promote, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2687
3832
|
promote(params: Params$Resource$Projects$Locations$Clusters$Promote, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2688
3833
|
promote(params: Params$Resource$Projects$Locations$Clusters$Promote, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2689
3834
|
promote(params: Params$Resource$Projects$Locations$Clusters$Promote, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2690
3835
|
promote(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2691
3836
|
/**
|
|
2692
3837
|
* 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.
|
|
3838
|
+
* @example
|
|
3839
|
+
* ```js
|
|
3840
|
+
* // Before running the sample:
|
|
3841
|
+
* // - Enable the API at:
|
|
3842
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3843
|
+
* // - Login into gcloud by running:
|
|
3844
|
+
* // ```sh
|
|
3845
|
+
* // $ gcloud auth application-default login
|
|
3846
|
+
* // ```
|
|
3847
|
+
* // - Install the npm module by running:
|
|
3848
|
+
* // ```sh
|
|
3849
|
+
* // $ npm install googleapis
|
|
3850
|
+
* // ```
|
|
3851
|
+
*
|
|
3852
|
+
* const {google} = require('googleapis');
|
|
3853
|
+
* const alloydb = google.alloydb('v1');
|
|
3854
|
+
*
|
|
3855
|
+
* async function main() {
|
|
3856
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3857
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3858
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3859
|
+
* });
|
|
3860
|
+
*
|
|
3861
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3862
|
+
* const authClient = await auth.getClient();
|
|
3863
|
+
* google.options({auth: authClient});
|
|
3864
|
+
*
|
|
3865
|
+
* // Do the magic
|
|
3866
|
+
* const res = await alloydb.projects.locations.clusters.restore({
|
|
3867
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.
|
|
3868
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3869
|
+
*
|
|
3870
|
+
* // Request body metadata
|
|
3871
|
+
* requestBody: {
|
|
3872
|
+
* // request body parameters
|
|
3873
|
+
* // {
|
|
3874
|
+
* // "backupSource": {},
|
|
3875
|
+
* // "cluster": {},
|
|
3876
|
+
* // "clusterId": "my_clusterId",
|
|
3877
|
+
* // "continuousBackupSource": {},
|
|
3878
|
+
* // "requestId": "my_requestId",
|
|
3879
|
+
* // "validateOnly": false
|
|
3880
|
+
* // }
|
|
3881
|
+
* },
|
|
3882
|
+
* });
|
|
3883
|
+
* console.log(res.data);
|
|
3884
|
+
*
|
|
3885
|
+
* // Example response
|
|
3886
|
+
* // {
|
|
3887
|
+
* // "done": false,
|
|
3888
|
+
* // "error": {},
|
|
3889
|
+
* // "metadata": {},
|
|
3890
|
+
* // "name": "my_name",
|
|
3891
|
+
* // "response": {}
|
|
3892
|
+
* // }
|
|
3893
|
+
* }
|
|
3894
|
+
*
|
|
3895
|
+
* main().catch(e => {
|
|
3896
|
+
* console.error(e);
|
|
3897
|
+
* throw e;
|
|
3898
|
+
* });
|
|
3899
|
+
*
|
|
3900
|
+
* ```
|
|
2693
3901
|
*
|
|
2694
3902
|
* @param params - Parameters for request
|
|
2695
3903
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2696
3904
|
* @param callback - Optional callback that handles the response.
|
|
2697
3905
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2698
3906
|
*/
|
|
2699
|
-
restore(params: Params$Resource$Projects$Locations$Clusters$Restore, options: StreamMethodOptions):
|
|
2700
|
-
restore(params?: Params$Resource$Projects$Locations$Clusters$Restore, options?: MethodOptions):
|
|
3907
|
+
restore(params: Params$Resource$Projects$Locations$Clusters$Restore, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3908
|
+
restore(params?: Params$Resource$Projects$Locations$Clusters$Restore, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2701
3909
|
restore(params: Params$Resource$Projects$Locations$Clusters$Restore, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2702
3910
|
restore(params: Params$Resource$Projects$Locations$Clusters$Restore, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2703
3911
|
restore(params: Params$Resource$Projects$Locations$Clusters$Restore, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2704
3912
|
restore(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2705
3913
|
/**
|
|
2706
3914
|
* Restores an AlloyDB cluster from a CloudSQL resource.
|
|
3915
|
+
* @example
|
|
3916
|
+
* ```js
|
|
3917
|
+
* // Before running the sample:
|
|
3918
|
+
* // - Enable the API at:
|
|
3919
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3920
|
+
* // - Login into gcloud by running:
|
|
3921
|
+
* // ```sh
|
|
3922
|
+
* // $ gcloud auth application-default login
|
|
3923
|
+
* // ```
|
|
3924
|
+
* // - Install the npm module by running:
|
|
3925
|
+
* // ```sh
|
|
3926
|
+
* // $ npm install googleapis
|
|
3927
|
+
* // ```
|
|
3928
|
+
*
|
|
3929
|
+
* const {google} = require('googleapis');
|
|
3930
|
+
* const alloydb = google.alloydb('v1');
|
|
3931
|
+
*
|
|
3932
|
+
* async function main() {
|
|
3933
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3934
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3935
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
3936
|
+
* });
|
|
3937
|
+
*
|
|
3938
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3939
|
+
* const authClient = await auth.getClient();
|
|
3940
|
+
* google.options({auth: authClient});
|
|
3941
|
+
*
|
|
3942
|
+
* // Do the magic
|
|
3943
|
+
* const res = await alloydb.projects.locations.clusters.restoreFromCloudSQL({
|
|
3944
|
+
* // Required. The location of the new cluster. For the required format, see the comment on Cluster.name field.
|
|
3945
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
3946
|
+
*
|
|
3947
|
+
* // Request body metadata
|
|
3948
|
+
* requestBody: {
|
|
3949
|
+
* // request body parameters
|
|
3950
|
+
* // {
|
|
3951
|
+
* // "cloudsqlBackupRunSource": {},
|
|
3952
|
+
* // "cluster": {},
|
|
3953
|
+
* // "clusterId": "my_clusterId"
|
|
3954
|
+
* // }
|
|
3955
|
+
* },
|
|
3956
|
+
* });
|
|
3957
|
+
* console.log(res.data);
|
|
3958
|
+
*
|
|
3959
|
+
* // Example response
|
|
3960
|
+
* // {
|
|
3961
|
+
* // "done": false,
|
|
3962
|
+
* // "error": {},
|
|
3963
|
+
* // "metadata": {},
|
|
3964
|
+
* // "name": "my_name",
|
|
3965
|
+
* // "response": {}
|
|
3966
|
+
* // }
|
|
3967
|
+
* }
|
|
3968
|
+
*
|
|
3969
|
+
* main().catch(e => {
|
|
3970
|
+
* console.error(e);
|
|
3971
|
+
* throw e;
|
|
3972
|
+
* });
|
|
3973
|
+
*
|
|
3974
|
+
* ```
|
|
2707
3975
|
*
|
|
2708
3976
|
* @param params - Parameters for request
|
|
2709
3977
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2710
3978
|
* @param callback - Optional callback that handles the response.
|
|
2711
3979
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2712
3980
|
*/
|
|
2713
|
-
restoreFromCloudSQL(params: Params$Resource$Projects$Locations$Clusters$Restorefromcloudsql, options: StreamMethodOptions):
|
|
2714
|
-
restoreFromCloudSQL(params?: Params$Resource$Projects$Locations$Clusters$Restorefromcloudsql, options?: MethodOptions):
|
|
3981
|
+
restoreFromCloudSQL(params: Params$Resource$Projects$Locations$Clusters$Restorefromcloudsql, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3982
|
+
restoreFromCloudSQL(params?: Params$Resource$Projects$Locations$Clusters$Restorefromcloudsql, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2715
3983
|
restoreFromCloudSQL(params: Params$Resource$Projects$Locations$Clusters$Restorefromcloudsql, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2716
3984
|
restoreFromCloudSQL(params: Params$Resource$Projects$Locations$Clusters$Restorefromcloudsql, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2717
3985
|
restoreFromCloudSQL(params: Params$Resource$Projects$Locations$Clusters$Restorefromcloudsql, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2718
3986
|
restoreFromCloudSQL(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2719
3987
|
/**
|
|
2720
3988
|
* 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.
|
|
3989
|
+
* @example
|
|
3990
|
+
* ```js
|
|
3991
|
+
* // Before running the sample:
|
|
3992
|
+
* // - Enable the API at:
|
|
3993
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
3994
|
+
* // - Login into gcloud by running:
|
|
3995
|
+
* // ```sh
|
|
3996
|
+
* // $ gcloud auth application-default login
|
|
3997
|
+
* // ```
|
|
3998
|
+
* // - Install the npm module by running:
|
|
3999
|
+
* // ```sh
|
|
4000
|
+
* // $ npm install googleapis
|
|
4001
|
+
* // ```
|
|
4002
|
+
*
|
|
4003
|
+
* const {google} = require('googleapis');
|
|
4004
|
+
* const alloydb = google.alloydb('v1');
|
|
4005
|
+
*
|
|
4006
|
+
* async function main() {
|
|
4007
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4008
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4009
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4010
|
+
* });
|
|
4011
|
+
*
|
|
4012
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4013
|
+
* const authClient = await auth.getClient();
|
|
4014
|
+
* google.options({auth: authClient});
|
|
4015
|
+
*
|
|
4016
|
+
* // Do the magic
|
|
4017
|
+
* const res = await alloydb.projects.locations.clusters.switchover({
|
|
4018
|
+
* // Required. The name of the resource. For the required format, see the comment on the Cluster.name field
|
|
4019
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4020
|
+
*
|
|
4021
|
+
* // Request body metadata
|
|
4022
|
+
* requestBody: {
|
|
4023
|
+
* // request body parameters
|
|
4024
|
+
* // {
|
|
4025
|
+
* // "requestId": "my_requestId",
|
|
4026
|
+
* // "validateOnly": false
|
|
4027
|
+
* // }
|
|
4028
|
+
* },
|
|
4029
|
+
* });
|
|
4030
|
+
* console.log(res.data);
|
|
4031
|
+
*
|
|
4032
|
+
* // Example response
|
|
4033
|
+
* // {
|
|
4034
|
+
* // "done": false,
|
|
4035
|
+
* // "error": {},
|
|
4036
|
+
* // "metadata": {},
|
|
4037
|
+
* // "name": "my_name",
|
|
4038
|
+
* // "response": {}
|
|
4039
|
+
* // }
|
|
4040
|
+
* }
|
|
4041
|
+
*
|
|
4042
|
+
* main().catch(e => {
|
|
4043
|
+
* console.error(e);
|
|
4044
|
+
* throw e;
|
|
4045
|
+
* });
|
|
4046
|
+
*
|
|
4047
|
+
* ```
|
|
2721
4048
|
*
|
|
2722
4049
|
* @param params - Parameters for request
|
|
2723
4050
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2724
4051
|
* @param callback - Optional callback that handles the response.
|
|
2725
4052
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2726
4053
|
*/
|
|
2727
|
-
switchover(params: Params$Resource$Projects$Locations$Clusters$Switchover, options: StreamMethodOptions):
|
|
2728
|
-
switchover(params?: Params$Resource$Projects$Locations$Clusters$Switchover, options?: MethodOptions):
|
|
4054
|
+
switchover(params: Params$Resource$Projects$Locations$Clusters$Switchover, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4055
|
+
switchover(params?: Params$Resource$Projects$Locations$Clusters$Switchover, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2729
4056
|
switchover(params: Params$Resource$Projects$Locations$Clusters$Switchover, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2730
4057
|
switchover(params: Params$Resource$Projects$Locations$Clusters$Switchover, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2731
4058
|
switchover(params: Params$Resource$Projects$Locations$Clusters$Switchover, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2732
4059
|
switchover(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2733
4060
|
/**
|
|
2734
4061
|
* Upgrades a single Cluster. Imperative only.
|
|
4062
|
+
* @example
|
|
4063
|
+
* ```js
|
|
4064
|
+
* // Before running the sample:
|
|
4065
|
+
* // - Enable the API at:
|
|
4066
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4067
|
+
* // - Login into gcloud by running:
|
|
4068
|
+
* // ```sh
|
|
4069
|
+
* // $ gcloud auth application-default login
|
|
4070
|
+
* // ```
|
|
4071
|
+
* // - Install the npm module by running:
|
|
4072
|
+
* // ```sh
|
|
4073
|
+
* // $ npm install googleapis
|
|
4074
|
+
* // ```
|
|
4075
|
+
*
|
|
4076
|
+
* const {google} = require('googleapis');
|
|
4077
|
+
* const alloydb = google.alloydb('v1');
|
|
4078
|
+
*
|
|
4079
|
+
* async function main() {
|
|
4080
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4081
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4082
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4083
|
+
* });
|
|
4084
|
+
*
|
|
4085
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4086
|
+
* const authClient = await auth.getClient();
|
|
4087
|
+
* google.options({auth: authClient});
|
|
4088
|
+
*
|
|
4089
|
+
* // Do the magic
|
|
4090
|
+
* const res = await alloydb.projects.locations.clusters.upgrade({
|
|
4091
|
+
* // Required. The resource name of the cluster.
|
|
4092
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4093
|
+
*
|
|
4094
|
+
* // Request body metadata
|
|
4095
|
+
* requestBody: {
|
|
4096
|
+
* // request body parameters
|
|
4097
|
+
* // {
|
|
4098
|
+
* // "etag": "my_etag",
|
|
4099
|
+
* // "requestId": "my_requestId",
|
|
4100
|
+
* // "validateOnly": false,
|
|
4101
|
+
* // "version": "my_version"
|
|
4102
|
+
* // }
|
|
4103
|
+
* },
|
|
4104
|
+
* });
|
|
4105
|
+
* console.log(res.data);
|
|
4106
|
+
*
|
|
4107
|
+
* // Example response
|
|
4108
|
+
* // {
|
|
4109
|
+
* // "done": false,
|
|
4110
|
+
* // "error": {},
|
|
4111
|
+
* // "metadata": {},
|
|
4112
|
+
* // "name": "my_name",
|
|
4113
|
+
* // "response": {}
|
|
4114
|
+
* // }
|
|
4115
|
+
* }
|
|
4116
|
+
*
|
|
4117
|
+
* main().catch(e => {
|
|
4118
|
+
* console.error(e);
|
|
4119
|
+
* throw e;
|
|
4120
|
+
* });
|
|
4121
|
+
*
|
|
4122
|
+
* ```
|
|
2735
4123
|
*
|
|
2736
4124
|
* @param params - Parameters for request
|
|
2737
4125
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2738
4126
|
* @param callback - Optional callback that handles the response.
|
|
2739
4127
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2740
4128
|
*/
|
|
2741
|
-
upgrade(params: Params$Resource$Projects$Locations$Clusters$Upgrade, options: StreamMethodOptions):
|
|
2742
|
-
upgrade(params?: Params$Resource$Projects$Locations$Clusters$Upgrade, options?: MethodOptions):
|
|
4129
|
+
upgrade(params: Params$Resource$Projects$Locations$Clusters$Upgrade, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4130
|
+
upgrade(params?: Params$Resource$Projects$Locations$Clusters$Upgrade, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2743
4131
|
upgrade(params: Params$Resource$Projects$Locations$Clusters$Upgrade, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2744
4132
|
upgrade(params: Params$Resource$Projects$Locations$Clusters$Upgrade, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2745
4133
|
upgrade(params: Params$Resource$Projects$Locations$Clusters$Upgrade, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
@@ -2944,140 +4332,839 @@ export declare namespace alloydb_v1 {
|
|
|
2944
4332
|
constructor(context: APIRequestContext);
|
|
2945
4333
|
/**
|
|
2946
4334
|
* Creates a new Instance in a given project and location.
|
|
4335
|
+
* @example
|
|
4336
|
+
* ```js
|
|
4337
|
+
* // Before running the sample:
|
|
4338
|
+
* // - Enable the API at:
|
|
4339
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4340
|
+
* // - Login into gcloud by running:
|
|
4341
|
+
* // ```sh
|
|
4342
|
+
* // $ gcloud auth application-default login
|
|
4343
|
+
* // ```
|
|
4344
|
+
* // - Install the npm module by running:
|
|
4345
|
+
* // ```sh
|
|
4346
|
+
* // $ npm install googleapis
|
|
4347
|
+
* // ```
|
|
4348
|
+
*
|
|
4349
|
+
* const {google} = require('googleapis');
|
|
4350
|
+
* const alloydb = google.alloydb('v1');
|
|
4351
|
+
*
|
|
4352
|
+
* async function main() {
|
|
4353
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4354
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4355
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4356
|
+
* });
|
|
4357
|
+
*
|
|
4358
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4359
|
+
* const authClient = await auth.getClient();
|
|
4360
|
+
* google.options({auth: authClient});
|
|
4361
|
+
*
|
|
4362
|
+
* // Do the magic
|
|
4363
|
+
* const res = await alloydb.projects.locations.clusters.instances.create({
|
|
4364
|
+
* // Required. ID of the requesting object.
|
|
4365
|
+
* instanceId: 'placeholder-value',
|
|
4366
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
4367
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4368
|
+
* // 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).
|
|
4369
|
+
* requestId: 'placeholder-value',
|
|
4370
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4371
|
+
* validateOnly: 'placeholder-value',
|
|
4372
|
+
*
|
|
4373
|
+
* // Request body metadata
|
|
4374
|
+
* requestBody: {
|
|
4375
|
+
* // request body parameters
|
|
4376
|
+
* // {
|
|
4377
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
4378
|
+
* // "annotations": {},
|
|
4379
|
+
* // "availabilityType": "my_availabilityType",
|
|
4380
|
+
* // "clientConnectionConfig": {},
|
|
4381
|
+
* // "createTime": "my_createTime",
|
|
4382
|
+
* // "databaseFlags": {},
|
|
4383
|
+
* // "deleteTime": "my_deleteTime",
|
|
4384
|
+
* // "displayName": "my_displayName",
|
|
4385
|
+
* // "etag": "my_etag",
|
|
4386
|
+
* // "gceZone": "my_gceZone",
|
|
4387
|
+
* // "instanceType": "my_instanceType",
|
|
4388
|
+
* // "ipAddress": "my_ipAddress",
|
|
4389
|
+
* // "labels": {},
|
|
4390
|
+
* // "machineConfig": {},
|
|
4391
|
+
* // "name": "my_name",
|
|
4392
|
+
* // "networkConfig": {},
|
|
4393
|
+
* // "nodes": [],
|
|
4394
|
+
* // "observabilityConfig": {},
|
|
4395
|
+
* // "outboundPublicIpAddresses": [],
|
|
4396
|
+
* // "pscInstanceConfig": {},
|
|
4397
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
4398
|
+
* // "queryInsightsConfig": {},
|
|
4399
|
+
* // "readPoolConfig": {},
|
|
4400
|
+
* // "reconciling": false,
|
|
4401
|
+
* // "satisfiesPzs": false,
|
|
4402
|
+
* // "state": "my_state",
|
|
4403
|
+
* // "uid": "my_uid",
|
|
4404
|
+
* // "updateTime": "my_updateTime",
|
|
4405
|
+
* // "writableNode": {}
|
|
4406
|
+
* // }
|
|
4407
|
+
* },
|
|
4408
|
+
* });
|
|
4409
|
+
* console.log(res.data);
|
|
4410
|
+
*
|
|
4411
|
+
* // Example response
|
|
4412
|
+
* // {
|
|
4413
|
+
* // "done": false,
|
|
4414
|
+
* // "error": {},
|
|
4415
|
+
* // "metadata": {},
|
|
4416
|
+
* // "name": "my_name",
|
|
4417
|
+
* // "response": {}
|
|
4418
|
+
* // }
|
|
4419
|
+
* }
|
|
4420
|
+
*
|
|
4421
|
+
* main().catch(e => {
|
|
4422
|
+
* console.error(e);
|
|
4423
|
+
* throw e;
|
|
4424
|
+
* });
|
|
4425
|
+
*
|
|
4426
|
+
* ```
|
|
2947
4427
|
*
|
|
2948
4428
|
* @param params - Parameters for request
|
|
2949
4429
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2950
4430
|
* @param callback - Optional callback that handles the response.
|
|
2951
4431
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2952
4432
|
*/
|
|
2953
|
-
create(params: Params$Resource$Projects$Locations$Clusters$Instances$Create, options: StreamMethodOptions):
|
|
2954
|
-
create(params?: Params$Resource$Projects$Locations$Clusters$Instances$Create, options?: MethodOptions):
|
|
4433
|
+
create(params: Params$Resource$Projects$Locations$Clusters$Instances$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4434
|
+
create(params?: Params$Resource$Projects$Locations$Clusters$Instances$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2955
4435
|
create(params: Params$Resource$Projects$Locations$Clusters$Instances$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2956
4436
|
create(params: Params$Resource$Projects$Locations$Clusters$Instances$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2957
4437
|
create(params: Params$Resource$Projects$Locations$Clusters$Instances$Create, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2958
4438
|
create(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2959
4439
|
/**
|
|
2960
4440
|
* Creates a new SECONDARY Instance in a given project and location.
|
|
4441
|
+
* @example
|
|
4442
|
+
* ```js
|
|
4443
|
+
* // Before running the sample:
|
|
4444
|
+
* // - Enable the API at:
|
|
4445
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4446
|
+
* // - Login into gcloud by running:
|
|
4447
|
+
* // ```sh
|
|
4448
|
+
* // $ gcloud auth application-default login
|
|
4449
|
+
* // ```
|
|
4450
|
+
* // - Install the npm module by running:
|
|
4451
|
+
* // ```sh
|
|
4452
|
+
* // $ npm install googleapis
|
|
4453
|
+
* // ```
|
|
4454
|
+
*
|
|
4455
|
+
* const {google} = require('googleapis');
|
|
4456
|
+
* const alloydb = google.alloydb('v1');
|
|
4457
|
+
*
|
|
4458
|
+
* async function main() {
|
|
4459
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4460
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4461
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4462
|
+
* });
|
|
4463
|
+
*
|
|
4464
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4465
|
+
* const authClient = await auth.getClient();
|
|
4466
|
+
* google.options({auth: authClient});
|
|
4467
|
+
*
|
|
4468
|
+
* // Do the magic
|
|
4469
|
+
* const res =
|
|
4470
|
+
* await alloydb.projects.locations.clusters.instances.createsecondary({
|
|
4471
|
+
* // Required. ID of the requesting object.
|
|
4472
|
+
* instanceId: 'placeholder-value',
|
|
4473
|
+
* // Required. The name of the parent resource. For the required format, see the comment on the Instance.name field.
|
|
4474
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4475
|
+
* // 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).
|
|
4476
|
+
* requestId: 'placeholder-value',
|
|
4477
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4478
|
+
* validateOnly: 'placeholder-value',
|
|
4479
|
+
*
|
|
4480
|
+
* // Request body metadata
|
|
4481
|
+
* requestBody: {
|
|
4482
|
+
* // request body parameters
|
|
4483
|
+
* // {
|
|
4484
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
4485
|
+
* // "annotations": {},
|
|
4486
|
+
* // "availabilityType": "my_availabilityType",
|
|
4487
|
+
* // "clientConnectionConfig": {},
|
|
4488
|
+
* // "createTime": "my_createTime",
|
|
4489
|
+
* // "databaseFlags": {},
|
|
4490
|
+
* // "deleteTime": "my_deleteTime",
|
|
4491
|
+
* // "displayName": "my_displayName",
|
|
4492
|
+
* // "etag": "my_etag",
|
|
4493
|
+
* // "gceZone": "my_gceZone",
|
|
4494
|
+
* // "instanceType": "my_instanceType",
|
|
4495
|
+
* // "ipAddress": "my_ipAddress",
|
|
4496
|
+
* // "labels": {},
|
|
4497
|
+
* // "machineConfig": {},
|
|
4498
|
+
* // "name": "my_name",
|
|
4499
|
+
* // "networkConfig": {},
|
|
4500
|
+
* // "nodes": [],
|
|
4501
|
+
* // "observabilityConfig": {},
|
|
4502
|
+
* // "outboundPublicIpAddresses": [],
|
|
4503
|
+
* // "pscInstanceConfig": {},
|
|
4504
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
4505
|
+
* // "queryInsightsConfig": {},
|
|
4506
|
+
* // "readPoolConfig": {},
|
|
4507
|
+
* // "reconciling": false,
|
|
4508
|
+
* // "satisfiesPzs": false,
|
|
4509
|
+
* // "state": "my_state",
|
|
4510
|
+
* // "uid": "my_uid",
|
|
4511
|
+
* // "updateTime": "my_updateTime",
|
|
4512
|
+
* // "writableNode": {}
|
|
4513
|
+
* // }
|
|
4514
|
+
* },
|
|
4515
|
+
* });
|
|
4516
|
+
* console.log(res.data);
|
|
4517
|
+
*
|
|
4518
|
+
* // Example response
|
|
4519
|
+
* // {
|
|
4520
|
+
* // "done": false,
|
|
4521
|
+
* // "error": {},
|
|
4522
|
+
* // "metadata": {},
|
|
4523
|
+
* // "name": "my_name",
|
|
4524
|
+
* // "response": {}
|
|
4525
|
+
* // }
|
|
4526
|
+
* }
|
|
4527
|
+
*
|
|
4528
|
+
* main().catch(e => {
|
|
4529
|
+
* console.error(e);
|
|
4530
|
+
* throw e;
|
|
4531
|
+
* });
|
|
4532
|
+
*
|
|
4533
|
+
* ```
|
|
2961
4534
|
*
|
|
2962
4535
|
* @param params - Parameters for request
|
|
2963
4536
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2964
4537
|
* @param callback - Optional callback that handles the response.
|
|
2965
4538
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2966
4539
|
*/
|
|
2967
|
-
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Instances$Createsecondary, options: StreamMethodOptions):
|
|
2968
|
-
createsecondary(params?: Params$Resource$Projects$Locations$Clusters$Instances$Createsecondary, options?: MethodOptions):
|
|
4540
|
+
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Instances$Createsecondary, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4541
|
+
createsecondary(params?: Params$Resource$Projects$Locations$Clusters$Instances$Createsecondary, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2969
4542
|
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Instances$Createsecondary, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2970
4543
|
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Instances$Createsecondary, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2971
4544
|
createsecondary(params: Params$Resource$Projects$Locations$Clusters$Instances$Createsecondary, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2972
4545
|
createsecondary(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2973
4546
|
/**
|
|
2974
4547
|
* Deletes a single Instance.
|
|
4548
|
+
* @example
|
|
4549
|
+
* ```js
|
|
4550
|
+
* // Before running the sample:
|
|
4551
|
+
* // - Enable the API at:
|
|
4552
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4553
|
+
* // - Login into gcloud by running:
|
|
4554
|
+
* // ```sh
|
|
4555
|
+
* // $ gcloud auth application-default login
|
|
4556
|
+
* // ```
|
|
4557
|
+
* // - Install the npm module by running:
|
|
4558
|
+
* // ```sh
|
|
4559
|
+
* // $ npm install googleapis
|
|
4560
|
+
* // ```
|
|
4561
|
+
*
|
|
4562
|
+
* const {google} = require('googleapis');
|
|
4563
|
+
* const alloydb = google.alloydb('v1');
|
|
4564
|
+
*
|
|
4565
|
+
* async function main() {
|
|
4566
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4567
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4568
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4569
|
+
* });
|
|
4570
|
+
*
|
|
4571
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4572
|
+
* const authClient = await auth.getClient();
|
|
4573
|
+
* google.options({auth: authClient});
|
|
4574
|
+
*
|
|
4575
|
+
* // Do the magic
|
|
4576
|
+
* const res = await alloydb.projects.locations.clusters.instances.delete({
|
|
4577
|
+
* // 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.
|
|
4578
|
+
* etag: 'placeholder-value',
|
|
4579
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
4580
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
4581
|
+
* // 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).
|
|
4582
|
+
* requestId: 'placeholder-value',
|
|
4583
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
4584
|
+
* validateOnly: 'placeholder-value',
|
|
4585
|
+
* });
|
|
4586
|
+
* console.log(res.data);
|
|
4587
|
+
*
|
|
4588
|
+
* // Example response
|
|
4589
|
+
* // {
|
|
4590
|
+
* // "done": false,
|
|
4591
|
+
* // "error": {},
|
|
4592
|
+
* // "metadata": {},
|
|
4593
|
+
* // "name": "my_name",
|
|
4594
|
+
* // "response": {}
|
|
4595
|
+
* // }
|
|
4596
|
+
* }
|
|
4597
|
+
*
|
|
4598
|
+
* main().catch(e => {
|
|
4599
|
+
* console.error(e);
|
|
4600
|
+
* throw e;
|
|
4601
|
+
* });
|
|
4602
|
+
*
|
|
4603
|
+
* ```
|
|
2975
4604
|
*
|
|
2976
4605
|
* @param params - Parameters for request
|
|
2977
4606
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2978
4607
|
* @param callback - Optional callback that handles the response.
|
|
2979
4608
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2980
4609
|
*/
|
|
2981
|
-
delete(params: Params$Resource$Projects$Locations$Clusters$Instances$Delete, options: StreamMethodOptions):
|
|
2982
|
-
delete(params?: Params$Resource$Projects$Locations$Clusters$Instances$Delete, options?: MethodOptions):
|
|
4610
|
+
delete(params: Params$Resource$Projects$Locations$Clusters$Instances$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4611
|
+
delete(params?: Params$Resource$Projects$Locations$Clusters$Instances$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2983
4612
|
delete(params: Params$Resource$Projects$Locations$Clusters$Instances$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2984
4613
|
delete(params: Params$Resource$Projects$Locations$Clusters$Instances$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2985
4614
|
delete(params: Params$Resource$Projects$Locations$Clusters$Instances$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2986
4615
|
delete(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2987
4616
|
/**
|
|
2988
4617
|
* Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.
|
|
4618
|
+
* @example
|
|
4619
|
+
* ```js
|
|
4620
|
+
* // Before running the sample:
|
|
4621
|
+
* // - Enable the API at:
|
|
4622
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4623
|
+
* // - Login into gcloud by running:
|
|
4624
|
+
* // ```sh
|
|
4625
|
+
* // $ gcloud auth application-default login
|
|
4626
|
+
* // ```
|
|
4627
|
+
* // - Install the npm module by running:
|
|
4628
|
+
* // ```sh
|
|
4629
|
+
* // $ npm install googleapis
|
|
4630
|
+
* // ```
|
|
4631
|
+
*
|
|
4632
|
+
* const {google} = require('googleapis');
|
|
4633
|
+
* const alloydb = google.alloydb('v1');
|
|
4634
|
+
*
|
|
4635
|
+
* async function main() {
|
|
4636
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4637
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4638
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4639
|
+
* });
|
|
4640
|
+
*
|
|
4641
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4642
|
+
* const authClient = await auth.getClient();
|
|
4643
|
+
* google.options({auth: authClient});
|
|
4644
|
+
*
|
|
4645
|
+
* // Do the magic
|
|
4646
|
+
* const res = await alloydb.projects.locations.clusters.instances.failover({
|
|
4647
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
4648
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
4649
|
+
*
|
|
4650
|
+
* // Request body metadata
|
|
4651
|
+
* requestBody: {
|
|
4652
|
+
* // request body parameters
|
|
4653
|
+
* // {
|
|
4654
|
+
* // "requestId": "my_requestId",
|
|
4655
|
+
* // "validateOnly": false
|
|
4656
|
+
* // }
|
|
4657
|
+
* },
|
|
4658
|
+
* });
|
|
4659
|
+
* console.log(res.data);
|
|
4660
|
+
*
|
|
4661
|
+
* // Example response
|
|
4662
|
+
* // {
|
|
4663
|
+
* // "done": false,
|
|
4664
|
+
* // "error": {},
|
|
4665
|
+
* // "metadata": {},
|
|
4666
|
+
* // "name": "my_name",
|
|
4667
|
+
* // "response": {}
|
|
4668
|
+
* // }
|
|
4669
|
+
* }
|
|
4670
|
+
*
|
|
4671
|
+
* main().catch(e => {
|
|
4672
|
+
* console.error(e);
|
|
4673
|
+
* throw e;
|
|
4674
|
+
* });
|
|
4675
|
+
*
|
|
4676
|
+
* ```
|
|
2989
4677
|
*
|
|
2990
4678
|
* @param params - Parameters for request
|
|
2991
4679
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2992
4680
|
* @param callback - Optional callback that handles the response.
|
|
2993
4681
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2994
4682
|
*/
|
|
2995
|
-
failover(params: Params$Resource$Projects$Locations$Clusters$Instances$Failover, options: StreamMethodOptions):
|
|
2996
|
-
failover(params?: Params$Resource$Projects$Locations$Clusters$Instances$Failover, options?: MethodOptions):
|
|
4683
|
+
failover(params: Params$Resource$Projects$Locations$Clusters$Instances$Failover, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4684
|
+
failover(params?: Params$Resource$Projects$Locations$Clusters$Instances$Failover, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
2997
4685
|
failover(params: Params$Resource$Projects$Locations$Clusters$Instances$Failover, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2998
4686
|
failover(params: Params$Resource$Projects$Locations$Clusters$Instances$Failover, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
2999
4687
|
failover(params: Params$Resource$Projects$Locations$Clusters$Instances$Failover, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3000
4688
|
failover(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3001
4689
|
/**
|
|
3002
4690
|
* Gets details of a single Instance.
|
|
4691
|
+
* @example
|
|
4692
|
+
* ```js
|
|
4693
|
+
* // Before running the sample:
|
|
4694
|
+
* // - Enable the API at:
|
|
4695
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4696
|
+
* // - Login into gcloud by running:
|
|
4697
|
+
* // ```sh
|
|
4698
|
+
* // $ gcloud auth application-default login
|
|
4699
|
+
* // ```
|
|
4700
|
+
* // - Install the npm module by running:
|
|
4701
|
+
* // ```sh
|
|
4702
|
+
* // $ npm install googleapis
|
|
4703
|
+
* // ```
|
|
4704
|
+
*
|
|
4705
|
+
* const {google} = require('googleapis');
|
|
4706
|
+
* const alloydb = google.alloydb('v1');
|
|
4707
|
+
*
|
|
4708
|
+
* async function main() {
|
|
4709
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4710
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4711
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4712
|
+
* });
|
|
4713
|
+
*
|
|
4714
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4715
|
+
* const authClient = await auth.getClient();
|
|
4716
|
+
* google.options({auth: authClient});
|
|
4717
|
+
*
|
|
4718
|
+
* // Do the magic
|
|
4719
|
+
* const res = await alloydb.projects.locations.clusters.instances.get({
|
|
4720
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
4721
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
4722
|
+
* // The view of the instance to return.
|
|
4723
|
+
* view: 'placeholder-value',
|
|
4724
|
+
* });
|
|
4725
|
+
* console.log(res.data);
|
|
4726
|
+
*
|
|
4727
|
+
* // Example response
|
|
4728
|
+
* // {
|
|
4729
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
4730
|
+
* // "annotations": {},
|
|
4731
|
+
* // "availabilityType": "my_availabilityType",
|
|
4732
|
+
* // "clientConnectionConfig": {},
|
|
4733
|
+
* // "createTime": "my_createTime",
|
|
4734
|
+
* // "databaseFlags": {},
|
|
4735
|
+
* // "deleteTime": "my_deleteTime",
|
|
4736
|
+
* // "displayName": "my_displayName",
|
|
4737
|
+
* // "etag": "my_etag",
|
|
4738
|
+
* // "gceZone": "my_gceZone",
|
|
4739
|
+
* // "instanceType": "my_instanceType",
|
|
4740
|
+
* // "ipAddress": "my_ipAddress",
|
|
4741
|
+
* // "labels": {},
|
|
4742
|
+
* // "machineConfig": {},
|
|
4743
|
+
* // "name": "my_name",
|
|
4744
|
+
* // "networkConfig": {},
|
|
4745
|
+
* // "nodes": [],
|
|
4746
|
+
* // "observabilityConfig": {},
|
|
4747
|
+
* // "outboundPublicIpAddresses": [],
|
|
4748
|
+
* // "pscInstanceConfig": {},
|
|
4749
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
4750
|
+
* // "queryInsightsConfig": {},
|
|
4751
|
+
* // "readPoolConfig": {},
|
|
4752
|
+
* // "reconciling": false,
|
|
4753
|
+
* // "satisfiesPzs": false,
|
|
4754
|
+
* // "state": "my_state",
|
|
4755
|
+
* // "uid": "my_uid",
|
|
4756
|
+
* // "updateTime": "my_updateTime",
|
|
4757
|
+
* // "writableNode": {}
|
|
4758
|
+
* // }
|
|
4759
|
+
* }
|
|
4760
|
+
*
|
|
4761
|
+
* main().catch(e => {
|
|
4762
|
+
* console.error(e);
|
|
4763
|
+
* throw e;
|
|
4764
|
+
* });
|
|
4765
|
+
*
|
|
4766
|
+
* ```
|
|
3003
4767
|
*
|
|
3004
4768
|
* @param params - Parameters for request
|
|
3005
4769
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3006
4770
|
* @param callback - Optional callback that handles the response.
|
|
3007
4771
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3008
4772
|
*/
|
|
3009
|
-
get(params: Params$Resource$Projects$Locations$Clusters$Instances$Get, options: StreamMethodOptions):
|
|
3010
|
-
get(params?: Params$Resource$Projects$Locations$Clusters$Instances$Get, options?: MethodOptions):
|
|
4773
|
+
get(params: Params$Resource$Projects$Locations$Clusters$Instances$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4774
|
+
get(params?: Params$Resource$Projects$Locations$Clusters$Instances$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Instance>>;
|
|
3011
4775
|
get(params: Params$Resource$Projects$Locations$Clusters$Instances$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3012
4776
|
get(params: Params$Resource$Projects$Locations$Clusters$Instances$Get, options: MethodOptions | BodyResponseCallback<Schema$Instance>, callback: BodyResponseCallback<Schema$Instance>): void;
|
|
3013
4777
|
get(params: Params$Resource$Projects$Locations$Clusters$Instances$Get, callback: BodyResponseCallback<Schema$Instance>): void;
|
|
3014
4778
|
get(callback: BodyResponseCallback<Schema$Instance>): void;
|
|
3015
4779
|
/**
|
|
3016
4780
|
* Get instance metadata used for a connection.
|
|
4781
|
+
* @example
|
|
4782
|
+
* ```js
|
|
4783
|
+
* // Before running the sample:
|
|
4784
|
+
* // - Enable the API at:
|
|
4785
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4786
|
+
* // - Login into gcloud by running:
|
|
4787
|
+
* // ```sh
|
|
4788
|
+
* // $ gcloud auth application-default login
|
|
4789
|
+
* // ```
|
|
4790
|
+
* // - Install the npm module by running:
|
|
4791
|
+
* // ```sh
|
|
4792
|
+
* // $ npm install googleapis
|
|
4793
|
+
* // ```
|
|
4794
|
+
*
|
|
4795
|
+
* const {google} = require('googleapis');
|
|
4796
|
+
* const alloydb = google.alloydb('v1');
|
|
4797
|
+
*
|
|
4798
|
+
* async function main() {
|
|
4799
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4800
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4801
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4802
|
+
* });
|
|
4803
|
+
*
|
|
4804
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4805
|
+
* const authClient = await auth.getClient();
|
|
4806
|
+
* google.options({auth: authClient});
|
|
4807
|
+
*
|
|
4808
|
+
* // Do the magic
|
|
4809
|
+
* const res =
|
|
4810
|
+
* await alloydb.projects.locations.clusters.instances.getConnectionInfo({
|
|
4811
|
+
* // Required. The name of the parent resource. The required format is: projects/{project\}/locations/{location\}/clusters/{cluster\}/instances/{instance\}
|
|
4812
|
+
* parent:
|
|
4813
|
+
* 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
4814
|
+
* // 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).
|
|
4815
|
+
* requestId: 'placeholder-value',
|
|
4816
|
+
* });
|
|
4817
|
+
* console.log(res.data);
|
|
4818
|
+
*
|
|
4819
|
+
* // Example response
|
|
4820
|
+
* // {
|
|
4821
|
+
* // "instanceUid": "my_instanceUid",
|
|
4822
|
+
* // "ipAddress": "my_ipAddress",
|
|
4823
|
+
* // "name": "my_name",
|
|
4824
|
+
* // "publicIpAddress": "my_publicIpAddress"
|
|
4825
|
+
* // }
|
|
4826
|
+
* }
|
|
4827
|
+
*
|
|
4828
|
+
* main().catch(e => {
|
|
4829
|
+
* console.error(e);
|
|
4830
|
+
* throw e;
|
|
4831
|
+
* });
|
|
4832
|
+
*
|
|
4833
|
+
* ```
|
|
3017
4834
|
*
|
|
3018
4835
|
* @param params - Parameters for request
|
|
3019
4836
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3020
4837
|
* @param callback - Optional callback that handles the response.
|
|
3021
4838
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3022
4839
|
*/
|
|
3023
|
-
getConnectionInfo(params: Params$Resource$Projects$Locations$Clusters$Instances$Getconnectioninfo, options: StreamMethodOptions):
|
|
3024
|
-
getConnectionInfo(params?: Params$Resource$Projects$Locations$Clusters$Instances$Getconnectioninfo, options?: MethodOptions):
|
|
4840
|
+
getConnectionInfo(params: Params$Resource$Projects$Locations$Clusters$Instances$Getconnectioninfo, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4841
|
+
getConnectionInfo(params?: Params$Resource$Projects$Locations$Clusters$Instances$Getconnectioninfo, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ConnectionInfo>>;
|
|
3025
4842
|
getConnectionInfo(params: Params$Resource$Projects$Locations$Clusters$Instances$Getconnectioninfo, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3026
4843
|
getConnectionInfo(params: Params$Resource$Projects$Locations$Clusters$Instances$Getconnectioninfo, options: MethodOptions | BodyResponseCallback<Schema$ConnectionInfo>, callback: BodyResponseCallback<Schema$ConnectionInfo>): void;
|
|
3027
4844
|
getConnectionInfo(params: Params$Resource$Projects$Locations$Clusters$Instances$Getconnectioninfo, callback: BodyResponseCallback<Schema$ConnectionInfo>): void;
|
|
3028
4845
|
getConnectionInfo(callback: BodyResponseCallback<Schema$ConnectionInfo>): void;
|
|
3029
4846
|
/**
|
|
3030
4847
|
* Injects fault in an instance. Imperative only.
|
|
4848
|
+
* @example
|
|
4849
|
+
* ```js
|
|
4850
|
+
* // Before running the sample:
|
|
4851
|
+
* // - Enable the API at:
|
|
4852
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4853
|
+
* // - Login into gcloud by running:
|
|
4854
|
+
* // ```sh
|
|
4855
|
+
* // $ gcloud auth application-default login
|
|
4856
|
+
* // ```
|
|
4857
|
+
* // - Install the npm module by running:
|
|
4858
|
+
* // ```sh
|
|
4859
|
+
* // $ npm install googleapis
|
|
4860
|
+
* // ```
|
|
4861
|
+
*
|
|
4862
|
+
* const {google} = require('googleapis');
|
|
4863
|
+
* const alloydb = google.alloydb('v1');
|
|
4864
|
+
*
|
|
4865
|
+
* async function main() {
|
|
4866
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4867
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4868
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4869
|
+
* });
|
|
4870
|
+
*
|
|
4871
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4872
|
+
* const authClient = await auth.getClient();
|
|
4873
|
+
* google.options({auth: authClient});
|
|
4874
|
+
*
|
|
4875
|
+
* // Do the magic
|
|
4876
|
+
* const res = await alloydb.projects.locations.clusters.instances.injectFault({
|
|
4877
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
4878
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
4879
|
+
*
|
|
4880
|
+
* // Request body metadata
|
|
4881
|
+
* requestBody: {
|
|
4882
|
+
* // request body parameters
|
|
4883
|
+
* // {
|
|
4884
|
+
* // "faultType": "my_faultType",
|
|
4885
|
+
* // "requestId": "my_requestId",
|
|
4886
|
+
* // "validateOnly": false
|
|
4887
|
+
* // }
|
|
4888
|
+
* },
|
|
4889
|
+
* });
|
|
4890
|
+
* console.log(res.data);
|
|
4891
|
+
*
|
|
4892
|
+
* // Example response
|
|
4893
|
+
* // {
|
|
4894
|
+
* // "done": false,
|
|
4895
|
+
* // "error": {},
|
|
4896
|
+
* // "metadata": {},
|
|
4897
|
+
* // "name": "my_name",
|
|
4898
|
+
* // "response": {}
|
|
4899
|
+
* // }
|
|
4900
|
+
* }
|
|
4901
|
+
*
|
|
4902
|
+
* main().catch(e => {
|
|
4903
|
+
* console.error(e);
|
|
4904
|
+
* throw e;
|
|
4905
|
+
* });
|
|
4906
|
+
*
|
|
4907
|
+
* ```
|
|
3031
4908
|
*
|
|
3032
4909
|
* @param params - Parameters for request
|
|
3033
4910
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3034
4911
|
* @param callback - Optional callback that handles the response.
|
|
3035
4912
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3036
4913
|
*/
|
|
3037
|
-
injectFault(params: Params$Resource$Projects$Locations$Clusters$Instances$Injectfault, options: StreamMethodOptions):
|
|
3038
|
-
injectFault(params?: Params$Resource$Projects$Locations$Clusters$Instances$Injectfault, options?: MethodOptions):
|
|
4914
|
+
injectFault(params: Params$Resource$Projects$Locations$Clusters$Instances$Injectfault, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4915
|
+
injectFault(params?: Params$Resource$Projects$Locations$Clusters$Instances$Injectfault, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
3039
4916
|
injectFault(params: Params$Resource$Projects$Locations$Clusters$Instances$Injectfault, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3040
4917
|
injectFault(params: Params$Resource$Projects$Locations$Clusters$Instances$Injectfault, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3041
4918
|
injectFault(params: Params$Resource$Projects$Locations$Clusters$Instances$Injectfault, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3042
4919
|
injectFault(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3043
4920
|
/**
|
|
3044
4921
|
* Lists Instances in a given project and location.
|
|
4922
|
+
* @example
|
|
4923
|
+
* ```js
|
|
4924
|
+
* // Before running the sample:
|
|
4925
|
+
* // - Enable the API at:
|
|
4926
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4927
|
+
* // - Login into gcloud by running:
|
|
4928
|
+
* // ```sh
|
|
4929
|
+
* // $ gcloud auth application-default login
|
|
4930
|
+
* // ```
|
|
4931
|
+
* // - Install the npm module by running:
|
|
4932
|
+
* // ```sh
|
|
4933
|
+
* // $ npm install googleapis
|
|
4934
|
+
* // ```
|
|
4935
|
+
*
|
|
4936
|
+
* const {google} = require('googleapis');
|
|
4937
|
+
* const alloydb = google.alloydb('v1');
|
|
4938
|
+
*
|
|
4939
|
+
* async function main() {
|
|
4940
|
+
* const auth = new google.auth.GoogleAuth({
|
|
4941
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4942
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
4943
|
+
* });
|
|
4944
|
+
*
|
|
4945
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
4946
|
+
* const authClient = await auth.getClient();
|
|
4947
|
+
* google.options({auth: authClient});
|
|
4948
|
+
*
|
|
4949
|
+
* // Do the magic
|
|
4950
|
+
* const res = await alloydb.projects.locations.clusters.instances.list({
|
|
4951
|
+
* // Optional. Filtering results
|
|
4952
|
+
* filter: 'placeholder-value',
|
|
4953
|
+
* // Optional. Hint for how to order the results
|
|
4954
|
+
* orderBy: 'placeholder-value',
|
|
4955
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
4956
|
+
* pageSize: 'placeholder-value',
|
|
4957
|
+
* // A token identifying a page of results the server should return.
|
|
4958
|
+
* pageToken: 'placeholder-value',
|
|
4959
|
+
* // 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/-
|
|
4960
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
4961
|
+
* });
|
|
4962
|
+
* console.log(res.data);
|
|
4963
|
+
*
|
|
4964
|
+
* // Example response
|
|
4965
|
+
* // {
|
|
4966
|
+
* // "instances": [],
|
|
4967
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
4968
|
+
* // "unreachable": []
|
|
4969
|
+
* // }
|
|
4970
|
+
* }
|
|
4971
|
+
*
|
|
4972
|
+
* main().catch(e => {
|
|
4973
|
+
* console.error(e);
|
|
4974
|
+
* throw e;
|
|
4975
|
+
* });
|
|
4976
|
+
*
|
|
4977
|
+
* ```
|
|
3045
4978
|
*
|
|
3046
4979
|
* @param params - Parameters for request
|
|
3047
4980
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3048
4981
|
* @param callback - Optional callback that handles the response.
|
|
3049
4982
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3050
4983
|
*/
|
|
3051
|
-
list(params: Params$Resource$Projects$Locations$Clusters$Instances$List, options: StreamMethodOptions):
|
|
3052
|
-
list(params?: Params$Resource$Projects$Locations$Clusters$Instances$List, options?: MethodOptions):
|
|
4984
|
+
list(params: Params$Resource$Projects$Locations$Clusters$Instances$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
4985
|
+
list(params?: Params$Resource$Projects$Locations$Clusters$Instances$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListInstancesResponse>>;
|
|
3053
4986
|
list(params: Params$Resource$Projects$Locations$Clusters$Instances$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3054
4987
|
list(params: Params$Resource$Projects$Locations$Clusters$Instances$List, options: MethodOptions | BodyResponseCallback<Schema$ListInstancesResponse>, callback: BodyResponseCallback<Schema$ListInstancesResponse>): void;
|
|
3055
4988
|
list(params: Params$Resource$Projects$Locations$Clusters$Instances$List, callback: BodyResponseCallback<Schema$ListInstancesResponse>): void;
|
|
3056
4989
|
list(callback: BodyResponseCallback<Schema$ListInstancesResponse>): void;
|
|
3057
4990
|
/**
|
|
3058
4991
|
* Updates the parameters of a single Instance.
|
|
4992
|
+
* @example
|
|
4993
|
+
* ```js
|
|
4994
|
+
* // Before running the sample:
|
|
4995
|
+
* // - Enable the API at:
|
|
4996
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
4997
|
+
* // - Login into gcloud by running:
|
|
4998
|
+
* // ```sh
|
|
4999
|
+
* // $ gcloud auth application-default login
|
|
5000
|
+
* // ```
|
|
5001
|
+
* // - Install the npm module by running:
|
|
5002
|
+
* // ```sh
|
|
5003
|
+
* // $ npm install googleapis
|
|
5004
|
+
* // ```
|
|
5005
|
+
*
|
|
5006
|
+
* const {google} = require('googleapis');
|
|
5007
|
+
* const alloydb = google.alloydb('v1');
|
|
5008
|
+
*
|
|
5009
|
+
* async function main() {
|
|
5010
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5011
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5012
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5013
|
+
* });
|
|
5014
|
+
*
|
|
5015
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5016
|
+
* const authClient = await auth.getClient();
|
|
5017
|
+
* google.options({auth: authClient});
|
|
5018
|
+
*
|
|
5019
|
+
* // Do the magic
|
|
5020
|
+
* const res = await alloydb.projects.locations.clusters.instances.patch({
|
|
5021
|
+
* // 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.
|
|
5022
|
+
* allowMissing: 'placeholder-value',
|
|
5023
|
+
* // 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\}
|
|
5024
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
5025
|
+
* // 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).
|
|
5026
|
+
* requestId: 'placeholder-value',
|
|
5027
|
+
* // 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.
|
|
5028
|
+
* updateMask: 'placeholder-value',
|
|
5029
|
+
* // Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
|
|
5030
|
+
* validateOnly: 'placeholder-value',
|
|
5031
|
+
*
|
|
5032
|
+
* // Request body metadata
|
|
5033
|
+
* requestBody: {
|
|
5034
|
+
* // request body parameters
|
|
5035
|
+
* // {
|
|
5036
|
+
* // "activationPolicy": "my_activationPolicy",
|
|
5037
|
+
* // "annotations": {},
|
|
5038
|
+
* // "availabilityType": "my_availabilityType",
|
|
5039
|
+
* // "clientConnectionConfig": {},
|
|
5040
|
+
* // "createTime": "my_createTime",
|
|
5041
|
+
* // "databaseFlags": {},
|
|
5042
|
+
* // "deleteTime": "my_deleteTime",
|
|
5043
|
+
* // "displayName": "my_displayName",
|
|
5044
|
+
* // "etag": "my_etag",
|
|
5045
|
+
* // "gceZone": "my_gceZone",
|
|
5046
|
+
* // "instanceType": "my_instanceType",
|
|
5047
|
+
* // "ipAddress": "my_ipAddress",
|
|
5048
|
+
* // "labels": {},
|
|
5049
|
+
* // "machineConfig": {},
|
|
5050
|
+
* // "name": "my_name",
|
|
5051
|
+
* // "networkConfig": {},
|
|
5052
|
+
* // "nodes": [],
|
|
5053
|
+
* // "observabilityConfig": {},
|
|
5054
|
+
* // "outboundPublicIpAddresses": [],
|
|
5055
|
+
* // "pscInstanceConfig": {},
|
|
5056
|
+
* // "publicIpAddress": "my_publicIpAddress",
|
|
5057
|
+
* // "queryInsightsConfig": {},
|
|
5058
|
+
* // "readPoolConfig": {},
|
|
5059
|
+
* // "reconciling": false,
|
|
5060
|
+
* // "satisfiesPzs": false,
|
|
5061
|
+
* // "state": "my_state",
|
|
5062
|
+
* // "uid": "my_uid",
|
|
5063
|
+
* // "updateTime": "my_updateTime",
|
|
5064
|
+
* // "writableNode": {}
|
|
5065
|
+
* // }
|
|
5066
|
+
* },
|
|
5067
|
+
* });
|
|
5068
|
+
* console.log(res.data);
|
|
5069
|
+
*
|
|
5070
|
+
* // Example response
|
|
5071
|
+
* // {
|
|
5072
|
+
* // "done": false,
|
|
5073
|
+
* // "error": {},
|
|
5074
|
+
* // "metadata": {},
|
|
5075
|
+
* // "name": "my_name",
|
|
5076
|
+
* // "response": {}
|
|
5077
|
+
* // }
|
|
5078
|
+
* }
|
|
5079
|
+
*
|
|
5080
|
+
* main().catch(e => {
|
|
5081
|
+
* console.error(e);
|
|
5082
|
+
* throw e;
|
|
5083
|
+
* });
|
|
5084
|
+
*
|
|
5085
|
+
* ```
|
|
3059
5086
|
*
|
|
3060
5087
|
* @param params - Parameters for request
|
|
3061
5088
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3062
5089
|
* @param callback - Optional callback that handles the response.
|
|
3063
5090
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3064
5091
|
*/
|
|
3065
|
-
patch(params: Params$Resource$Projects$Locations$Clusters$Instances$Patch, options: StreamMethodOptions):
|
|
3066
|
-
patch(params?: Params$Resource$Projects$Locations$Clusters$Instances$Patch, options?: MethodOptions):
|
|
5092
|
+
patch(params: Params$Resource$Projects$Locations$Clusters$Instances$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5093
|
+
patch(params?: Params$Resource$Projects$Locations$Clusters$Instances$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
3067
5094
|
patch(params: Params$Resource$Projects$Locations$Clusters$Instances$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3068
5095
|
patch(params: Params$Resource$Projects$Locations$Clusters$Instances$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3069
5096
|
patch(params: Params$Resource$Projects$Locations$Clusters$Instances$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3070
5097
|
patch(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3071
5098
|
/**
|
|
3072
5099
|
* Restart an Instance in a cluster. Imperative only.
|
|
5100
|
+
* @example
|
|
5101
|
+
* ```js
|
|
5102
|
+
* // Before running the sample:
|
|
5103
|
+
* // - Enable the API at:
|
|
5104
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5105
|
+
* // - Login into gcloud by running:
|
|
5106
|
+
* // ```sh
|
|
5107
|
+
* // $ gcloud auth application-default login
|
|
5108
|
+
* // ```
|
|
5109
|
+
* // - Install the npm module by running:
|
|
5110
|
+
* // ```sh
|
|
5111
|
+
* // $ npm install googleapis
|
|
5112
|
+
* // ```
|
|
5113
|
+
*
|
|
5114
|
+
* const {google} = require('googleapis');
|
|
5115
|
+
* const alloydb = google.alloydb('v1');
|
|
5116
|
+
*
|
|
5117
|
+
* async function main() {
|
|
5118
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5119
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5120
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5121
|
+
* });
|
|
5122
|
+
*
|
|
5123
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5124
|
+
* const authClient = await auth.getClient();
|
|
5125
|
+
* google.options({auth: authClient});
|
|
5126
|
+
*
|
|
5127
|
+
* // Do the magic
|
|
5128
|
+
* const res = await alloydb.projects.locations.clusters.instances.restart({
|
|
5129
|
+
* // Required. The name of the resource. For the required format, see the comment on the Instance.name field.
|
|
5130
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/instances/my-instance',
|
|
5131
|
+
*
|
|
5132
|
+
* // Request body metadata
|
|
5133
|
+
* requestBody: {
|
|
5134
|
+
* // request body parameters
|
|
5135
|
+
* // {
|
|
5136
|
+
* // "nodeIds": [],
|
|
5137
|
+
* // "requestId": "my_requestId",
|
|
5138
|
+
* // "validateOnly": false
|
|
5139
|
+
* // }
|
|
5140
|
+
* },
|
|
5141
|
+
* });
|
|
5142
|
+
* console.log(res.data);
|
|
5143
|
+
*
|
|
5144
|
+
* // Example response
|
|
5145
|
+
* // {
|
|
5146
|
+
* // "done": false,
|
|
5147
|
+
* // "error": {},
|
|
5148
|
+
* // "metadata": {},
|
|
5149
|
+
* // "name": "my_name",
|
|
5150
|
+
* // "response": {}
|
|
5151
|
+
* // }
|
|
5152
|
+
* }
|
|
5153
|
+
*
|
|
5154
|
+
* main().catch(e => {
|
|
5155
|
+
* console.error(e);
|
|
5156
|
+
* throw e;
|
|
5157
|
+
* });
|
|
5158
|
+
*
|
|
5159
|
+
* ```
|
|
3073
5160
|
*
|
|
3074
5161
|
* @param params - Parameters for request
|
|
3075
5162
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3076
5163
|
* @param callback - Optional callback that handles the response.
|
|
3077
5164
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3078
5165
|
*/
|
|
3079
|
-
restart(params: Params$Resource$Projects$Locations$Clusters$Instances$Restart, options: StreamMethodOptions):
|
|
3080
|
-
restart(params?: Params$Resource$Projects$Locations$Clusters$Instances$Restart, options?: MethodOptions):
|
|
5166
|
+
restart(params: Params$Resource$Projects$Locations$Clusters$Instances$Restart, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5167
|
+
restart(params?: Params$Resource$Projects$Locations$Clusters$Instances$Restart, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
3081
5168
|
restart(params: Params$Resource$Projects$Locations$Clusters$Instances$Restart, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3082
5169
|
restart(params: Params$Resource$Projects$Locations$Clusters$Instances$Restart, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3083
5170
|
restart(params: Params$Resource$Projects$Locations$Clusters$Instances$Restart, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
@@ -3248,70 +5335,362 @@ export declare namespace alloydb_v1 {
|
|
|
3248
5335
|
constructor(context: APIRequestContext);
|
|
3249
5336
|
/**
|
|
3250
5337
|
* Creates a new User in a given project, location, and cluster.
|
|
5338
|
+
* @example
|
|
5339
|
+
* ```js
|
|
5340
|
+
* // Before running the sample:
|
|
5341
|
+
* // - Enable the API at:
|
|
5342
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5343
|
+
* // - Login into gcloud by running:
|
|
5344
|
+
* // ```sh
|
|
5345
|
+
* // $ gcloud auth application-default login
|
|
5346
|
+
* // ```
|
|
5347
|
+
* // - Install the npm module by running:
|
|
5348
|
+
* // ```sh
|
|
5349
|
+
* // $ npm install googleapis
|
|
5350
|
+
* // ```
|
|
5351
|
+
*
|
|
5352
|
+
* const {google} = require('googleapis');
|
|
5353
|
+
* const alloydb = google.alloydb('v1');
|
|
5354
|
+
*
|
|
5355
|
+
* async function main() {
|
|
5356
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5357
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5358
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5359
|
+
* });
|
|
5360
|
+
*
|
|
5361
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5362
|
+
* const authClient = await auth.getClient();
|
|
5363
|
+
* google.options({auth: authClient});
|
|
5364
|
+
*
|
|
5365
|
+
* // Do the magic
|
|
5366
|
+
* const res = await alloydb.projects.locations.clusters.users.create({
|
|
5367
|
+
* // Required. Value for parent.
|
|
5368
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5369
|
+
* // 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).
|
|
5370
|
+
* requestId: 'placeholder-value',
|
|
5371
|
+
* // Required. ID of the requesting object.
|
|
5372
|
+
* userId: 'placeholder-value',
|
|
5373
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
5374
|
+
* validateOnly: 'placeholder-value',
|
|
5375
|
+
*
|
|
5376
|
+
* // Request body metadata
|
|
5377
|
+
* requestBody: {
|
|
5378
|
+
* // request body parameters
|
|
5379
|
+
* // {
|
|
5380
|
+
* // "databaseRoles": [],
|
|
5381
|
+
* // "keepExtraRoles": false,
|
|
5382
|
+
* // "name": "my_name",
|
|
5383
|
+
* // "password": "my_password",
|
|
5384
|
+
* // "userType": "my_userType"
|
|
5385
|
+
* // }
|
|
5386
|
+
* },
|
|
5387
|
+
* });
|
|
5388
|
+
* console.log(res.data);
|
|
5389
|
+
*
|
|
5390
|
+
* // Example response
|
|
5391
|
+
* // {
|
|
5392
|
+
* // "databaseRoles": [],
|
|
5393
|
+
* // "keepExtraRoles": false,
|
|
5394
|
+
* // "name": "my_name",
|
|
5395
|
+
* // "password": "my_password",
|
|
5396
|
+
* // "userType": "my_userType"
|
|
5397
|
+
* // }
|
|
5398
|
+
* }
|
|
5399
|
+
*
|
|
5400
|
+
* main().catch(e => {
|
|
5401
|
+
* console.error(e);
|
|
5402
|
+
* throw e;
|
|
5403
|
+
* });
|
|
5404
|
+
*
|
|
5405
|
+
* ```
|
|
3251
5406
|
*
|
|
3252
5407
|
* @param params - Parameters for request
|
|
3253
5408
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3254
5409
|
* @param callback - Optional callback that handles the response.
|
|
3255
5410
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3256
5411
|
*/
|
|
3257
|
-
create(params: Params$Resource$Projects$Locations$Clusters$Users$Create, options: StreamMethodOptions):
|
|
3258
|
-
create(params?: Params$Resource$Projects$Locations$Clusters$Users$Create, options?: MethodOptions):
|
|
5412
|
+
create(params: Params$Resource$Projects$Locations$Clusters$Users$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5413
|
+
create(params?: Params$Resource$Projects$Locations$Clusters$Users$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$User>>;
|
|
3259
5414
|
create(params: Params$Resource$Projects$Locations$Clusters$Users$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3260
5415
|
create(params: Params$Resource$Projects$Locations$Clusters$Users$Create, options: MethodOptions | BodyResponseCallback<Schema$User>, callback: BodyResponseCallback<Schema$User>): void;
|
|
3261
5416
|
create(params: Params$Resource$Projects$Locations$Clusters$Users$Create, callback: BodyResponseCallback<Schema$User>): void;
|
|
3262
5417
|
create(callback: BodyResponseCallback<Schema$User>): void;
|
|
3263
5418
|
/**
|
|
3264
5419
|
* Deletes a single User.
|
|
5420
|
+
* @example
|
|
5421
|
+
* ```js
|
|
5422
|
+
* // Before running the sample:
|
|
5423
|
+
* // - Enable the API at:
|
|
5424
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5425
|
+
* // - Login into gcloud by running:
|
|
5426
|
+
* // ```sh
|
|
5427
|
+
* // $ gcloud auth application-default login
|
|
5428
|
+
* // ```
|
|
5429
|
+
* // - Install the npm module by running:
|
|
5430
|
+
* // ```sh
|
|
5431
|
+
* // $ npm install googleapis
|
|
5432
|
+
* // ```
|
|
5433
|
+
*
|
|
5434
|
+
* const {google} = require('googleapis');
|
|
5435
|
+
* const alloydb = google.alloydb('v1');
|
|
5436
|
+
*
|
|
5437
|
+
* async function main() {
|
|
5438
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5439
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5440
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5441
|
+
* });
|
|
5442
|
+
*
|
|
5443
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5444
|
+
* const authClient = await auth.getClient();
|
|
5445
|
+
* google.options({auth: authClient});
|
|
5446
|
+
*
|
|
5447
|
+
* // Do the magic
|
|
5448
|
+
* const res = await alloydb.projects.locations.clusters.users.delete({
|
|
5449
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
5450
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
5451
|
+
* // 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).
|
|
5452
|
+
* requestId: 'placeholder-value',
|
|
5453
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
5454
|
+
* validateOnly: 'placeholder-value',
|
|
5455
|
+
* });
|
|
5456
|
+
* console.log(res.data);
|
|
5457
|
+
*
|
|
5458
|
+
* // Example response
|
|
5459
|
+
* // {}
|
|
5460
|
+
* }
|
|
5461
|
+
*
|
|
5462
|
+
* main().catch(e => {
|
|
5463
|
+
* console.error(e);
|
|
5464
|
+
* throw e;
|
|
5465
|
+
* });
|
|
5466
|
+
*
|
|
5467
|
+
* ```
|
|
3265
5468
|
*
|
|
3266
5469
|
* @param params - Parameters for request
|
|
3267
5470
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3268
5471
|
* @param callback - Optional callback that handles the response.
|
|
3269
5472
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3270
5473
|
*/
|
|
3271
|
-
delete(params: Params$Resource$Projects$Locations$Clusters$Users$Delete, options: StreamMethodOptions):
|
|
3272
|
-
delete(params?: Params$Resource$Projects$Locations$Clusters$Users$Delete, options?: MethodOptions):
|
|
5474
|
+
delete(params: Params$Resource$Projects$Locations$Clusters$Users$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5475
|
+
delete(params?: Params$Resource$Projects$Locations$Clusters$Users$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
3273
5476
|
delete(params: Params$Resource$Projects$Locations$Clusters$Users$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3274
5477
|
delete(params: Params$Resource$Projects$Locations$Clusters$Users$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3275
5478
|
delete(params: Params$Resource$Projects$Locations$Clusters$Users$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3276
5479
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3277
5480
|
/**
|
|
3278
5481
|
* Gets details of a single User.
|
|
5482
|
+
* @example
|
|
5483
|
+
* ```js
|
|
5484
|
+
* // Before running the sample:
|
|
5485
|
+
* // - Enable the API at:
|
|
5486
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5487
|
+
* // - Login into gcloud by running:
|
|
5488
|
+
* // ```sh
|
|
5489
|
+
* // $ gcloud auth application-default login
|
|
5490
|
+
* // ```
|
|
5491
|
+
* // - Install the npm module by running:
|
|
5492
|
+
* // ```sh
|
|
5493
|
+
* // $ npm install googleapis
|
|
5494
|
+
* // ```
|
|
5495
|
+
*
|
|
5496
|
+
* const {google} = require('googleapis');
|
|
5497
|
+
* const alloydb = google.alloydb('v1');
|
|
5498
|
+
*
|
|
5499
|
+
* async function main() {
|
|
5500
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5501
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5502
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5503
|
+
* });
|
|
5504
|
+
*
|
|
5505
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5506
|
+
* const authClient = await auth.getClient();
|
|
5507
|
+
* google.options({auth: authClient});
|
|
5508
|
+
*
|
|
5509
|
+
* // Do the magic
|
|
5510
|
+
* const res = await alloydb.projects.locations.clusters.users.get({
|
|
5511
|
+
* // Required. The name of the resource. For the required format, see the comment on the User.name field.
|
|
5512
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
5513
|
+
* });
|
|
5514
|
+
* console.log(res.data);
|
|
5515
|
+
*
|
|
5516
|
+
* // Example response
|
|
5517
|
+
* // {
|
|
5518
|
+
* // "databaseRoles": [],
|
|
5519
|
+
* // "keepExtraRoles": false,
|
|
5520
|
+
* // "name": "my_name",
|
|
5521
|
+
* // "password": "my_password",
|
|
5522
|
+
* // "userType": "my_userType"
|
|
5523
|
+
* // }
|
|
5524
|
+
* }
|
|
5525
|
+
*
|
|
5526
|
+
* main().catch(e => {
|
|
5527
|
+
* console.error(e);
|
|
5528
|
+
* throw e;
|
|
5529
|
+
* });
|
|
5530
|
+
*
|
|
5531
|
+
* ```
|
|
3279
5532
|
*
|
|
3280
5533
|
* @param params - Parameters for request
|
|
3281
5534
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3282
5535
|
* @param callback - Optional callback that handles the response.
|
|
3283
5536
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3284
5537
|
*/
|
|
3285
|
-
get(params: Params$Resource$Projects$Locations$Clusters$Users$Get, options: StreamMethodOptions):
|
|
3286
|
-
get(params?: Params$Resource$Projects$Locations$Clusters$Users$Get, options?: MethodOptions):
|
|
5538
|
+
get(params: Params$Resource$Projects$Locations$Clusters$Users$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5539
|
+
get(params?: Params$Resource$Projects$Locations$Clusters$Users$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$User>>;
|
|
3287
5540
|
get(params: Params$Resource$Projects$Locations$Clusters$Users$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3288
5541
|
get(params: Params$Resource$Projects$Locations$Clusters$Users$Get, options: MethodOptions | BodyResponseCallback<Schema$User>, callback: BodyResponseCallback<Schema$User>): void;
|
|
3289
5542
|
get(params: Params$Resource$Projects$Locations$Clusters$Users$Get, callback: BodyResponseCallback<Schema$User>): void;
|
|
3290
5543
|
get(callback: BodyResponseCallback<Schema$User>): void;
|
|
3291
5544
|
/**
|
|
3292
5545
|
* Lists Users in a given project and location.
|
|
5546
|
+
* @example
|
|
5547
|
+
* ```js
|
|
5548
|
+
* // Before running the sample:
|
|
5549
|
+
* // - Enable the API at:
|
|
5550
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5551
|
+
* // - Login into gcloud by running:
|
|
5552
|
+
* // ```sh
|
|
5553
|
+
* // $ gcloud auth application-default login
|
|
5554
|
+
* // ```
|
|
5555
|
+
* // - Install the npm module by running:
|
|
5556
|
+
* // ```sh
|
|
5557
|
+
* // $ npm install googleapis
|
|
5558
|
+
* // ```
|
|
5559
|
+
*
|
|
5560
|
+
* const {google} = require('googleapis');
|
|
5561
|
+
* const alloydb = google.alloydb('v1');
|
|
5562
|
+
*
|
|
5563
|
+
* async function main() {
|
|
5564
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5565
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5566
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5567
|
+
* });
|
|
5568
|
+
*
|
|
5569
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5570
|
+
* const authClient = await auth.getClient();
|
|
5571
|
+
* google.options({auth: authClient});
|
|
5572
|
+
*
|
|
5573
|
+
* // Do the magic
|
|
5574
|
+
* const res = await alloydb.projects.locations.clusters.users.list({
|
|
5575
|
+
* // Optional. Filtering results
|
|
5576
|
+
* filter: 'placeholder-value',
|
|
5577
|
+
* // Optional. Hint for how to order the results
|
|
5578
|
+
* orderBy: 'placeholder-value',
|
|
5579
|
+
* // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
5580
|
+
* pageSize: 'placeholder-value',
|
|
5581
|
+
* // Optional. A token identifying a page of results the server should return.
|
|
5582
|
+
* pageToken: 'placeholder-value',
|
|
5583
|
+
* // Required. Parent value for ListUsersRequest
|
|
5584
|
+
* parent: 'projects/my-project/locations/my-location/clusters/my-cluster',
|
|
5585
|
+
* });
|
|
5586
|
+
* console.log(res.data);
|
|
5587
|
+
*
|
|
5588
|
+
* // Example response
|
|
5589
|
+
* // {
|
|
5590
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
5591
|
+
* // "unreachable": [],
|
|
5592
|
+
* // "users": []
|
|
5593
|
+
* // }
|
|
5594
|
+
* }
|
|
5595
|
+
*
|
|
5596
|
+
* main().catch(e => {
|
|
5597
|
+
* console.error(e);
|
|
5598
|
+
* throw e;
|
|
5599
|
+
* });
|
|
5600
|
+
*
|
|
5601
|
+
* ```
|
|
3293
5602
|
*
|
|
3294
5603
|
* @param params - Parameters for request
|
|
3295
5604
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3296
5605
|
* @param callback - Optional callback that handles the response.
|
|
3297
5606
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3298
5607
|
*/
|
|
3299
|
-
list(params: Params$Resource$Projects$Locations$Clusters$Users$List, options: StreamMethodOptions):
|
|
3300
|
-
list(params?: Params$Resource$Projects$Locations$Clusters$Users$List, options?: MethodOptions):
|
|
5608
|
+
list(params: Params$Resource$Projects$Locations$Clusters$Users$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5609
|
+
list(params?: Params$Resource$Projects$Locations$Clusters$Users$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListUsersResponse>>;
|
|
3301
5610
|
list(params: Params$Resource$Projects$Locations$Clusters$Users$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3302
5611
|
list(params: Params$Resource$Projects$Locations$Clusters$Users$List, options: MethodOptions | BodyResponseCallback<Schema$ListUsersResponse>, callback: BodyResponseCallback<Schema$ListUsersResponse>): void;
|
|
3303
5612
|
list(params: Params$Resource$Projects$Locations$Clusters$Users$List, callback: BodyResponseCallback<Schema$ListUsersResponse>): void;
|
|
3304
5613
|
list(callback: BodyResponseCallback<Schema$ListUsersResponse>): void;
|
|
3305
5614
|
/**
|
|
3306
5615
|
* Updates the parameters of a single User.
|
|
5616
|
+
* @example
|
|
5617
|
+
* ```js
|
|
5618
|
+
* // Before running the sample:
|
|
5619
|
+
* // - Enable the API at:
|
|
5620
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5621
|
+
* // - Login into gcloud by running:
|
|
5622
|
+
* // ```sh
|
|
5623
|
+
* // $ gcloud auth application-default login
|
|
5624
|
+
* // ```
|
|
5625
|
+
* // - Install the npm module by running:
|
|
5626
|
+
* // ```sh
|
|
5627
|
+
* // $ npm install googleapis
|
|
5628
|
+
* // ```
|
|
5629
|
+
*
|
|
5630
|
+
* const {google} = require('googleapis');
|
|
5631
|
+
* const alloydb = google.alloydb('v1');
|
|
5632
|
+
*
|
|
5633
|
+
* async function main() {
|
|
5634
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5635
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5636
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5637
|
+
* });
|
|
5638
|
+
*
|
|
5639
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5640
|
+
* const authClient = await auth.getClient();
|
|
5641
|
+
* google.options({auth: authClient});
|
|
5642
|
+
*
|
|
5643
|
+
* // Do the magic
|
|
5644
|
+
* const res = await alloydb.projects.locations.clusters.users.patch({
|
|
5645
|
+
* // Optional. Allow missing fields in the update mask.
|
|
5646
|
+
* allowMissing: 'placeholder-value',
|
|
5647
|
+
* // Output only. Name of the resource in the form of projects/{project\}/locations/{location\}/cluster/{cluster\}/users/{user\}.
|
|
5648
|
+
* name: 'projects/my-project/locations/my-location/clusters/my-cluster/users/my-user',
|
|
5649
|
+
* // 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).
|
|
5650
|
+
* requestId: 'placeholder-value',
|
|
5651
|
+
* // 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.
|
|
5652
|
+
* updateMask: 'placeholder-value',
|
|
5653
|
+
* // Optional. If set, the backend validates the request, but doesn't actually execute it.
|
|
5654
|
+
* validateOnly: 'placeholder-value',
|
|
5655
|
+
*
|
|
5656
|
+
* // Request body metadata
|
|
5657
|
+
* requestBody: {
|
|
5658
|
+
* // request body parameters
|
|
5659
|
+
* // {
|
|
5660
|
+
* // "databaseRoles": [],
|
|
5661
|
+
* // "keepExtraRoles": false,
|
|
5662
|
+
* // "name": "my_name",
|
|
5663
|
+
* // "password": "my_password",
|
|
5664
|
+
* // "userType": "my_userType"
|
|
5665
|
+
* // }
|
|
5666
|
+
* },
|
|
5667
|
+
* });
|
|
5668
|
+
* console.log(res.data);
|
|
5669
|
+
*
|
|
5670
|
+
* // Example response
|
|
5671
|
+
* // {
|
|
5672
|
+
* // "databaseRoles": [],
|
|
5673
|
+
* // "keepExtraRoles": false,
|
|
5674
|
+
* // "name": "my_name",
|
|
5675
|
+
* // "password": "my_password",
|
|
5676
|
+
* // "userType": "my_userType"
|
|
5677
|
+
* // }
|
|
5678
|
+
* }
|
|
5679
|
+
*
|
|
5680
|
+
* main().catch(e => {
|
|
5681
|
+
* console.error(e);
|
|
5682
|
+
* throw e;
|
|
5683
|
+
* });
|
|
5684
|
+
*
|
|
5685
|
+
* ```
|
|
3307
5686
|
*
|
|
3308
5687
|
* @param params - Parameters for request
|
|
3309
5688
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3310
5689
|
* @param callback - Optional callback that handles the response.
|
|
3311
5690
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3312
5691
|
*/
|
|
3313
|
-
patch(params: Params$Resource$Projects$Locations$Clusters$Users$Patch, options: StreamMethodOptions):
|
|
3314
|
-
patch(params?: Params$Resource$Projects$Locations$Clusters$Users$Patch, options?: MethodOptions):
|
|
5692
|
+
patch(params: Params$Resource$Projects$Locations$Clusters$Users$Patch, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5693
|
+
patch(params?: Params$Resource$Projects$Locations$Clusters$Users$Patch, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$User>>;
|
|
3315
5694
|
patch(params: Params$Resource$Projects$Locations$Clusters$Users$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3316
5695
|
patch(params: Params$Resource$Projects$Locations$Clusters$Users$Patch, options: MethodOptions | BodyResponseCallback<Schema$User>, callback: BodyResponseCallback<Schema$User>): void;
|
|
3317
5696
|
patch(params: Params$Resource$Projects$Locations$Clusters$Users$Patch, callback: BodyResponseCallback<Schema$User>): void;
|
|
@@ -3412,56 +5791,253 @@ export declare namespace alloydb_v1 {
|
|
|
3412
5791
|
constructor(context: APIRequestContext);
|
|
3413
5792
|
/**
|
|
3414
5793
|
* 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`.
|
|
5794
|
+
* @example
|
|
5795
|
+
* ```js
|
|
5796
|
+
* // Before running the sample:
|
|
5797
|
+
* // - Enable the API at:
|
|
5798
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5799
|
+
* // - Login into gcloud by running:
|
|
5800
|
+
* // ```sh
|
|
5801
|
+
* // $ gcloud auth application-default login
|
|
5802
|
+
* // ```
|
|
5803
|
+
* // - Install the npm module by running:
|
|
5804
|
+
* // ```sh
|
|
5805
|
+
* // $ npm install googleapis
|
|
5806
|
+
* // ```
|
|
5807
|
+
*
|
|
5808
|
+
* const {google} = require('googleapis');
|
|
5809
|
+
* const alloydb = google.alloydb('v1');
|
|
5810
|
+
*
|
|
5811
|
+
* async function main() {
|
|
5812
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5813
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5814
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5815
|
+
* });
|
|
5816
|
+
*
|
|
5817
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5818
|
+
* const authClient = await auth.getClient();
|
|
5819
|
+
* google.options({auth: authClient});
|
|
5820
|
+
*
|
|
5821
|
+
* // Do the magic
|
|
5822
|
+
* const res = await alloydb.projects.locations.operations.cancel({
|
|
5823
|
+
* // The name of the operation resource to be cancelled.
|
|
5824
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
5825
|
+
*
|
|
5826
|
+
* // Request body metadata
|
|
5827
|
+
* requestBody: {
|
|
5828
|
+
* // request body parameters
|
|
5829
|
+
* // {}
|
|
5830
|
+
* },
|
|
5831
|
+
* });
|
|
5832
|
+
* console.log(res.data);
|
|
5833
|
+
*
|
|
5834
|
+
* // Example response
|
|
5835
|
+
* // {}
|
|
5836
|
+
* }
|
|
5837
|
+
*
|
|
5838
|
+
* main().catch(e => {
|
|
5839
|
+
* console.error(e);
|
|
5840
|
+
* throw e;
|
|
5841
|
+
* });
|
|
5842
|
+
*
|
|
5843
|
+
* ```
|
|
3415
5844
|
*
|
|
3416
5845
|
* @param params - Parameters for request
|
|
3417
5846
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3418
5847
|
* @param callback - Optional callback that handles the response.
|
|
3419
5848
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3420
5849
|
*/
|
|
3421
|
-
cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions):
|
|
3422
|
-
cancel(params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions):
|
|
5850
|
+
cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5851
|
+
cancel(params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
3423
5852
|
cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3424
5853
|
cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3425
5854
|
cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3426
5855
|
cancel(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3427
5856
|
/**
|
|
3428
5857
|
* 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`.
|
|
5858
|
+
* @example
|
|
5859
|
+
* ```js
|
|
5860
|
+
* // Before running the sample:
|
|
5861
|
+
* // - Enable the API at:
|
|
5862
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5863
|
+
* // - Login into gcloud by running:
|
|
5864
|
+
* // ```sh
|
|
5865
|
+
* // $ gcloud auth application-default login
|
|
5866
|
+
* // ```
|
|
5867
|
+
* // - Install the npm module by running:
|
|
5868
|
+
* // ```sh
|
|
5869
|
+
* // $ npm install googleapis
|
|
5870
|
+
* // ```
|
|
5871
|
+
*
|
|
5872
|
+
* const {google} = require('googleapis');
|
|
5873
|
+
* const alloydb = google.alloydb('v1');
|
|
5874
|
+
*
|
|
5875
|
+
* async function main() {
|
|
5876
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5877
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5878
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5879
|
+
* });
|
|
5880
|
+
*
|
|
5881
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5882
|
+
* const authClient = await auth.getClient();
|
|
5883
|
+
* google.options({auth: authClient});
|
|
5884
|
+
*
|
|
5885
|
+
* // Do the magic
|
|
5886
|
+
* const res = await alloydb.projects.locations.operations.delete({
|
|
5887
|
+
* // The name of the operation resource to be deleted.
|
|
5888
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
5889
|
+
* });
|
|
5890
|
+
* console.log(res.data);
|
|
5891
|
+
*
|
|
5892
|
+
* // Example response
|
|
5893
|
+
* // {}
|
|
5894
|
+
* }
|
|
5895
|
+
*
|
|
5896
|
+
* main().catch(e => {
|
|
5897
|
+
* console.error(e);
|
|
5898
|
+
* throw e;
|
|
5899
|
+
* });
|
|
5900
|
+
*
|
|
5901
|
+
* ```
|
|
3429
5902
|
*
|
|
3430
5903
|
* @param params - Parameters for request
|
|
3431
5904
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3432
5905
|
* @param callback - Optional callback that handles the response.
|
|
3433
5906
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3434
5907
|
*/
|
|
3435
|
-
delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions):
|
|
3436
|
-
delete(params?: Params$Resource$Projects$Locations$Operations$Delete, options?: MethodOptions):
|
|
5908
|
+
delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5909
|
+
delete(params?: Params$Resource$Projects$Locations$Operations$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
|
|
3437
5910
|
delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3438
5911
|
delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3439
5912
|
delete(params: Params$Resource$Projects$Locations$Operations$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3440
5913
|
delete(callback: BodyResponseCallback<Schema$Empty>): void;
|
|
3441
5914
|
/**
|
|
3442
5915
|
* 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.
|
|
5916
|
+
* @example
|
|
5917
|
+
* ```js
|
|
5918
|
+
* // Before running the sample:
|
|
5919
|
+
* // - Enable the API at:
|
|
5920
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5921
|
+
* // - Login into gcloud by running:
|
|
5922
|
+
* // ```sh
|
|
5923
|
+
* // $ gcloud auth application-default login
|
|
5924
|
+
* // ```
|
|
5925
|
+
* // - Install the npm module by running:
|
|
5926
|
+
* // ```sh
|
|
5927
|
+
* // $ npm install googleapis
|
|
5928
|
+
* // ```
|
|
5929
|
+
*
|
|
5930
|
+
* const {google} = require('googleapis');
|
|
5931
|
+
* const alloydb = google.alloydb('v1');
|
|
5932
|
+
*
|
|
5933
|
+
* async function main() {
|
|
5934
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5935
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
5936
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
5937
|
+
* });
|
|
5938
|
+
*
|
|
5939
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
5940
|
+
* const authClient = await auth.getClient();
|
|
5941
|
+
* google.options({auth: authClient});
|
|
5942
|
+
*
|
|
5943
|
+
* // Do the magic
|
|
5944
|
+
* const res = await alloydb.projects.locations.operations.get({
|
|
5945
|
+
* // The name of the operation resource.
|
|
5946
|
+
* name: 'projects/my-project/locations/my-location/operations/my-operation',
|
|
5947
|
+
* });
|
|
5948
|
+
* console.log(res.data);
|
|
5949
|
+
*
|
|
5950
|
+
* // Example response
|
|
5951
|
+
* // {
|
|
5952
|
+
* // "done": false,
|
|
5953
|
+
* // "error": {},
|
|
5954
|
+
* // "metadata": {},
|
|
5955
|
+
* // "name": "my_name",
|
|
5956
|
+
* // "response": {}
|
|
5957
|
+
* // }
|
|
5958
|
+
* }
|
|
5959
|
+
*
|
|
5960
|
+
* main().catch(e => {
|
|
5961
|
+
* console.error(e);
|
|
5962
|
+
* throw e;
|
|
5963
|
+
* });
|
|
5964
|
+
*
|
|
5965
|
+
* ```
|
|
3443
5966
|
*
|
|
3444
5967
|
* @param params - Parameters for request
|
|
3445
5968
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3446
5969
|
* @param callback - Optional callback that handles the response.
|
|
3447
5970
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3448
5971
|
*/
|
|
3449
|
-
get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions):
|
|
3450
|
-
get(params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions):
|
|
5972
|
+
get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
5973
|
+
get(params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
|
|
3451
5974
|
get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3452
5975
|
get(params: Params$Resource$Projects$Locations$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3453
5976
|
get(params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3454
5977
|
get(callback: BodyResponseCallback<Schema$Operation>): void;
|
|
3455
5978
|
/**
|
|
3456
5979
|
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
|
|
5980
|
+
* @example
|
|
5981
|
+
* ```js
|
|
5982
|
+
* // Before running the sample:
|
|
5983
|
+
* // - Enable the API at:
|
|
5984
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
5985
|
+
* // - Login into gcloud by running:
|
|
5986
|
+
* // ```sh
|
|
5987
|
+
* // $ gcloud auth application-default login
|
|
5988
|
+
* // ```
|
|
5989
|
+
* // - Install the npm module by running:
|
|
5990
|
+
* // ```sh
|
|
5991
|
+
* // $ npm install googleapis
|
|
5992
|
+
* // ```
|
|
5993
|
+
*
|
|
5994
|
+
* const {google} = require('googleapis');
|
|
5995
|
+
* const alloydb = google.alloydb('v1');
|
|
5996
|
+
*
|
|
5997
|
+
* async function main() {
|
|
5998
|
+
* const auth = new google.auth.GoogleAuth({
|
|
5999
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6000
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6001
|
+
* });
|
|
6002
|
+
*
|
|
6003
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6004
|
+
* const authClient = await auth.getClient();
|
|
6005
|
+
* google.options({auth: authClient});
|
|
6006
|
+
*
|
|
6007
|
+
* // Do the magic
|
|
6008
|
+
* const res = await alloydb.projects.locations.operations.list({
|
|
6009
|
+
* // The standard list filter.
|
|
6010
|
+
* filter: 'placeholder-value',
|
|
6011
|
+
* // The name of the operation's parent resource.
|
|
6012
|
+
* name: 'projects/my-project/locations/my-location',
|
|
6013
|
+
* // The standard list page size.
|
|
6014
|
+
* pageSize: 'placeholder-value',
|
|
6015
|
+
* // The standard list page token.
|
|
6016
|
+
* pageToken: 'placeholder-value',
|
|
6017
|
+
* });
|
|
6018
|
+
* console.log(res.data);
|
|
6019
|
+
*
|
|
6020
|
+
* // Example response
|
|
6021
|
+
* // {
|
|
6022
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
6023
|
+
* // "operations": []
|
|
6024
|
+
* // }
|
|
6025
|
+
* }
|
|
6026
|
+
*
|
|
6027
|
+
* main().catch(e => {
|
|
6028
|
+
* console.error(e);
|
|
6029
|
+
* throw e;
|
|
6030
|
+
* });
|
|
6031
|
+
*
|
|
6032
|
+
* ```
|
|
3457
6033
|
*
|
|
3458
6034
|
* @param params - Parameters for request
|
|
3459
6035
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3460
6036
|
* @param callback - Optional callback that handles the response.
|
|
3461
6037
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3462
6038
|
*/
|
|
3463
|
-
list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions):
|
|
3464
|
-
list(params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions):
|
|
6039
|
+
list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6040
|
+
list(params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
|
|
3465
6041
|
list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3466
6042
|
list(params: Params$Resource$Projects$Locations$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
|
|
3467
6043
|
list(params: Params$Resource$Projects$Locations$Operations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
|
|
@@ -3512,14 +6088,67 @@ export declare namespace alloydb_v1 {
|
|
|
3512
6088
|
constructor(context: APIRequestContext);
|
|
3513
6089
|
/**
|
|
3514
6090
|
* Lists SupportedDatabaseFlags for a given project and location.
|
|
6091
|
+
* @example
|
|
6092
|
+
* ```js
|
|
6093
|
+
* // Before running the sample:
|
|
6094
|
+
* // - Enable the API at:
|
|
6095
|
+
* // https://console.developers.google.com/apis/api/alloydb.googleapis.com
|
|
6096
|
+
* // - Login into gcloud by running:
|
|
6097
|
+
* // ```sh
|
|
6098
|
+
* // $ gcloud auth application-default login
|
|
6099
|
+
* // ```
|
|
6100
|
+
* // - Install the npm module by running:
|
|
6101
|
+
* // ```sh
|
|
6102
|
+
* // $ npm install googleapis
|
|
6103
|
+
* // ```
|
|
6104
|
+
*
|
|
6105
|
+
* const {google} = require('googleapis');
|
|
6106
|
+
* const alloydb = google.alloydb('v1');
|
|
6107
|
+
*
|
|
6108
|
+
* async function main() {
|
|
6109
|
+
* const auth = new google.auth.GoogleAuth({
|
|
6110
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
6111
|
+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
|
6112
|
+
* });
|
|
6113
|
+
*
|
|
6114
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
6115
|
+
* const authClient = await auth.getClient();
|
|
6116
|
+
* google.options({auth: authClient});
|
|
6117
|
+
*
|
|
6118
|
+
* // Do the magic
|
|
6119
|
+
* const res = await alloydb.projects.locations.supportedDatabaseFlags.list({
|
|
6120
|
+
* // Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
|
|
6121
|
+
* pageSize: 'placeholder-value',
|
|
6122
|
+
* // A token identifying a page of results the server should return.
|
|
6123
|
+
* pageToken: 'placeholder-value',
|
|
6124
|
+
* // 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.
|
|
6125
|
+
* parent: 'projects/my-project/locations/my-location',
|
|
6126
|
+
* // Optional. The scope for which supported flags are requested. If not specified, default is DATABASE.
|
|
6127
|
+
* scope: 'placeholder-value',
|
|
6128
|
+
* });
|
|
6129
|
+
* console.log(res.data);
|
|
6130
|
+
*
|
|
6131
|
+
* // Example response
|
|
6132
|
+
* // {
|
|
6133
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
6134
|
+
* // "supportedDatabaseFlags": []
|
|
6135
|
+
* // }
|
|
6136
|
+
* }
|
|
6137
|
+
*
|
|
6138
|
+
* main().catch(e => {
|
|
6139
|
+
* console.error(e);
|
|
6140
|
+
* throw e;
|
|
6141
|
+
* });
|
|
6142
|
+
*
|
|
6143
|
+
* ```
|
|
3515
6144
|
*
|
|
3516
6145
|
* @param params - Parameters for request
|
|
3517
6146
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3518
6147
|
* @param callback - Optional callback that handles the response.
|
|
3519
6148
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3520
6149
|
*/
|
|
3521
|
-
list(params: Params$Resource$Projects$Locations$Supporteddatabaseflags$List, options: StreamMethodOptions):
|
|
3522
|
-
list(params?: Params$Resource$Projects$Locations$Supporteddatabaseflags$List, options?: MethodOptions):
|
|
6150
|
+
list(params: Params$Resource$Projects$Locations$Supporteddatabaseflags$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
6151
|
+
list(params?: Params$Resource$Projects$Locations$Supporteddatabaseflags$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListSupportedDatabaseFlagsResponse>>;
|
|
3523
6152
|
list(params: Params$Resource$Projects$Locations$Supporteddatabaseflags$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3524
6153
|
list(params: Params$Resource$Projects$Locations$Supporteddatabaseflags$List, options: MethodOptions | BodyResponseCallback<Schema$ListSupportedDatabaseFlagsResponse>, callback: BodyResponseCallback<Schema$ListSupportedDatabaseFlagsResponse>): void;
|
|
3525
6154
|
list(params: Params$Resource$Projects$Locations$Supporteddatabaseflags$List, callback: BodyResponseCallback<Schema$ListSupportedDatabaseFlagsResponse>): void;
|