@googleapis/alloydb 8.0.0 → 10.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/v1.ts CHANGED
@@ -419,6 +419,14 @@ export namespace alloydb_v1 {
419
419
  * Output only. The current serving state of the cluster.
420
420
  */
421
421
  state?: string | null;
422
+ /**
423
+ * Optional. Subscription type of the cluster.
424
+ */
425
+ subscriptionType?: string | null;
426
+ /**
427
+ * Output only. Metadata for free trial clusters
428
+ */
429
+ trialMetadata?: Schema$TrialMetadata;
422
430
  /**
423
431
  * 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.
424
432
  */
@@ -1437,10 +1445,6 @@ export namespace alloydb_v1 {
1437
1445
  * The time at which the resource was updated and recorded at partner service.
1438
1446
  */
1439
1447
  updationTime?: string | null;
1440
- /**
1441
- * User-provided labels, represented as a dictionary where each label is a single key value pair.
1442
- */
1443
- userLabels?: {[key: string]: string} | null;
1444
1448
  /**
1445
1449
  * User-provided labels associated with the resource
1446
1450
  */
@@ -1501,23 +1505,27 @@ export namespace alloydb_v1 {
1501
1505
  */
1502
1506
  export interface Schema$StorageDatabasecenterPartnerapiV1mainMachineConfiguration {
1503
1507
  /**
1504
- * The number of CPUs.
1508
+ * The number of CPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.
1505
1509
  */
1506
1510
  cpuCount?: number | null;
1507
1511
  /**
1508
- * Memory size in bytes.
1512
+ * Memory size in bytes. TODO(b/342344482, b/342346271) add proto validations again after bug fix.
1509
1513
  */
1510
1514
  memorySizeInBytes?: string | null;
1511
1515
  }
1512
1516
  export interface Schema$StorageDatabasecenterPartnerapiV1mainObservabilityMetricData {
1513
1517
  /**
1514
- * Required. The timestamp of the metric value.
1518
+ * Required. Type of aggregation performed on the metric.
1515
1519
  */
1516
- metricTimestamp?: string | null;
1520
+ aggregationType?: string | null;
1517
1521
  /**
1518
1522
  * Required. Type of metric like CPU, Memory, etc.
1519
1523
  */
1520
1524
  metricType?: string | null;
1525
+ /**
1526
+ * Required. The time the metric value was observed.
1527
+ */
1528
+ observationTime?: string | null;
1521
1529
  /**
1522
1530
  * Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel
1523
1531
  */
@@ -1525,7 +1533,7 @@ export namespace alloydb_v1 {
1525
1533
  /**
1526
1534
  * Required. Value of the metric type.
1527
1535
  */
1528
- value?: number | null;
1536
+ value?: Schema$StorageDatabasecenterProtoCommonTypedValue;
1529
1537
  }
1530
1538
  /**
1531
1539
  * An error that occurred during a backup creation operation.
@@ -1572,6 +1580,27 @@ export namespace alloydb_v1 {
1572
1580
  */
1573
1581
  version?: string | null;
1574
1582
  }
1583
+ /**
1584
+ * TypedValue represents the value of a metric type. It can either be a double, an int64, a string or a bool.
1585
+ */
1586
+ export interface Schema$StorageDatabasecenterProtoCommonTypedValue {
1587
+ /**
1588
+ * For boolean value
1589
+ */
1590
+ boolValue?: boolean | null;
1591
+ /**
1592
+ * For double value
1593
+ */
1594
+ doubleValue?: number | null;
1595
+ /**
1596
+ * For integer value
1597
+ */
1598
+ int64Value?: string | null;
1599
+ /**
1600
+ * For string value
1601
+ */
1602
+ stringValue?: string | null;
1603
+ }
1575
1604
  /**
1576
1605
  * Restrictions on STRING type values
1577
1606
  */
@@ -1615,6 +1644,19 @@ export namespace alloydb_v1 {
1615
1644
  supportedDbVersions?: string[] | null;
1616
1645
  valueType?: string | null;
1617
1646
  }
1647
+ /**
1648
+ * Message for switching over to a cluster
1649
+ */
1650
+ export interface Schema$SwitchoverClusterRequest {
1651
+ /**
1652
+ * Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee 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 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).
1653
+ */
1654
+ requestId?: string | null;
1655
+ /**
1656
+ * Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.
1657
+ */
1658
+ validateOnly?: boolean | null;
1659
+ }
1618
1660
  /**
1619
1661
  * A time based retention policy specifies that all backups within a certain time period should be retained.
1620
1662
  */
@@ -1624,6 +1666,23 @@ export namespace alloydb_v1 {
1624
1666
  */
1625
1667
  retentionPeriod?: string | null;
1626
1668
  }
1669
+ /**
1670
+ * Contains information and all metadata related to TRIAL clusters.
1671
+ */
1672
+ export interface Schema$TrialMetadata {
1673
+ /**
1674
+ * End time of the trial cluster.
1675
+ */
1676
+ endTime?: string | null;
1677
+ /**
1678
+ * start time of the trial cluster.
1679
+ */
1680
+ startTime?: string | null;
1681
+ /**
1682
+ * Upgrade time of trial cluster to Standard cluster.
1683
+ */
1684
+ upgradeTime?: string | null;
1685
+ }
1627
1686
  /**
1628
1687
  * Message describing User object.
1629
1688
  */
@@ -3170,6 +3229,94 @@ export namespace alloydb_v1 {
3170
3229
  return createAPIRequest<Schema$Operation>(parameters);
3171
3230
  }
3172
3231
  }
3232
+
3233
+ /**
3234
+ * Switches the role of PRIMARY and SECONDARY cluster without any data loss. This promotes the SECONDARY cluster to PRIMARY and sets up original PRIMARY cluster to replicate from this newly promoted cluster.
3235
+ *
3236
+ * @param params - Parameters for request
3237
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3238
+ * @param callback - Optional callback that handles the response.
3239
+ * @returns A promise if used with async/await, or void if used with a callback.
3240
+ */
3241
+ switchover(
3242
+ params: Params$Resource$Projects$Locations$Clusters$Switchover,
3243
+ options: StreamMethodOptions
3244
+ ): GaxiosPromise<Readable>;
3245
+ switchover(
3246
+ params?: Params$Resource$Projects$Locations$Clusters$Switchover,
3247
+ options?: MethodOptions
3248
+ ): GaxiosPromise<Schema$Operation>;
3249
+ switchover(
3250
+ params: Params$Resource$Projects$Locations$Clusters$Switchover,
3251
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3252
+ callback: BodyResponseCallback<Readable>
3253
+ ): void;
3254
+ switchover(
3255
+ params: Params$Resource$Projects$Locations$Clusters$Switchover,
3256
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3257
+ callback: BodyResponseCallback<Schema$Operation>
3258
+ ): void;
3259
+ switchover(
3260
+ params: Params$Resource$Projects$Locations$Clusters$Switchover,
3261
+ callback: BodyResponseCallback<Schema$Operation>
3262
+ ): void;
3263
+ switchover(callback: BodyResponseCallback<Schema$Operation>): void;
3264
+ switchover(
3265
+ paramsOrCallback?:
3266
+ | Params$Resource$Projects$Locations$Clusters$Switchover
3267
+ | BodyResponseCallback<Schema$Operation>
3268
+ | BodyResponseCallback<Readable>,
3269
+ optionsOrCallback?:
3270
+ | MethodOptions
3271
+ | StreamMethodOptions
3272
+ | BodyResponseCallback<Schema$Operation>
3273
+ | BodyResponseCallback<Readable>,
3274
+ callback?:
3275
+ | BodyResponseCallback<Schema$Operation>
3276
+ | BodyResponseCallback<Readable>
3277
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3278
+ let params = (paramsOrCallback ||
3279
+ {}) as Params$Resource$Projects$Locations$Clusters$Switchover;
3280
+ let options = (optionsOrCallback || {}) as MethodOptions;
3281
+
3282
+ if (typeof paramsOrCallback === 'function') {
3283
+ callback = paramsOrCallback;
3284
+ params = {} as Params$Resource$Projects$Locations$Clusters$Switchover;
3285
+ options = {};
3286
+ }
3287
+
3288
+ if (typeof optionsOrCallback === 'function') {
3289
+ callback = optionsOrCallback;
3290
+ options = {};
3291
+ }
3292
+
3293
+ const rootUrl = options.rootUrl || 'https://alloydb.googleapis.com/';
3294
+ const parameters = {
3295
+ options: Object.assign(
3296
+ {
3297
+ url: (rootUrl + '/v1/{+name}:switchover').replace(
3298
+ /([^:]\/)\/+/g,
3299
+ '$1'
3300
+ ),
3301
+ method: 'POST',
3302
+ apiVersion: '',
3303
+ },
3304
+ options
3305
+ ),
3306
+ params,
3307
+ requiredParams: ['name'],
3308
+ pathParams: ['name'],
3309
+ context: this.context,
3310
+ };
3311
+ if (callback) {
3312
+ createAPIRequest<Schema$Operation>(
3313
+ parameters,
3314
+ callback as BodyResponseCallback<unknown>
3315
+ );
3316
+ } else {
3317
+ return createAPIRequest<Schema$Operation>(parameters);
3318
+ }
3319
+ }
3173
3320
  }
3174
3321
 
3175
3322
  export interface Params$Resource$Projects$Locations$Clusters$Create
@@ -3329,6 +3476,18 @@ export namespace alloydb_v1 {
3329
3476
  */
3330
3477
  requestBody?: Schema$RestoreClusterRequest;
3331
3478
  }
3479
+ export interface Params$Resource$Projects$Locations$Clusters$Switchover
3480
+ extends StandardParameters {
3481
+ /**
3482
+ * Required. The name of the resource. For the required format, see the comment on the Cluster.name field
3483
+ */
3484
+ name?: string;
3485
+
3486
+ /**
3487
+ * Request body metadata
3488
+ */
3489
+ requestBody?: Schema$SwitchoverClusterRequest;
3490
+ }
3332
3491
 
3333
3492
  export class Resource$Projects$Locations$Clusters$Instances {
3334
3493
  context: APIRequestContext;