@maxim_mazurok/gapi.client.spanner-v1 0.0.20240709 → 0.0.20240716

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.
Files changed (2) hide show
  1. package/index.d.ts +253 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://spanner.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20240709
12
+ // Revision: 20240716
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -47,6 +47,8 @@ declare namespace gapi.client {
47
47
  storageUtilizationPercent?: number;
48
48
  }
49
49
  interface Backup {
50
+ /** Output only. List of backup schedule URIs that are associated with creating this backup. This is only applicable for scheduled backups, and is empty for on-demand backups. To optimize for storage, whenever possible, multiple schedules are collapsed together to create one backup. In such cases, this field captures the list of all backup schedule URIs that are associated with creating this backup. If collapsing is not done, then this field captures the single backup schedule URI associated with creating this backup. */
51
+ backupSchedules?: string[];
50
52
  /** Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`. */
51
53
  createTime?: string;
52
54
  /** Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`. */
@@ -84,6 +86,24 @@ declare namespace gapi.client {
84
86
  /** The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`. */
85
87
  versionTime?: string;
86
88
  }
89
+ interface BackupSchedule {
90
+ /** Optional. The encryption configuration that will be used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the database. */
91
+ encryptionConfig?: CreateBackupEncryptionConfig;
92
+ /** The schedule creates only full backups. */
93
+ fullBackupSpec?: any;
94
+ /** Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form `projects//instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. */
95
+ name?: string;
96
+ /** Optional. The retention duration of a backup that must be at least 6 hours and at most 366 days. The backup is eligible to be automatically deleted once the retention period has elapsed. */
97
+ retentionDuration?: string;
98
+ /** Optional. The schedule specification based on which the backup creations are triggered. */
99
+ spec?: BackupScheduleSpec;
100
+ /** Output only. The timestamp at which the schedule was last updated. If the schedule has never been updated, this field contains the timestamp when the schedule was first created. */
101
+ updateTime?: string;
102
+ }
103
+ interface BackupScheduleSpec {
104
+ /** Cron style schedule specification. */
105
+ cronSpec?: CrontabSpec;
106
+ }
87
107
  interface BatchCreateSessionsRequest {
88
108
  /** Required. The number of sessions to be created in this batch call. The API may return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to BatchCreateSessions (adjusting session_count as necessary). */
89
109
  sessionCount?: number;
@@ -210,6 +230,14 @@ declare namespace gapi.client {
210
230
  /** Required. The source backup to be copied. The source backup needs to be in READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: `projects//instances//backups/`. */
211
231
  sourceBackup?: string;
212
232
  }
233
+ interface CreateBackupEncryptionConfig {
234
+ /** Required. The encryption type of the backup. */
235
+ encryptionType?: string;
236
+ /** Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`. */
237
+ kmsKeyName?: string;
238
+ /** Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the backup's instance configuration. Some examples: * For single region instance configs, specify a single regional location KMS key. * For multi-regional instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For an instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs. */
239
+ kmsKeyNames?: string[];
240
+ }
213
241
  interface CreateBackupMetadata {
214
242
  /** The time at which cancellation of this operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. 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`. */
215
243
  cancelTime?: string;
@@ -290,6 +318,14 @@ declare namespace gapi.client {
290
318
  /** Required. The session to create. */
291
319
  session?: Session;
292
320
  }
321
+ interface CrontabSpec {
322
+ /** Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in `schedule_spec.cron_spec`. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in `schedule_spec.cron_spec` and version_time + `creation_window`. */
323
+ creationWindow?: string;
324
+ /** Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timzeone. The backup will contain an externally consistent copy of the database at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and 1 month. Examples of valid cron specifications: * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. * `0 2 * * * ` : once a day at 2 past midnight in UTC. * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC. */
325
+ text?: string;
326
+ /** Output only. The time zone of the times in `CrontabSpec.text`. Currently only UTC is supported. */
327
+ timeZone?: string;
328
+ }
293
329
  interface Database {
294
330
  /** Output only. If exists, the time at which the database creation started. */
295
331
  createTime?: string;
@@ -446,6 +482,7 @@ declare namespace gapi.client {
446
482
  /** Output only. If present, the timestamp at which the free instance was upgraded to a provisioned instance. */
447
483
  upgradeTime?: string;
448
484
  }
485
+ interface FullBackupSpec {}
449
486
  interface GetDatabaseDdlResponse {
450
487
  /** Proto descriptors stored in the database. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). */
451
488
  protoDescriptors?: string;
@@ -620,6 +657,12 @@ declare namespace gapi.client {
620
657
  /** The list of matching backup long-running operations. Each operation's name will be prefixed by the backup's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation. */
621
658
  operations?: Operation[];
622
659
  }
660
+ interface ListBackupSchedulesResponse {
661
+ /** The list of backup schedules for a database. */
662
+ backupSchedules?: BackupSchedule[];
663
+ /** `next_page_token` can be sent in a subsequent ListBackupSchedules call to fetch more of the schedules. */
664
+ nextPageToken?: string;
665
+ }
623
666
  interface ListBackupsResponse {
624
667
  /** The list of matching backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`. */
625
668
  backups?: Backup[];
@@ -2311,6 +2354,122 @@ declare namespace gapi.client {
2311
2354
  }): Request<ListDatabaseOperationsResponse>;
2312
2355
  }
2313
2356
  interface BackupSchedulesResource {
2357
+ /** Creates a new backup schedule. */
2358
+ create(request: {
2359
+ /** V1 error format. */
2360
+ '$.xgafv'?: string;
2361
+ /** OAuth access token. */
2362
+ access_token?: string;
2363
+ /** Data format for response. */
2364
+ alt?: string;
2365
+ /** Required. The Id to use for the backup schedule. The `backup_schedule_id` appended to `parent` forms the full backup schedule name of the form `projects//instances//databases//backupSchedules/`. */
2366
+ backupScheduleId?: string;
2367
+ /** JSONP */
2368
+ callback?: string;
2369
+ /** Selector specifying which fields to include in a partial response. */
2370
+ fields?: string;
2371
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2372
+ key?: string;
2373
+ /** OAuth 2.0 token for the current user. */
2374
+ oauth_token?: string;
2375
+ /** Required. The name of the database that this backup schedule applies to. */
2376
+ parent: string;
2377
+ /** Returns response with indentations and line breaks. */
2378
+ prettyPrint?: boolean;
2379
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2380
+ quotaUser?: string;
2381
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2382
+ upload_protocol?: string;
2383
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2384
+ uploadType?: string;
2385
+ /** Request body */
2386
+ resource: BackupSchedule;
2387
+ }): Request<BackupSchedule>;
2388
+ create(
2389
+ request: {
2390
+ /** V1 error format. */
2391
+ '$.xgafv'?: string;
2392
+ /** OAuth access token. */
2393
+ access_token?: string;
2394
+ /** Data format for response. */
2395
+ alt?: string;
2396
+ /** Required. The Id to use for the backup schedule. The `backup_schedule_id` appended to `parent` forms the full backup schedule name of the form `projects//instances//databases//backupSchedules/`. */
2397
+ backupScheduleId?: string;
2398
+ /** JSONP */
2399
+ callback?: string;
2400
+ /** Selector specifying which fields to include in a partial response. */
2401
+ fields?: string;
2402
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2403
+ key?: string;
2404
+ /** OAuth 2.0 token for the current user. */
2405
+ oauth_token?: string;
2406
+ /** Required. The name of the database that this backup schedule applies to. */
2407
+ parent: string;
2408
+ /** Returns response with indentations and line breaks. */
2409
+ prettyPrint?: boolean;
2410
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2411
+ quotaUser?: string;
2412
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2413
+ upload_protocol?: string;
2414
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2415
+ uploadType?: string;
2416
+ },
2417
+ body: BackupSchedule
2418
+ ): Request<BackupSchedule>;
2419
+ /** Deletes a backup schedule. */
2420
+ delete(request?: {
2421
+ /** V1 error format. */
2422
+ '$.xgafv'?: string;
2423
+ /** OAuth access token. */
2424
+ access_token?: string;
2425
+ /** Data format for response. */
2426
+ alt?: string;
2427
+ /** JSONP */
2428
+ callback?: string;
2429
+ /** Selector specifying which fields to include in a partial response. */
2430
+ fields?: string;
2431
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2432
+ key?: string;
2433
+ /** Required. The name of the schedule to delete. Values are of the form `projects//instances//databases//backupSchedules/`. */
2434
+ name: string;
2435
+ /** OAuth 2.0 token for the current user. */
2436
+ oauth_token?: string;
2437
+ /** Returns response with indentations and line breaks. */
2438
+ prettyPrint?: boolean;
2439
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2440
+ quotaUser?: string;
2441
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2442
+ upload_protocol?: string;
2443
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2444
+ uploadType?: string;
2445
+ }): Request<{}>;
2446
+ /** Gets backup schedule for the input schedule name. */
2447
+ get(request?: {
2448
+ /** V1 error format. */
2449
+ '$.xgafv'?: string;
2450
+ /** OAuth access token. */
2451
+ access_token?: string;
2452
+ /** Data format for response. */
2453
+ alt?: string;
2454
+ /** JSONP */
2455
+ callback?: string;
2456
+ /** Selector specifying which fields to include in a partial response. */
2457
+ fields?: string;
2458
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2459
+ key?: string;
2460
+ /** Required. The name of the schedule to retrieve. Values are of the form `projects//instances//databases//backupSchedules/`. */
2461
+ name: string;
2462
+ /** OAuth 2.0 token for the current user. */
2463
+ oauth_token?: string;
2464
+ /** Returns response with indentations and line breaks. */
2465
+ prettyPrint?: boolean;
2466
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2467
+ quotaUser?: string;
2468
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2469
+ upload_protocol?: string;
2470
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2471
+ uploadType?: string;
2472
+ }): Request<BackupSchedule>;
2314
2473
  /** Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. */
2315
2474
  getIamPolicy(
2316
2475
  request: {
@@ -2341,6 +2500,99 @@ declare namespace gapi.client {
2341
2500
  },
2342
2501
  body: GetIamPolicyRequest
2343
2502
  ): Request<Policy>;
2503
+ /** Lists all the backup schedules for the database. */
2504
+ list(request?: {
2505
+ /** V1 error format. */
2506
+ '$.xgafv'?: string;
2507
+ /** OAuth access token. */
2508
+ access_token?: string;
2509
+ /** Data format for response. */
2510
+ alt?: string;
2511
+ /** JSONP */
2512
+ callback?: string;
2513
+ /** Selector specifying which fields to include in a partial response. */
2514
+ fields?: string;
2515
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2516
+ key?: string;
2517
+ /** OAuth 2.0 token for the current user. */
2518
+ oauth_token?: string;
2519
+ /** Optional. Number of backup schedules to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. */
2520
+ pageSize?: number;
2521
+ /** Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListBackupSchedulesResponse to the same `parent`. */
2522
+ pageToken?: string;
2523
+ /** Required. Database is the parent resource whose backup schedules should be listed. Values are of the form projects//instances//databases/ */
2524
+ parent: string;
2525
+ /** Returns response with indentations and line breaks. */
2526
+ prettyPrint?: boolean;
2527
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2528
+ quotaUser?: string;
2529
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2530
+ upload_protocol?: string;
2531
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2532
+ uploadType?: string;
2533
+ }): Request<ListBackupSchedulesResponse>;
2534
+ /** Updates a backup schedule. */
2535
+ patch(request: {
2536
+ /** V1 error format. */
2537
+ '$.xgafv'?: string;
2538
+ /** OAuth access token. */
2539
+ access_token?: string;
2540
+ /** Data format for response. */
2541
+ alt?: string;
2542
+ /** JSONP */
2543
+ callback?: string;
2544
+ /** Selector specifying which fields to include in a partial response. */
2545
+ fields?: string;
2546
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2547
+ key?: string;
2548
+ /** Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form `projects//instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. */
2549
+ name: string;
2550
+ /** OAuth 2.0 token for the current user. */
2551
+ oauth_token?: string;
2552
+ /** Returns response with indentations and line breaks. */
2553
+ prettyPrint?: boolean;
2554
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2555
+ quotaUser?: string;
2556
+ /** Required. A mask specifying which fields in the BackupSchedule resource should be updated. This mask is relative to the BackupSchedule resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally. */
2557
+ updateMask?: string;
2558
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2559
+ upload_protocol?: string;
2560
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2561
+ uploadType?: string;
2562
+ /** Request body */
2563
+ resource: BackupSchedule;
2564
+ }): Request<BackupSchedule>;
2565
+ patch(
2566
+ request: {
2567
+ /** V1 error format. */
2568
+ '$.xgafv'?: string;
2569
+ /** OAuth access token. */
2570
+ access_token?: string;
2571
+ /** Data format for response. */
2572
+ alt?: string;
2573
+ /** JSONP */
2574
+ callback?: string;
2575
+ /** Selector specifying which fields to include in a partial response. */
2576
+ fields?: string;
2577
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2578
+ key?: string;
2579
+ /** Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form `projects//instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. */
2580
+ name: string;
2581
+ /** OAuth 2.0 token for the current user. */
2582
+ oauth_token?: string;
2583
+ /** Returns response with indentations and line breaks. */
2584
+ prettyPrint?: boolean;
2585
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2586
+ quotaUser?: string;
2587
+ /** Required. A mask specifying which fields in the BackupSchedule resource should be updated. This mask is relative to the BackupSchedule resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally. */
2588
+ updateMask?: string;
2589
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2590
+ upload_protocol?: string;
2591
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2592
+ uploadType?: string;
2593
+ },
2594
+ body: BackupSchedule
2595
+ ): Request<BackupSchedule>;
2344
2596
  /** Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. */
2345
2597
  setIamPolicy(
2346
2598
  request: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.spanner-v1",
3
- "version": "0.0.20240709",
3
+ "version": "0.0.20240716",
4
4
  "description": "TypeScript typings for Cloud Spanner API v1",
5
5
  "repository": {
6
6
  "type": "git",