@googleapis/alloydb 19.1.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1alpha.ts CHANGED
@@ -657,13 +657,9 @@ export namespace alloydb_v1alpha {
657
657
  */
658
658
  export interface Schema$ConnectionPoolConfig {
659
659
  /**
660
- * Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to 20. Note: This field should not be added to client libraries if not present already.
660
+ * Output only. The number of running AuthProxy poolers per instance.
661
661
  */
662
- defaultPoolSize?: string | null;
663
- /**
664
- * Optional. Deprecated; Prefer 'enabled' as this will be removed soon.
665
- */
666
- enable?: boolean | null;
662
+ authproxyPoolerCount?: number | null;
667
663
  /**
668
664
  * Optional. Whether to enable Managed Connection Pool (MCP).
669
665
  */
@@ -672,42 +668,10 @@ export namespace alloydb_v1alpha {
672
668
  * Optional. Connection Pool flags, as a list of "key": "value" pairs.
673
669
  */
674
670
  flags?: {[key: string]: string} | null;
675
- /**
676
- * Optional. Deprecated. Use 'flags' instead. The list of startup parameters to ignore. Defaults to ["extra_float_digits"] Note: This field should not be added to client libraries if not present already.
677
- */
678
- ignoreStartupParameters?: string[] | null;
679
- /**
680
- * Optional. Deprecated. Use 'flags' instead. The maximum number of client connections allowed. Note: This field should not be added to client libraries if not present already.
681
- */
682
- maxClientConn?: string | null;
683
- /**
684
- * Optional. Deprecated. Use 'flags' instead. The maximum number of prepared statements allowed. MCP makes sure that any statement prepared by a client, up to this limit, is available on the backing server connection in transaction and statement pooling mode. Even if the statement was originally prepared on another server connection. Defaults to 0. Note: This field should not be added to client libraries if not present already.
685
- */
686
- maxPreparedStatements?: string | null;
687
- /**
688
- * Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to 0. Note: This field should not be added to client libraries if not present already.
689
- */
690
- minPoolSize?: string | null;
691
671
  /**
692
672
  * Output only. The number of running poolers per instance.
693
673
  */
694
674
  poolerCount?: number | null;
695
- /**
696
- * Optional. Deprecated. Use 'flags' instead. The pool mode. Defaults to `POOL_MODE_TRANSACTION`. Note: This field should not be added to client libraries if not present already.
697
- */
698
- poolMode?: string | null;
699
- /**
700
- * Optional. Deprecated. Use 'flags' instead. The maximum number of seconds queries are allowed to spend waiting for execution. If the query is not assigned to a server during that time, the client is disconnected. 0 disables. Note: This field should not be added to client libraries if not present already.
701
- */
702
- queryWaitTimeout?: string | null;
703
- /**
704
- * Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a server is allowed to be idle before it is disconnected. 0 disables. Note: This field should not be added to client libraries if not present already.
705
- */
706
- serverIdleTimeout?: string | null;
707
- /**
708
- * Optional. Deprecated. Use 'flags' instead. The list of users that are allowed to connect to the MCP stats console. The users must exist in the database. Note: This field should not be added to client libraries if not present already.
709
- */
710
- statsUsers?: string[] | null;
711
675
  }
712
676
  /**
713
677
  * ContinuousBackupConfig describes the continuous backups recovery configurations of a cluster.
@@ -841,6 +805,19 @@ export namespace alloydb_v1alpha {
841
805
  */
842
806
  time?: Schema$GoogleTypeTimeOfDay;
843
807
  }
808
+ /**
809
+ * The DNS config for the endpoint, containing the DNS record name, type and targets.
810
+ */
811
+ export interface Schema$DNSConfig {
812
+ /**
813
+ * The fully qualified domain name (FQDN) of the DNS record, e.g., ".location.alloydb-psa.goog".
814
+ */
815
+ dnsName?: string | null;
816
+ /**
817
+ * The type of the DNS record, e.g., "A", "AAAA", "CNAME".
818
+ */
819
+ dnsRecordType?: string | null;
820
+ }
844
821
  /**
845
822
  * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
846
823
  */
@@ -867,6 +844,67 @@ export namespace alloydb_v1alpha {
867
844
  */
868
845
  kmsKeyVersions?: string[] | null;
869
846
  }
847
+ /**
848
+ * Endpoint resource.
849
+ */
850
+ export interface Schema$Endpoint {
851
+ /**
852
+ * Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
853
+ */
854
+ annotations?: {[key: string]: string} | null;
855
+ /**
856
+ * Output only. Create time stamp
857
+ */
858
+ createTime?: string | null;
859
+ /**
860
+ * Output only. Delete time stamp
861
+ */
862
+ deleteTime?: string | null;
863
+ /**
864
+ * User-settable and human-readable display name for the Endpoint.
865
+ */
866
+ displayName?: string | null;
867
+ /**
868
+ * Output only. The DNS config for the endpoint. Each endpoint is associated with a specific DNS name and the DNS type. The DNS targets are the IP addresses of the target instances. The dns_type is the type of the DNS record, eg. Type "A" or Type "CNAME". This field is not configurable by the user, and it is updated when user specifies the target instances.
869
+ */
870
+ dnsConfig?: Schema$DNSConfig;
871
+ /**
872
+ * Output only. The effective target instances that the endpoint is associated with. This is a list of target instance names, e.g. projects/{project_number\}/locations/{location\}/clusters/{cluster_id\}/instances/{instance_id\} For write endpoint, there is only one effective target instance which has to be a primary instance. Effective target instances are only different from target instances after a switchover or cross-region failover operation. Otherwise, effective_target_instances are the same as target_instances. Note that after a cross-region failover operation, the effective_target_instances can be stale until the operation to update the endpoint is complete.
873
+ */
874
+ effectiveTargetInstances?: string[] | null;
875
+ /**
876
+ * The type of the endpoint, either write or read.
877
+ */
878
+ endpointType?: string | null;
879
+ /**
880
+ * For Resource freshness validation (https://google.aip.dev/154)
881
+ */
882
+ etag?: string | null;
883
+ /**
884
+ * Output only. Identifier. The name of the endpoint resource with the format: * projects/{project\}/locations/{region\}/endpoints/{endpoint_id\} where the endpoint ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the endpoint resource name is the name of the parent resource: * projects/{project\}/locations/{region\}
885
+ */
886
+ name?: string | null;
887
+ /**
888
+ * Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Endpoint does not match the user's intended state, and the service is actively updating the Endpoint to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
889
+ */
890
+ reconciling?: boolean | null;
891
+ /**
892
+ * Output only. The state of the endpoint.
893
+ */
894
+ state?: string | null;
895
+ /**
896
+ * The names of the target instances for the endpoint, should be of format projects/{project\}/locations/{region\}/clusters/{cluster\}/instances/{instance\}. For write endpoint, there is only one target instance which has to be a primary instance. For read endpoint, there can be multiple target instances which can be read or secondary instances. After a cross-region failover or switchover operation, the endpoint will be associated with a different target instance. This change will be reflected in the effective_target_instances field.
897
+ */
898
+ targetInstances?: string[] | null;
899
+ /**
900
+ * Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.
901
+ */
902
+ uid?: string | null;
903
+ /**
904
+ * Output only. Update time stamp
905
+ */
906
+ updateTime?: string | null;
907
+ }
870
908
  /**
871
909
  * Export cluster request.
872
910
  */
@@ -1209,7 +1247,7 @@ export namespace alloydb_v1alpha {
1209
1247
  */
1210
1248
  export interface Schema$InstanceNetworkConfig {
1211
1249
  /**
1212
- * 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])?.
1250
+ * 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](https://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])?.
1213
1251
  */
1214
1252
  allocatedIpRangeOverride?: string | null;
1215
1253
  /**
@@ -1293,6 +1331,23 @@ export namespace alloydb_v1alpha {
1293
1331
  */
1294
1332
  unreachable?: string[] | null;
1295
1333
  }
1334
+ /**
1335
+ * Message for response to listing Endpoints
1336
+ */
1337
+ export interface Schema$ListEndpointsResponse {
1338
+ /**
1339
+ * The list of Endpoints
1340
+ */
1341
+ endpoints?: Schema$Endpoint[];
1342
+ /**
1343
+ * A token identifying a page of results the server should return.
1344
+ */
1345
+ nextPageToken?: string | null;
1346
+ /**
1347
+ * Locations that could not be reached.
1348
+ */
1349
+ unreachable?: string[] | null;
1350
+ }
1296
1351
  /**
1297
1352
  * Message for response to listing Instances
1298
1353
  */
@@ -1447,6 +1502,10 @@ export namespace alloydb_v1alpha {
1447
1502
  * Output only. The private IP address of the VM e.g. "10.57.0.34".
1448
1503
  */
1449
1504
  ip?: string | null;
1505
+ /**
1506
+ * Output only. Indicates whether the node set up to be configured as a hot standby.
1507
+ */
1508
+ isHotStandby?: boolean | null;
1450
1509
  /**
1451
1510
  * Output only. Determined by state of the compute VM and postgres-service health. Compute VM state can have values listed in https://cloud.google.com/compute/docs/instances/instance-life-cycle and postgres-service health can have values: HEALTHY and UNHEALTHY.
1452
1511
  */
@@ -1488,6 +1547,10 @@ export namespace alloydb_v1alpha {
1488
1547
  * Track actively running queries on the instance. If not set, this flag is "off" by default.
1489
1548
  */
1490
1549
  trackActiveQueries?: boolean | null;
1550
+ /**
1551
+ * Indicates whether to track active query plans for an instance. If not set, the default value is "off". Can only be enabled if track_active_queries is enabled.
1552
+ */
1553
+ trackActiveQueryPlan?: boolean | null;
1491
1554
  /**
1492
1555
  * Track client address for an instance. If not set, default value is "off".
1493
1556
  */
@@ -1601,6 +1664,10 @@ export namespace alloydb_v1alpha {
1601
1664
  * 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.
1602
1665
  */
1603
1666
  etag?: string | null;
1667
+ /**
1668
+ * Optional. If set, the promote operation will attempt to recreate the original primary cluster as a secondary cluster when it comes back online. Otherwise, the promoted cluster will be a standalone cluster. Currently only supported when there is a single secondary cluster.
1669
+ */
1670
+ failover?: boolean | null;
1604
1671
  /**
1605
1672
  * 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 original operation with the same request ID was received, and if so, will ignore 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).
1606
1673
  */
@@ -2230,7 +2297,7 @@ export namespace alloydb_v1alpha {
2230
2297
  uniqueId?: string | null;
2231
2298
  }
2232
2299
  /**
2233
- * Common model for database resource instance metadata. Next ID: 30
2300
+ * Common model for database resource instance metadata. Next ID: 32
2234
2301
  */
2235
2302
  export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceMetadata {
2236
2303
  /**
@@ -2301,6 +2368,10 @@ export namespace alloydb_v1alpha {
2301
2368
  * Optional. Maintenance info for the resource.
2302
2369
  */
2303
2370
  maintenanceInfo?: Schema$StorageDatabasecenterPartnerapiV1mainResourceMaintenanceInfo;
2371
+ /**
2372
+ * Optional. The modes of the database resource.
2373
+ */
2374
+ modes?: string[] | null;
2304
2375
  /**
2305
2376
  * Identifier for this resource's immediate parent/primary resource if the current resource is a replica or derived form of another Database resource. Else it would be NULL. REQUIRED if the immediate parent exists when first time resource is getting ingested, otherwise optional.
2306
2377
  */
@@ -2317,6 +2388,10 @@ export namespace alloydb_v1alpha {
2317
2388
  * Closest parent Cloud Resource Manager container of this resource. It must be resource name of a Cloud Resource Manager project with the format of "/", such as "projects/123". For GCP provided resources, number should be project number.
2318
2389
  */
2319
2390
  resourceContainer?: string | null;
2391
+ /**
2392
+ * Optional. List of resource flags for the database resource.
2393
+ */
2394
+ resourceFlags?: Schema$StorageDatabasecenterPartnerapiV1mainResourceFlags[];
2320
2395
  /**
2321
2396
  * Required. Different from DatabaseResourceId.unique_id, a resource name can be reused over time. That is, after a resource named "ABC" is deleted, the name "ABC" can be used to to create a new resource within the same source. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel
2322
2397
  */
@@ -2380,9 +2455,13 @@ export namespace alloydb_v1alpha {
2380
2455
  signalType?: string | null;
2381
2456
  }
2382
2457
  /**
2383
- * Database resource signal data. This is used to send signals to Condor which are based on the DB/Instance/Fleet level configurations. These will be used to send signals for all inventory types. Next ID: 7
2458
+ * Database resource signal data. This is used to send signals to Condor which are based on the DB/Instance/Fleet level configurations. These will be used to send signals for all inventory types. Next ID: 10
2384
2459
  */
2385
2460
  export interface Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceSignalData {
2461
+ /**
2462
+ * Deprecated: Use signal_metadata_list instead.
2463
+ */
2464
+ backupRun?: Schema$StorageDatabasecenterPartnerapiV1mainBackupRun;
2386
2465
  /**
2387
2466
  * Required. Full Resource name of the source resource.
2388
2467
  */
@@ -2391,14 +2470,22 @@ export namespace alloydb_v1alpha {
2391
2470
  * Required. Last time signal was refreshed
2392
2471
  */
2393
2472
  lastRefreshTime?: string | null;
2473
+ /**
2474
+ * Required. Resource location.
2475
+ */
2476
+ location?: string | null;
2394
2477
  /**
2395
2478
  * Database resource id.
2396
2479
  */
2397
2480
  resourceId?: Schema$StorageDatabasecenterPartnerapiV1mainDatabaseResourceId;
2398
2481
  /**
2399
- * Signal data for boolean signals.
2482
+ * Deprecated: Use signal_metadata_list instead.
2400
2483
  */
2401
2484
  signalBoolValue?: boolean | null;
2485
+ /**
2486
+ * This will support array of OneOf signal metadata information for a given signal type.
2487
+ */
2488
+ signalMetadataList?: Schema$StorageDatabasecenterPartnerapiV1mainSignalMetadata[];
2402
2489
  /**
2403
2490
  * Required. Output only. Signal state of the signal
2404
2491
  */
@@ -2518,6 +2605,19 @@ export namespace alloydb_v1alpha {
2518
2605
  */
2519
2606
  message?: string | null;
2520
2607
  }
2608
+ /**
2609
+ * Message type for storing resource flags.
2610
+ */
2611
+ export interface Schema$StorageDatabasecenterPartnerapiV1mainResourceFlags {
2612
+ /**
2613
+ * Optional. Key of the resource flag.
2614
+ */
2615
+ key?: string | null;
2616
+ /**
2617
+ * Optional. Value of the resource flag.
2618
+ */
2619
+ value?: string | null;
2620
+ }
2521
2621
  /**
2522
2622
  * Deny maintenance period for the database resource. It specifies the time range during which the maintenance cannot start. This is configured by the customer.
2523
2623
  */
@@ -2539,10 +2639,18 @@ export namespace alloydb_v1alpha {
2539
2639
  * MaintenanceInfo to capture the maintenance details of database resource.
2540
2640
  */
2541
2641
  export interface Schema$StorageDatabasecenterPartnerapiV1mainResourceMaintenanceInfo {
2642
+ /**
2643
+ * Optional. The date when the current maintenance version was released.
2644
+ */
2645
+ currentVersionReleaseDate?: Schema$GoogleTypeDate;
2542
2646
  /**
2543
2647
  * Optional. List of Deny maintenance period for the database resource.
2544
2648
  */
2545
2649
  denyMaintenanceSchedules?: Schema$StorageDatabasecenterPartnerapiV1mainResourceMaintenanceDenySchedule[];
2650
+ /**
2651
+ * Optional. Whether the instance is in stopped state. This information is temporarily being captured in maintenanceInfo, till STOPPED state is supported by DB Center.
2652
+ */
2653
+ isInstanceStopped?: boolean | null;
2546
2654
  /**
2547
2655
  * Optional. Maintenance window for the database resource.
2548
2656
  */
@@ -2593,6 +2701,19 @@ export namespace alloydb_v1alpha {
2593
2701
  */
2594
2702
  timestampBasedRetentionTime?: string | null;
2595
2703
  }
2704
+ /**
2705
+ * SignalMetadata contains one of the signal metadata proto messages associated with a SignalType. This proto will be mapped to SignalMetadata message in storage.proto. Next ID: 3
2706
+ */
2707
+ export interface Schema$StorageDatabasecenterPartnerapiV1mainSignalMetadata {
2708
+ /**
2709
+ * Signal data for backup runs.
2710
+ */
2711
+ backupRun?: Schema$StorageDatabasecenterPartnerapiV1mainBackupRun;
2712
+ /**
2713
+ * Signal data for boolean signals.
2714
+ */
2715
+ signalBoolValue?: boolean | null;
2716
+ }
2596
2717
  /**
2597
2718
  * Message type for storing tags. Tags provide a way to create annotations for resources, and in some cases conditionally allow or deny policies based on whether a resource has a specific tag.
2598
2719
  */
@@ -2898,12 +3019,14 @@ export namespace alloydb_v1alpha {
2898
3019
  context: APIRequestContext;
2899
3020
  backups: Resource$Projects$Locations$Backups;
2900
3021
  clusters: Resource$Projects$Locations$Clusters;
3022
+ endpoints: Resource$Projects$Locations$Endpoints;
2901
3023
  operations: Resource$Projects$Locations$Operations;
2902
3024
  supportedDatabaseFlags: Resource$Projects$Locations$Supporteddatabaseflags;
2903
3025
  constructor(context: APIRequestContext) {
2904
3026
  this.context = context;
2905
3027
  this.backups = new Resource$Projects$Locations$Backups(this.context);
2906
3028
  this.clusters = new Resource$Projects$Locations$Clusters(this.context);
3029
+ this.endpoints = new Resource$Projects$Locations$Endpoints(this.context);
2907
3030
  this.operations = new Resource$Projects$Locations$Operations(
2908
3031
  this.context
2909
3032
  );
@@ -3054,7 +3177,7 @@ export namespace alloydb_v1alpha {
3054
3177
  }
3055
3178
 
3056
3179
  /**
3057
- * Lists information about the supported locations for this service.
3180
+ * Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * **Global locations**: If `name` is empty, the method lists the public locations available to all projects. * **Project-specific locations**: If `name` follows the format `projects/{project\}`, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the `name` field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
3058
3181
  * @example
3059
3182
  * ```js
3060
3183
  * // Before running the sample:
@@ -3084,7 +3207,7 @@ export namespace alloydb_v1alpha {
3084
3207
  *
3085
3208
  * // Do the magic
3086
3209
  * const res = await alloydb.projects.locations.list({
3087
- * // Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.
3210
+ * // Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage.
3088
3211
  * extraLocationTypes: 'placeholder-value',
3089
3212
  * // 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).
3090
3213
  * filter: 'placeholder-value',
@@ -3218,7 +3341,7 @@ export namespace alloydb_v1alpha {
3218
3341
  }
3219
3342
  export interface Params$Resource$Projects$Locations$List extends StandardParameters {
3220
3343
  /**
3221
- * Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.
3344
+ * Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage.
3222
3345
  */
3223
3346
  extraLocationTypes?: string[];
3224
3347
  /**
@@ -5575,6 +5698,7 @@ export namespace alloydb_v1alpha {
5575
5698
  * // request body parameters
5576
5699
  * // {
5577
5700
  * // "etag": "my_etag",
5701
+ * // "failover": false,
5578
5702
  * // "requestId": "my_requestId",
5579
5703
  * // "validateOnly": false
5580
5704
  * // }
@@ -9157,6 +9281,885 @@ export namespace alloydb_v1alpha {
9157
9281
  requestBody?: Schema$User;
9158
9282
  }
9159
9283
 
9284
+ export class Resource$Projects$Locations$Endpoints {
9285
+ context: APIRequestContext;
9286
+ constructor(context: APIRequestContext) {
9287
+ this.context = context;
9288
+ }
9289
+
9290
+ /**
9291
+ * Creates a new Endpoint in a given project and location.
9292
+ * @example
9293
+ * ```js
9294
+ * // Before running the sample:
9295
+ * // - Enable the API at:
9296
+ * // https://console.developers.google.com/apis/api/alloydb.googleapis.com
9297
+ * // - Login into gcloud by running:
9298
+ * // ```sh
9299
+ * // $ gcloud auth application-default login
9300
+ * // ```
9301
+ * // - Install the npm module by running:
9302
+ * // ```sh
9303
+ * // $ npm install googleapis
9304
+ * // ```
9305
+ *
9306
+ * const {google} = require('googleapis');
9307
+ * const alloydb = google.alloydb('v1alpha');
9308
+ *
9309
+ * async function main() {
9310
+ * const auth = new google.auth.GoogleAuth({
9311
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9312
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9313
+ * });
9314
+ *
9315
+ * // Acquire an auth client, and bind it to all future calls
9316
+ * const authClient = await auth.getClient();
9317
+ * google.options({auth: authClient});
9318
+ *
9319
+ * // Do the magic
9320
+ * const res = await alloydb.projects.locations.endpoints.create({
9321
+ * // Required. ID of the requesting object.
9322
+ * endpointId: 'placeholder-value',
9323
+ * // Required. The location of the new endpoint. For the required format, see the comment on the Endpoint.name field.
9324
+ * parent: 'projects/my-project/locations/my-location',
9325
+ * // 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).
9326
+ * requestId: 'placeholder-value',
9327
+ * // Optional. If set, the backend validates the request, but doesn't actually execute it.
9328
+ * validateOnly: 'placeholder-value',
9329
+ *
9330
+ * // Request body metadata
9331
+ * requestBody: {
9332
+ * // request body parameters
9333
+ * // {
9334
+ * // "annotations": {},
9335
+ * // "createTime": "my_createTime",
9336
+ * // "deleteTime": "my_deleteTime",
9337
+ * // "displayName": "my_displayName",
9338
+ * // "dnsConfig": {},
9339
+ * // "effectiveTargetInstances": [],
9340
+ * // "endpointType": "my_endpointType",
9341
+ * // "etag": "my_etag",
9342
+ * // "name": "my_name",
9343
+ * // "reconciling": false,
9344
+ * // "state": "my_state",
9345
+ * // "targetInstances": [],
9346
+ * // "uid": "my_uid",
9347
+ * // "updateTime": "my_updateTime"
9348
+ * // }
9349
+ * },
9350
+ * });
9351
+ * console.log(res.data);
9352
+ *
9353
+ * // Example response
9354
+ * // {
9355
+ * // "done": false,
9356
+ * // "error": {},
9357
+ * // "metadata": {},
9358
+ * // "name": "my_name",
9359
+ * // "response": {}
9360
+ * // }
9361
+ * }
9362
+ *
9363
+ * main().catch(e => {
9364
+ * console.error(e);
9365
+ * throw e;
9366
+ * });
9367
+ *
9368
+ * ```
9369
+ *
9370
+ * @param params - Parameters for request
9371
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9372
+ * @param callback - Optional callback that handles the response.
9373
+ * @returns A promise if used with async/await, or void if used with a callback.
9374
+ */
9375
+ create(
9376
+ params: Params$Resource$Projects$Locations$Endpoints$Create,
9377
+ options: StreamMethodOptions
9378
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
9379
+ create(
9380
+ params?: Params$Resource$Projects$Locations$Endpoints$Create,
9381
+ options?: MethodOptions
9382
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
9383
+ create(
9384
+ params: Params$Resource$Projects$Locations$Endpoints$Create,
9385
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
9386
+ callback: BodyResponseCallback<Readable>
9387
+ ): void;
9388
+ create(
9389
+ params: Params$Resource$Projects$Locations$Endpoints$Create,
9390
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
9391
+ callback: BodyResponseCallback<Schema$Operation>
9392
+ ): void;
9393
+ create(
9394
+ params: Params$Resource$Projects$Locations$Endpoints$Create,
9395
+ callback: BodyResponseCallback<Schema$Operation>
9396
+ ): void;
9397
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
9398
+ create(
9399
+ paramsOrCallback?:
9400
+ | Params$Resource$Projects$Locations$Endpoints$Create
9401
+ | BodyResponseCallback<Schema$Operation>
9402
+ | BodyResponseCallback<Readable>,
9403
+ optionsOrCallback?:
9404
+ | MethodOptions
9405
+ | StreamMethodOptions
9406
+ | BodyResponseCallback<Schema$Operation>
9407
+ | BodyResponseCallback<Readable>,
9408
+ callback?:
9409
+ | BodyResponseCallback<Schema$Operation>
9410
+ | BodyResponseCallback<Readable>
9411
+ ):
9412
+ | void
9413
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
9414
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
9415
+ let params = (paramsOrCallback ||
9416
+ {}) as Params$Resource$Projects$Locations$Endpoints$Create;
9417
+ let options = (optionsOrCallback || {}) as MethodOptions;
9418
+
9419
+ if (typeof paramsOrCallback === 'function') {
9420
+ callback = paramsOrCallback;
9421
+ params = {} as Params$Resource$Projects$Locations$Endpoints$Create;
9422
+ options = {};
9423
+ }
9424
+
9425
+ if (typeof optionsOrCallback === 'function') {
9426
+ callback = optionsOrCallback;
9427
+ options = {};
9428
+ }
9429
+
9430
+ const rootUrl = options.rootUrl || 'https://alloydb.googleapis.com/';
9431
+ const parameters = {
9432
+ options: Object.assign(
9433
+ {
9434
+ url: (rootUrl + '/v1alpha/{+parent}/endpoints').replace(
9435
+ /([^:]\/)\/+/g,
9436
+ '$1'
9437
+ ),
9438
+ method: 'POST',
9439
+ apiVersion: '',
9440
+ },
9441
+ options
9442
+ ),
9443
+ params,
9444
+ requiredParams: ['parent'],
9445
+ pathParams: ['parent'],
9446
+ context: this.context,
9447
+ };
9448
+ if (callback) {
9449
+ createAPIRequest<Schema$Operation>(
9450
+ parameters,
9451
+ callback as BodyResponseCallback<unknown>
9452
+ );
9453
+ } else {
9454
+ return createAPIRequest<Schema$Operation>(parameters);
9455
+ }
9456
+ }
9457
+
9458
+ /**
9459
+ * Deletes a single Endpoint.
9460
+ * @example
9461
+ * ```js
9462
+ * // Before running the sample:
9463
+ * // - Enable the API at:
9464
+ * // https://console.developers.google.com/apis/api/alloydb.googleapis.com
9465
+ * // - Login into gcloud by running:
9466
+ * // ```sh
9467
+ * // $ gcloud auth application-default login
9468
+ * // ```
9469
+ * // - Install the npm module by running:
9470
+ * // ```sh
9471
+ * // $ npm install googleapis
9472
+ * // ```
9473
+ *
9474
+ * const {google} = require('googleapis');
9475
+ * const alloydb = google.alloydb('v1alpha');
9476
+ *
9477
+ * async function main() {
9478
+ * const auth = new google.auth.GoogleAuth({
9479
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9480
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9481
+ * });
9482
+ *
9483
+ * // Acquire an auth client, and bind it to all future calls
9484
+ * const authClient = await auth.getClient();
9485
+ * google.options({auth: authClient});
9486
+ *
9487
+ * // Do the magic
9488
+ * const res = await alloydb.projects.locations.endpoints.delete({
9489
+ * // Optional. The current etag of the Endpoint. If an etag is provided and does not match the current etag of the Endpoint, deletion will be blocked and an ABORTED error will be returned.
9490
+ * etag: 'placeholder-value',
9491
+ * // Required. The name of the resource. For the required format, see the comment on the Endpoint.name field.
9492
+ * name: 'projects/my-project/locations/my-location/endpoints/my-endpoint',
9493
+ * // 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 after 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).
9494
+ * requestId: 'placeholder-value',
9495
+ * // Optional. If set, the backend validates the request, but doesn't actually execute it.
9496
+ * validateOnly: 'placeholder-value',
9497
+ * });
9498
+ * console.log(res.data);
9499
+ *
9500
+ * // Example response
9501
+ * // {
9502
+ * // "done": false,
9503
+ * // "error": {},
9504
+ * // "metadata": {},
9505
+ * // "name": "my_name",
9506
+ * // "response": {}
9507
+ * // }
9508
+ * }
9509
+ *
9510
+ * main().catch(e => {
9511
+ * console.error(e);
9512
+ * throw e;
9513
+ * });
9514
+ *
9515
+ * ```
9516
+ *
9517
+ * @param params - Parameters for request
9518
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9519
+ * @param callback - Optional callback that handles the response.
9520
+ * @returns A promise if used with async/await, or void if used with a callback.
9521
+ */
9522
+ delete(
9523
+ params: Params$Resource$Projects$Locations$Endpoints$Delete,
9524
+ options: StreamMethodOptions
9525
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
9526
+ delete(
9527
+ params?: Params$Resource$Projects$Locations$Endpoints$Delete,
9528
+ options?: MethodOptions
9529
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
9530
+ delete(
9531
+ params: Params$Resource$Projects$Locations$Endpoints$Delete,
9532
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
9533
+ callback: BodyResponseCallback<Readable>
9534
+ ): void;
9535
+ delete(
9536
+ params: Params$Resource$Projects$Locations$Endpoints$Delete,
9537
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
9538
+ callback: BodyResponseCallback<Schema$Operation>
9539
+ ): void;
9540
+ delete(
9541
+ params: Params$Resource$Projects$Locations$Endpoints$Delete,
9542
+ callback: BodyResponseCallback<Schema$Operation>
9543
+ ): void;
9544
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
9545
+ delete(
9546
+ paramsOrCallback?:
9547
+ | Params$Resource$Projects$Locations$Endpoints$Delete
9548
+ | BodyResponseCallback<Schema$Operation>
9549
+ | BodyResponseCallback<Readable>,
9550
+ optionsOrCallback?:
9551
+ | MethodOptions
9552
+ | StreamMethodOptions
9553
+ | BodyResponseCallback<Schema$Operation>
9554
+ | BodyResponseCallback<Readable>,
9555
+ callback?:
9556
+ | BodyResponseCallback<Schema$Operation>
9557
+ | BodyResponseCallback<Readable>
9558
+ ):
9559
+ | void
9560
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
9561
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
9562
+ let params = (paramsOrCallback ||
9563
+ {}) as Params$Resource$Projects$Locations$Endpoints$Delete;
9564
+ let options = (optionsOrCallback || {}) as MethodOptions;
9565
+
9566
+ if (typeof paramsOrCallback === 'function') {
9567
+ callback = paramsOrCallback;
9568
+ params = {} as Params$Resource$Projects$Locations$Endpoints$Delete;
9569
+ options = {};
9570
+ }
9571
+
9572
+ if (typeof optionsOrCallback === 'function') {
9573
+ callback = optionsOrCallback;
9574
+ options = {};
9575
+ }
9576
+
9577
+ const rootUrl = options.rootUrl || 'https://alloydb.googleapis.com/';
9578
+ const parameters = {
9579
+ options: Object.assign(
9580
+ {
9581
+ url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
9582
+ method: 'DELETE',
9583
+ apiVersion: '',
9584
+ },
9585
+ options
9586
+ ),
9587
+ params,
9588
+ requiredParams: ['name'],
9589
+ pathParams: ['name'],
9590
+ context: this.context,
9591
+ };
9592
+ if (callback) {
9593
+ createAPIRequest<Schema$Operation>(
9594
+ parameters,
9595
+ callback as BodyResponseCallback<unknown>
9596
+ );
9597
+ } else {
9598
+ return createAPIRequest<Schema$Operation>(parameters);
9599
+ }
9600
+ }
9601
+
9602
+ /**
9603
+ * Gets details of a single Endpoint.
9604
+ * @example
9605
+ * ```js
9606
+ * // Before running the sample:
9607
+ * // - Enable the API at:
9608
+ * // https://console.developers.google.com/apis/api/alloydb.googleapis.com
9609
+ * // - Login into gcloud by running:
9610
+ * // ```sh
9611
+ * // $ gcloud auth application-default login
9612
+ * // ```
9613
+ * // - Install the npm module by running:
9614
+ * // ```sh
9615
+ * // $ npm install googleapis
9616
+ * // ```
9617
+ *
9618
+ * const {google} = require('googleapis');
9619
+ * const alloydb = google.alloydb('v1alpha');
9620
+ *
9621
+ * async function main() {
9622
+ * const auth = new google.auth.GoogleAuth({
9623
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9624
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9625
+ * });
9626
+ *
9627
+ * // Acquire an auth client, and bind it to all future calls
9628
+ * const authClient = await auth.getClient();
9629
+ * google.options({auth: authClient});
9630
+ *
9631
+ * // Do the magic
9632
+ * const res = await alloydb.projects.locations.endpoints.get({
9633
+ * // Required. The name of the resource. For the required format, see the comment on the Endpoint.name field.
9634
+ * name: 'projects/my-project/locations/my-location/endpoints/my-endpoint',
9635
+ * });
9636
+ * console.log(res.data);
9637
+ *
9638
+ * // Example response
9639
+ * // {
9640
+ * // "annotations": {},
9641
+ * // "createTime": "my_createTime",
9642
+ * // "deleteTime": "my_deleteTime",
9643
+ * // "displayName": "my_displayName",
9644
+ * // "dnsConfig": {},
9645
+ * // "effectiveTargetInstances": [],
9646
+ * // "endpointType": "my_endpointType",
9647
+ * // "etag": "my_etag",
9648
+ * // "name": "my_name",
9649
+ * // "reconciling": false,
9650
+ * // "state": "my_state",
9651
+ * // "targetInstances": [],
9652
+ * // "uid": "my_uid",
9653
+ * // "updateTime": "my_updateTime"
9654
+ * // }
9655
+ * }
9656
+ *
9657
+ * main().catch(e => {
9658
+ * console.error(e);
9659
+ * throw e;
9660
+ * });
9661
+ *
9662
+ * ```
9663
+ *
9664
+ * @param params - Parameters for request
9665
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9666
+ * @param callback - Optional callback that handles the response.
9667
+ * @returns A promise if used with async/await, or void if used with a callback.
9668
+ */
9669
+ get(
9670
+ params: Params$Resource$Projects$Locations$Endpoints$Get,
9671
+ options: StreamMethodOptions
9672
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
9673
+ get(
9674
+ params?: Params$Resource$Projects$Locations$Endpoints$Get,
9675
+ options?: MethodOptions
9676
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>;
9677
+ get(
9678
+ params: Params$Resource$Projects$Locations$Endpoints$Get,
9679
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
9680
+ callback: BodyResponseCallback<Readable>
9681
+ ): void;
9682
+ get(
9683
+ params: Params$Resource$Projects$Locations$Endpoints$Get,
9684
+ options: MethodOptions | BodyResponseCallback<Schema$Endpoint>,
9685
+ callback: BodyResponseCallback<Schema$Endpoint>
9686
+ ): void;
9687
+ get(
9688
+ params: Params$Resource$Projects$Locations$Endpoints$Get,
9689
+ callback: BodyResponseCallback<Schema$Endpoint>
9690
+ ): void;
9691
+ get(callback: BodyResponseCallback<Schema$Endpoint>): void;
9692
+ get(
9693
+ paramsOrCallback?:
9694
+ | Params$Resource$Projects$Locations$Endpoints$Get
9695
+ | BodyResponseCallback<Schema$Endpoint>
9696
+ | BodyResponseCallback<Readable>,
9697
+ optionsOrCallback?:
9698
+ | MethodOptions
9699
+ | StreamMethodOptions
9700
+ | BodyResponseCallback<Schema$Endpoint>
9701
+ | BodyResponseCallback<Readable>,
9702
+ callback?:
9703
+ | BodyResponseCallback<Schema$Endpoint>
9704
+ | BodyResponseCallback<Readable>
9705
+ ):
9706
+ | void
9707
+ | Promise<GaxiosResponseWithHTTP2<Schema$Endpoint>>
9708
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
9709
+ let params = (paramsOrCallback ||
9710
+ {}) as Params$Resource$Projects$Locations$Endpoints$Get;
9711
+ let options = (optionsOrCallback || {}) as MethodOptions;
9712
+
9713
+ if (typeof paramsOrCallback === 'function') {
9714
+ callback = paramsOrCallback;
9715
+ params = {} as Params$Resource$Projects$Locations$Endpoints$Get;
9716
+ options = {};
9717
+ }
9718
+
9719
+ if (typeof optionsOrCallback === 'function') {
9720
+ callback = optionsOrCallback;
9721
+ options = {};
9722
+ }
9723
+
9724
+ const rootUrl = options.rootUrl || 'https://alloydb.googleapis.com/';
9725
+ const parameters = {
9726
+ options: Object.assign(
9727
+ {
9728
+ url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
9729
+ method: 'GET',
9730
+ apiVersion: '',
9731
+ },
9732
+ options
9733
+ ),
9734
+ params,
9735
+ requiredParams: ['name'],
9736
+ pathParams: ['name'],
9737
+ context: this.context,
9738
+ };
9739
+ if (callback) {
9740
+ createAPIRequest<Schema$Endpoint>(
9741
+ parameters,
9742
+ callback as BodyResponseCallback<unknown>
9743
+ );
9744
+ } else {
9745
+ return createAPIRequest<Schema$Endpoint>(parameters);
9746
+ }
9747
+ }
9748
+
9749
+ /**
9750
+ * Lists Endpoints in a given project and location.
9751
+ * @example
9752
+ * ```js
9753
+ * // Before running the sample:
9754
+ * // - Enable the API at:
9755
+ * // https://console.developers.google.com/apis/api/alloydb.googleapis.com
9756
+ * // - Login into gcloud by running:
9757
+ * // ```sh
9758
+ * // $ gcloud auth application-default login
9759
+ * // ```
9760
+ * // - Install the npm module by running:
9761
+ * // ```sh
9762
+ * // $ npm install googleapis
9763
+ * // ```
9764
+ *
9765
+ * const {google} = require('googleapis');
9766
+ * const alloydb = google.alloydb('v1alpha');
9767
+ *
9768
+ * async function main() {
9769
+ * const auth = new google.auth.GoogleAuth({
9770
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9771
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9772
+ * });
9773
+ *
9774
+ * // Acquire an auth client, and bind it to all future calls
9775
+ * const authClient = await auth.getClient();
9776
+ * google.options({auth: authClient});
9777
+ *
9778
+ * // Do the magic
9779
+ * const res = await alloydb.projects.locations.endpoints.list({
9780
+ * // Optional. Filtering results. This field is currently not supported, its value will be ignored if passed.
9781
+ * filter: 'placeholder-value',
9782
+ * // Optional. Hint for how to order the results
9783
+ * orderBy: 'placeholder-value',
9784
+ * // Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
9785
+ * pageSize: 'placeholder-value',
9786
+ * // Optional. A page token, received from a previous `ListEndpoints` call. This should be provided to retrieve the subsequent page. This field is currently not supported, its value will be ignored if passed.
9787
+ * pageToken: 'placeholder-value',
9788
+ * // Required. The name of the parent resource. For the required format, see the comment on the Endpoint.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project\}/locations/-
9789
+ * parent: 'projects/my-project/locations/my-location',
9790
+ * });
9791
+ * console.log(res.data);
9792
+ *
9793
+ * // Example response
9794
+ * // {
9795
+ * // "endpoints": [],
9796
+ * // "nextPageToken": "my_nextPageToken",
9797
+ * // "unreachable": []
9798
+ * // }
9799
+ * }
9800
+ *
9801
+ * main().catch(e => {
9802
+ * console.error(e);
9803
+ * throw e;
9804
+ * });
9805
+ *
9806
+ * ```
9807
+ *
9808
+ * @param params - Parameters for request
9809
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9810
+ * @param callback - Optional callback that handles the response.
9811
+ * @returns A promise if used with async/await, or void if used with a callback.
9812
+ */
9813
+ list(
9814
+ params: Params$Resource$Projects$Locations$Endpoints$List,
9815
+ options: StreamMethodOptions
9816
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
9817
+ list(
9818
+ params?: Params$Resource$Projects$Locations$Endpoints$List,
9819
+ options?: MethodOptions
9820
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListEndpointsResponse>>;
9821
+ list(
9822
+ params: Params$Resource$Projects$Locations$Endpoints$List,
9823
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
9824
+ callback: BodyResponseCallback<Readable>
9825
+ ): void;
9826
+ list(
9827
+ params: Params$Resource$Projects$Locations$Endpoints$List,
9828
+ options:
9829
+ | MethodOptions
9830
+ | BodyResponseCallback<Schema$ListEndpointsResponse>,
9831
+ callback: BodyResponseCallback<Schema$ListEndpointsResponse>
9832
+ ): void;
9833
+ list(
9834
+ params: Params$Resource$Projects$Locations$Endpoints$List,
9835
+ callback: BodyResponseCallback<Schema$ListEndpointsResponse>
9836
+ ): void;
9837
+ list(callback: BodyResponseCallback<Schema$ListEndpointsResponse>): void;
9838
+ list(
9839
+ paramsOrCallback?:
9840
+ | Params$Resource$Projects$Locations$Endpoints$List
9841
+ | BodyResponseCallback<Schema$ListEndpointsResponse>
9842
+ | BodyResponseCallback<Readable>,
9843
+ optionsOrCallback?:
9844
+ | MethodOptions
9845
+ | StreamMethodOptions
9846
+ | BodyResponseCallback<Schema$ListEndpointsResponse>
9847
+ | BodyResponseCallback<Readable>,
9848
+ callback?:
9849
+ | BodyResponseCallback<Schema$ListEndpointsResponse>
9850
+ | BodyResponseCallback<Readable>
9851
+ ):
9852
+ | void
9853
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListEndpointsResponse>>
9854
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
9855
+ let params = (paramsOrCallback ||
9856
+ {}) as Params$Resource$Projects$Locations$Endpoints$List;
9857
+ let options = (optionsOrCallback || {}) as MethodOptions;
9858
+
9859
+ if (typeof paramsOrCallback === 'function') {
9860
+ callback = paramsOrCallback;
9861
+ params = {} as Params$Resource$Projects$Locations$Endpoints$List;
9862
+ options = {};
9863
+ }
9864
+
9865
+ if (typeof optionsOrCallback === 'function') {
9866
+ callback = optionsOrCallback;
9867
+ options = {};
9868
+ }
9869
+
9870
+ const rootUrl = options.rootUrl || 'https://alloydb.googleapis.com/';
9871
+ const parameters = {
9872
+ options: Object.assign(
9873
+ {
9874
+ url: (rootUrl + '/v1alpha/{+parent}/endpoints').replace(
9875
+ /([^:]\/)\/+/g,
9876
+ '$1'
9877
+ ),
9878
+ method: 'GET',
9879
+ apiVersion: '',
9880
+ },
9881
+ options
9882
+ ),
9883
+ params,
9884
+ requiredParams: ['parent'],
9885
+ pathParams: ['parent'],
9886
+ context: this.context,
9887
+ };
9888
+ if (callback) {
9889
+ createAPIRequest<Schema$ListEndpointsResponse>(
9890
+ parameters,
9891
+ callback as BodyResponseCallback<unknown>
9892
+ );
9893
+ } else {
9894
+ return createAPIRequest<Schema$ListEndpointsResponse>(parameters);
9895
+ }
9896
+ }
9897
+
9898
+ /**
9899
+ * Updates the parameters of a single Endpoint.
9900
+ * @example
9901
+ * ```js
9902
+ * // Before running the sample:
9903
+ * // - Enable the API at:
9904
+ * // https://console.developers.google.com/apis/api/alloydb.googleapis.com
9905
+ * // - Login into gcloud by running:
9906
+ * // ```sh
9907
+ * // $ gcloud auth application-default login
9908
+ * // ```
9909
+ * // - Install the npm module by running:
9910
+ * // ```sh
9911
+ * // $ npm install googleapis
9912
+ * // ```
9913
+ *
9914
+ * const {google} = require('googleapis');
9915
+ * const alloydb = google.alloydb('v1alpha');
9916
+ *
9917
+ * async function main() {
9918
+ * const auth = new google.auth.GoogleAuth({
9919
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
9920
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
9921
+ * });
9922
+ *
9923
+ * // Acquire an auth client, and bind it to all future calls
9924
+ * const authClient = await auth.getClient();
9925
+ * google.options({auth: authClient});
9926
+ *
9927
+ * // Do the magic
9928
+ * const res = await alloydb.projects.locations.endpoints.patch({
9929
+ * // Optional. If set to true, update succeeds even if endpoint is not found. In that case, a new endpoint is created and `update_mask` is ignored.
9930
+ * allowMissing: 'placeholder-value',
9931
+ * // Output only. Identifier. The name of the endpoint resource with the format: * projects/{project\}/locations/{region\}/endpoints/{endpoint_id\} where the endpoint ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the endpoint resource name is the name of the parent resource: * projects/{project\}/locations/{region\}
9932
+ * name: 'projects/my-project/locations/my-location/endpoints/my-endpoint',
9933
+ * // 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).
9934
+ * requestId: 'placeholder-value',
9935
+ * // Optional. Field mask is used to specify the fields to be overwritten in the Endpoint 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.
9936
+ * updateMask: 'placeholder-value',
9937
+ * // Optional. If set, the backend validates the request, but doesn't actually execute it.
9938
+ * validateOnly: 'placeholder-value',
9939
+ *
9940
+ * // Request body metadata
9941
+ * requestBody: {
9942
+ * // request body parameters
9943
+ * // {
9944
+ * // "annotations": {},
9945
+ * // "createTime": "my_createTime",
9946
+ * // "deleteTime": "my_deleteTime",
9947
+ * // "displayName": "my_displayName",
9948
+ * // "dnsConfig": {},
9949
+ * // "effectiveTargetInstances": [],
9950
+ * // "endpointType": "my_endpointType",
9951
+ * // "etag": "my_etag",
9952
+ * // "name": "my_name",
9953
+ * // "reconciling": false,
9954
+ * // "state": "my_state",
9955
+ * // "targetInstances": [],
9956
+ * // "uid": "my_uid",
9957
+ * // "updateTime": "my_updateTime"
9958
+ * // }
9959
+ * },
9960
+ * });
9961
+ * console.log(res.data);
9962
+ *
9963
+ * // Example response
9964
+ * // {
9965
+ * // "done": false,
9966
+ * // "error": {},
9967
+ * // "metadata": {},
9968
+ * // "name": "my_name",
9969
+ * // "response": {}
9970
+ * // }
9971
+ * }
9972
+ *
9973
+ * main().catch(e => {
9974
+ * console.error(e);
9975
+ * throw e;
9976
+ * });
9977
+ *
9978
+ * ```
9979
+ *
9980
+ * @param params - Parameters for request
9981
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9982
+ * @param callback - Optional callback that handles the response.
9983
+ * @returns A promise if used with async/await, or void if used with a callback.
9984
+ */
9985
+ patch(
9986
+ params: Params$Resource$Projects$Locations$Endpoints$Patch,
9987
+ options: StreamMethodOptions
9988
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
9989
+ patch(
9990
+ params?: Params$Resource$Projects$Locations$Endpoints$Patch,
9991
+ options?: MethodOptions
9992
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
9993
+ patch(
9994
+ params: Params$Resource$Projects$Locations$Endpoints$Patch,
9995
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
9996
+ callback: BodyResponseCallback<Readable>
9997
+ ): void;
9998
+ patch(
9999
+ params: Params$Resource$Projects$Locations$Endpoints$Patch,
10000
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
10001
+ callback: BodyResponseCallback<Schema$Operation>
10002
+ ): void;
10003
+ patch(
10004
+ params: Params$Resource$Projects$Locations$Endpoints$Patch,
10005
+ callback: BodyResponseCallback<Schema$Operation>
10006
+ ): void;
10007
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
10008
+ patch(
10009
+ paramsOrCallback?:
10010
+ | Params$Resource$Projects$Locations$Endpoints$Patch
10011
+ | BodyResponseCallback<Schema$Operation>
10012
+ | BodyResponseCallback<Readable>,
10013
+ optionsOrCallback?:
10014
+ | MethodOptions
10015
+ | StreamMethodOptions
10016
+ | BodyResponseCallback<Schema$Operation>
10017
+ | BodyResponseCallback<Readable>,
10018
+ callback?:
10019
+ | BodyResponseCallback<Schema$Operation>
10020
+ | BodyResponseCallback<Readable>
10021
+ ):
10022
+ | void
10023
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
10024
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
10025
+ let params = (paramsOrCallback ||
10026
+ {}) as Params$Resource$Projects$Locations$Endpoints$Patch;
10027
+ let options = (optionsOrCallback || {}) as MethodOptions;
10028
+
10029
+ if (typeof paramsOrCallback === 'function') {
10030
+ callback = paramsOrCallback;
10031
+ params = {} as Params$Resource$Projects$Locations$Endpoints$Patch;
10032
+ options = {};
10033
+ }
10034
+
10035
+ if (typeof optionsOrCallback === 'function') {
10036
+ callback = optionsOrCallback;
10037
+ options = {};
10038
+ }
10039
+
10040
+ const rootUrl = options.rootUrl || 'https://alloydb.googleapis.com/';
10041
+ const parameters = {
10042
+ options: Object.assign(
10043
+ {
10044
+ url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'),
10045
+ method: 'PATCH',
10046
+ apiVersion: '',
10047
+ },
10048
+ options
10049
+ ),
10050
+ params,
10051
+ requiredParams: ['name'],
10052
+ pathParams: ['name'],
10053
+ context: this.context,
10054
+ };
10055
+ if (callback) {
10056
+ createAPIRequest<Schema$Operation>(
10057
+ parameters,
10058
+ callback as BodyResponseCallback<unknown>
10059
+ );
10060
+ } else {
10061
+ return createAPIRequest<Schema$Operation>(parameters);
10062
+ }
10063
+ }
10064
+ }
10065
+
10066
+ export interface Params$Resource$Projects$Locations$Endpoints$Create extends StandardParameters {
10067
+ /**
10068
+ * Required. ID of the requesting object.
10069
+ */
10070
+ endpointId?: string;
10071
+ /**
10072
+ * Required. The location of the new endpoint. For the required format, see the comment on the Endpoint.name field.
10073
+ */
10074
+ parent?: string;
10075
+ /**
10076
+ * 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).
10077
+ */
10078
+ requestId?: string;
10079
+ /**
10080
+ * Optional. If set, the backend validates the request, but doesn't actually execute it.
10081
+ */
10082
+ validateOnly?: boolean;
10083
+
10084
+ /**
10085
+ * Request body metadata
10086
+ */
10087
+ requestBody?: Schema$Endpoint;
10088
+ }
10089
+ export interface Params$Resource$Projects$Locations$Endpoints$Delete extends StandardParameters {
10090
+ /**
10091
+ * Optional. The current etag of the Endpoint. If an etag is provided and does not match the current etag of the Endpoint, deletion will be blocked and an ABORTED error will be returned.
10092
+ */
10093
+ etag?: string;
10094
+ /**
10095
+ * Required. The name of the resource. For the required format, see the comment on the Endpoint.name field.
10096
+ */
10097
+ name?: string;
10098
+ /**
10099
+ * 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 after 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).
10100
+ */
10101
+ requestId?: string;
10102
+ /**
10103
+ * Optional. If set, the backend validates the request, but doesn't actually execute it.
10104
+ */
10105
+ validateOnly?: boolean;
10106
+ }
10107
+ export interface Params$Resource$Projects$Locations$Endpoints$Get extends StandardParameters {
10108
+ /**
10109
+ * Required. The name of the resource. For the required format, see the comment on the Endpoint.name field.
10110
+ */
10111
+ name?: string;
10112
+ }
10113
+ export interface Params$Resource$Projects$Locations$Endpoints$List extends StandardParameters {
10114
+ /**
10115
+ * Optional. Filtering results. This field is currently not supported, its value will be ignored if passed.
10116
+ */
10117
+ filter?: string;
10118
+ /**
10119
+ * Optional. Hint for how to order the results
10120
+ */
10121
+ orderBy?: string;
10122
+ /**
10123
+ * Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
10124
+ */
10125
+ pageSize?: number;
10126
+ /**
10127
+ * Optional. A page token, received from a previous `ListEndpoints` call. This should be provided to retrieve the subsequent page. This field is currently not supported, its value will be ignored if passed.
10128
+ */
10129
+ pageToken?: string;
10130
+ /**
10131
+ * Required. The name of the parent resource. For the required format, see the comment on the Endpoint.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project\}/locations/-
10132
+ */
10133
+ parent?: string;
10134
+ }
10135
+ export interface Params$Resource$Projects$Locations$Endpoints$Patch extends StandardParameters {
10136
+ /**
10137
+ * Optional. If set to true, update succeeds even if endpoint is not found. In that case, a new endpoint is created and `update_mask` is ignored.
10138
+ */
10139
+ allowMissing?: boolean;
10140
+ /**
10141
+ * Output only. Identifier. The name of the endpoint resource with the format: * projects/{project\}/locations/{region\}/endpoints/{endpoint_id\} where the endpoint ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the endpoint resource name is the name of the parent resource: * projects/{project\}/locations/{region\}
10142
+ */
10143
+ name?: string;
10144
+ /**
10145
+ * 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).
10146
+ */
10147
+ requestId?: string;
10148
+ /**
10149
+ * Optional. Field mask is used to specify the fields to be overwritten in the Endpoint 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.
10150
+ */
10151
+ updateMask?: string;
10152
+ /**
10153
+ * Optional. If set, the backend validates the request, but doesn't actually execute it.
10154
+ */
10155
+ validateOnly?: boolean;
10156
+
10157
+ /**
10158
+ * Request body metadata
10159
+ */
10160
+ requestBody?: Schema$Endpoint;
10161
+ }
10162
+
9160
10163
  export class Resource$Projects$Locations$Operations {
9161
10164
  context: APIRequestContext;
9162
10165
  constructor(context: APIRequestContext) {