@googleapis/storage 15.6.0 → 15.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [15.8.0](https://github.com/googleapis/google-api-nodejs-client/compare/storage-v15.7.0...storage-v15.8.0) (2025-02-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * **storage:** update the API ([487bfb4](https://github.com/googleapis/google-api-nodejs-client/commit/487bfb47a144ab293cf7a634788a10a9aaf798f8))
9
+ * **storage:** update the API ([e40cb95](https://github.com/googleapis/google-api-nodejs-client/commit/e40cb950668f9881f13abd468ea36f18e6767b69))
10
+ * **storage:** update the API ([cae4993](https://github.com/googleapis/google-api-nodejs-client/commit/cae49936785d6e4532bf5e78c4a4aec48ba1139c))
11
+ * **storage:** update the API ([d42b431](https://github.com/googleapis/google-api-nodejs-client/commit/d42b4313216b4d2727d5a793b49046d4258542e7))
12
+
13
+ ## [15.7.0](https://github.com/googleapis/google-api-nodejs-client/compare/storage-v15.6.0...storage-v15.7.0) (2024-10-30)
14
+
15
+
16
+ ### Features
17
+
18
+ * **storage:** update the API ([e40cb95](https://github.com/googleapis/google-api-nodejs-client/commit/e40cb950668f9881f13abd468ea36f18e6767b69))
19
+
3
20
  ## [15.6.0](https://github.com/googleapis/google-api-nodejs-client/compare/storage-v15.5.0...storage-v15.6.0) (2024-08-27)
4
21
 
5
22
 
package/build/v1.d.ts CHANGED
@@ -70,6 +70,19 @@ export declare namespace storage_v1 {
70
70
  projects: Resource$Projects;
71
71
  constructor(options: GlobalOptions, google?: GoogleConfigurable);
72
72
  }
73
+ /**
74
+ * An AdvanceRelocateBucketOperation request.
75
+ */
76
+ export interface Schema$AdvanceRelocateBucketOperationRequest {
77
+ /**
78
+ * Specifies the time when the relocation will revert to the sync stage if the relocation hasn't succeeded.
79
+ */
80
+ expireTime?: string | null;
81
+ /**
82
+ * Specifies the duration after which the relocation will revert to the sync stage if the relocation hasn't succeeded. Optional, if not supplied, a default value of 12h will be used.
83
+ */
84
+ ttl?: string | null;
85
+ }
73
86
  /**
74
87
  * An Anywhere Cache instance.
75
88
  */
@@ -1049,6 +1062,10 @@ export declare namespace storage_v1 {
1049
1062
  entity?: string;
1050
1063
  entityId?: string;
1051
1064
  } | null;
1065
+ /**
1066
+ * Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets.
1067
+ */
1068
+ restoreToken?: string | null;
1052
1069
  /**
1053
1070
  * A collection of object level retention parameters.
1054
1071
  */
@@ -1088,6 +1105,10 @@ export declare namespace storage_v1 {
1088
1105
  * The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1089
1106
  */
1090
1107
  timeDeleted?: string | null;
1108
+ /**
1109
+ * The time when the object was finalized.
1110
+ */
1111
+ timeFinalized?: string | null;
1091
1112
  /**
1092
1113
  * The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1093
1114
  */
@@ -1231,6 +1252,25 @@ export declare namespace storage_v1 {
1231
1252
  */
1232
1253
  version?: number | null;
1233
1254
  }
1255
+ /**
1256
+ * A Relocate Bucket request.
1257
+ */
1258
+ export interface Schema$RelocateBucketRequest {
1259
+ /**
1260
+ * The bucket's new custom placement configuration if relocating to a Custom Dual Region.
1261
+ */
1262
+ destinationCustomPlacementConfig?: {
1263
+ dataLocations?: string[];
1264
+ } | null;
1265
+ /**
1266
+ * The new location the bucket will be relocated to.
1267
+ */
1268
+ destinationLocation?: string | null;
1269
+ /**
1270
+ * If true, validate the operation, but do not actually relocate the bucket.
1271
+ */
1272
+ validateOnly?: boolean | null;
1273
+ }
1234
1274
  /**
1235
1275
  * A rewrite response.
1236
1276
  */
@@ -1777,6 +1817,20 @@ export declare namespace storage_v1 {
1777
1817
  patch(params: Params$Resource$Buckets$Patch, options: MethodOptions | BodyResponseCallback<Schema$Bucket>, callback: BodyResponseCallback<Schema$Bucket>): void;
1778
1818
  patch(params: Params$Resource$Buckets$Patch, callback: BodyResponseCallback<Schema$Bucket>): void;
1779
1819
  patch(callback: BodyResponseCallback<Schema$Bucket>): void;
1820
+ /**
1821
+ * Initiates a long-running Relocate Bucket operation on the specified bucket.
1822
+ *
1823
+ * @param params - Parameters for request
1824
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1825
+ * @param callback - Optional callback that handles the response.
1826
+ * @returns A promise if used with async/await, or void if used with a callback.
1827
+ */
1828
+ relocate(params: Params$Resource$Buckets$Relocate, options: StreamMethodOptions): GaxiosPromise<Readable>;
1829
+ relocate(params?: Params$Resource$Buckets$Relocate, options?: MethodOptions): GaxiosPromise<Schema$GoogleLongrunningOperation>;
1830
+ relocate(params: Params$Resource$Buckets$Relocate, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1831
+ relocate(params: Params$Resource$Buckets$Relocate, options: MethodOptions | BodyResponseCallback<Schema$GoogleLongrunningOperation>, callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
1832
+ relocate(params: Params$Resource$Buckets$Relocate, callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
1833
+ relocate(callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>): void;
1780
1834
  /**
1781
1835
  * Restores a soft-deleted bucket.
1782
1836
  *
@@ -1786,11 +1840,11 @@ export declare namespace storage_v1 {
1786
1840
  * @returns A promise if used with async/await, or void if used with a callback.
1787
1841
  */
1788
1842
  restore(params: Params$Resource$Buckets$Restore, options: StreamMethodOptions): GaxiosPromise<Readable>;
1789
- restore(params?: Params$Resource$Buckets$Restore, options?: MethodOptions): GaxiosPromise<void>;
1843
+ restore(params?: Params$Resource$Buckets$Restore, options?: MethodOptions): GaxiosPromise<Schema$Bucket>;
1790
1844
  restore(params: Params$Resource$Buckets$Restore, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1791
- restore(params: Params$Resource$Buckets$Restore, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
1792
- restore(params: Params$Resource$Buckets$Restore, callback: BodyResponseCallback<void>): void;
1793
- restore(callback: BodyResponseCallback<void>): void;
1845
+ restore(params: Params$Resource$Buckets$Restore, options: MethodOptions | BodyResponseCallback<Schema$Bucket>, callback: BodyResponseCallback<Schema$Bucket>): void;
1846
+ restore(params: Params$Resource$Buckets$Restore, callback: BodyResponseCallback<Schema$Bucket>): void;
1847
+ restore(callback: BodyResponseCallback<Schema$Bucket>): void;
1794
1848
  /**
1795
1849
  * Updates an IAM policy for the specified bucket.
1796
1850
  *
@@ -2014,6 +2068,16 @@ export declare namespace storage_v1 {
2014
2068
  */
2015
2069
  requestBody?: Schema$Bucket;
2016
2070
  }
2071
+ export interface Params$Resource$Buckets$Relocate extends StandardParameters {
2072
+ /**
2073
+ * Name of the bucket to be moved.
2074
+ */
2075
+ bucket?: string;
2076
+ /**
2077
+ * Request body metadata
2078
+ */
2079
+ requestBody?: Schema$RelocateBucketRequest;
2080
+ }
2017
2081
  export interface Params$Resource$Buckets$Restore extends StandardParameters {
2018
2082
  /**
2019
2083
  * Name of a bucket.
@@ -2023,6 +2087,10 @@ export declare namespace storage_v1 {
2023
2087
  * Generation of a bucket.
2024
2088
  */
2025
2089
  generation?: string;
2090
+ /**
2091
+ * Set of properties to return. Defaults to full.
2092
+ */
2093
+ projection?: string;
2026
2094
  /**
2027
2095
  * The project to be billed for this request. Required for Requester Pays buckets.
2028
2096
  */
@@ -3149,6 +3217,20 @@ export declare namespace storage_v1 {
3149
3217
  list(params: Params$Resource$Objects$List, options: MethodOptions | BodyResponseCallback<Schema$Objects>, callback: BodyResponseCallback<Schema$Objects>): void;
3150
3218
  list(params: Params$Resource$Objects$List, callback: BodyResponseCallback<Schema$Objects>): void;
3151
3219
  list(callback: BodyResponseCallback<Schema$Objects>): void;
3220
+ /**
3221
+ * Moves the source object to the destination object in the same bucket.
3222
+ *
3223
+ * @param params - Parameters for request
3224
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3225
+ * @param callback - Optional callback that handles the response.
3226
+ * @returns A promise if used with async/await, or void if used with a callback.
3227
+ */
3228
+ move(params: Params$Resource$Objects$Move, options: StreamMethodOptions): GaxiosPromise<Readable>;
3229
+ move(params?: Params$Resource$Objects$Move, options?: MethodOptions): GaxiosPromise<Schema$Object>;
3230
+ move(params: Params$Resource$Objects$Move, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
3231
+ move(params: Params$Resource$Objects$Move, options: MethodOptions | BodyResponseCallback<Schema$Object>, callback: BodyResponseCallback<Schema$Object>): void;
3232
+ move(params: Params$Resource$Objects$Move, callback: BodyResponseCallback<Schema$Object>): void;
3233
+ move(callback: BodyResponseCallback<Schema$Object>): void;
3152
3234
  /**
3153
3235
  * Patches an object's metadata.
3154
3236
  *
@@ -3433,6 +3515,10 @@ export declare namespace storage_v1 {
3433
3515
  * Set of properties to return. Defaults to noAcl.
3434
3516
  */
3435
3517
  projection?: string;
3518
+ /**
3519
+ * Restore token used to differentiate soft-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets and if softDeleted is set to true. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation.
3520
+ */
3521
+ restoreToken?: string;
3436
3522
  /**
3437
3523
  * If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete).
3438
3524
  */
@@ -3581,6 +3667,56 @@ export declare namespace storage_v1 {
3581
3667
  */
3582
3668
  versions?: boolean;
3583
3669
  }
3670
+ export interface Params$Resource$Objects$Move extends StandardParameters {
3671
+ /**
3672
+ * Name of the bucket in which the object resides.
3673
+ */
3674
+ bucket?: string;
3675
+ /**
3676
+ * Name of the destination object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
3677
+ */
3678
+ destinationObject?: string;
3679
+ /**
3680
+ * Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. `ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3681
+ */
3682
+ ifGenerationMatch?: string;
3683
+ /**
3684
+ * Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.`ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3685
+ */
3686
+ ifGenerationNotMatch?: string;
3687
+ /**
3688
+ * Makes the operation conditional on whether the destination object's current metageneration matches the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3689
+ */
3690
+ ifMetagenerationMatch?: string;
3691
+ /**
3692
+ * Makes the operation conditional on whether the destination object's current metageneration does not match the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3693
+ */
3694
+ ifMetagenerationNotMatch?: string;
3695
+ /**
3696
+ * Makes the operation conditional on whether the source object's current generation matches the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3697
+ */
3698
+ ifSourceGenerationMatch?: string;
3699
+ /**
3700
+ * Makes the operation conditional on whether the source object's current generation does not match the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3701
+ */
3702
+ ifSourceGenerationNotMatch?: string;
3703
+ /**
3704
+ * Makes the operation conditional on whether the source object's current metageneration matches the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3705
+ */
3706
+ ifSourceMetagenerationMatch?: string;
3707
+ /**
3708
+ * Makes the operation conditional on whether the source object's current metageneration does not match the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.
3709
+ */
3710
+ ifSourceMetagenerationNotMatch?: string;
3711
+ /**
3712
+ * Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
3713
+ */
3714
+ sourceObject?: string;
3715
+ /**
3716
+ * The project to be billed for this request. Required for Requester Pays buckets.
3717
+ */
3718
+ userProject?: string;
3719
+ }
3584
3720
  export interface Params$Resource$Objects$Patch extends StandardParameters {
3585
3721
  /**
3586
3722
  * Name of the bucket in which the object resides.
@@ -3668,6 +3804,10 @@ export declare namespace storage_v1 {
3668
3804
  * Set of properties to return. Defaults to full.
3669
3805
  */
3670
3806
  projection?: string;
3807
+ /**
3808
+ * Restore token used to differentiate sof-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation.
3809
+ */
3810
+ restoreToken?: string;
3671
3811
  /**
3672
3812
  * The project to be billed for this request. Required for Requester Pays buckets.
3673
3813
  */
@@ -3902,6 +4042,20 @@ export declare namespace storage_v1 {
3902
4042
  export class Resource$Operations {
3903
4043
  context: APIRequestContext;
3904
4044
  constructor(context: APIRequestContext);
4045
+ /**
4046
+ * Starts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it to lock the bucket at the source location, and proceed with the bucket location swap. The server makes a best effort to advance the relocate bucket operation, but success is not guaranteed.
4047
+ *
4048
+ * @param params - Parameters for request
4049
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4050
+ * @param callback - Optional callback that handles the response.
4051
+ * @returns A promise if used with async/await, or void if used with a callback.
4052
+ */
4053
+ advanceRelocateBucket(params: Params$Resource$Operations$Advancerelocatebucket, options: StreamMethodOptions): GaxiosPromise<Readable>;
4054
+ advanceRelocateBucket(params?: Params$Resource$Operations$Advancerelocatebucket, options?: MethodOptions): GaxiosPromise<void>;
4055
+ advanceRelocateBucket(params: Params$Resource$Operations$Advancerelocatebucket, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
4056
+ advanceRelocateBucket(params: Params$Resource$Operations$Advancerelocatebucket, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
4057
+ advanceRelocateBucket(params: Params$Resource$Operations$Advancerelocatebucket, callback: BodyResponseCallback<void>): void;
4058
+ advanceRelocateBucket(callback: BodyResponseCallback<void>): void;
3905
4059
  /**
3906
4060
  * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.
3907
4061
  *
@@ -3945,6 +4099,20 @@ export declare namespace storage_v1 {
3945
4099
  list(params: Params$Resource$Operations$List, callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>): void;
3946
4100
  list(callback: BodyResponseCallback<Schema$GoogleLongrunningListOperationsResponse>): void;
3947
4101
  }
4102
+ export interface Params$Resource$Operations$Advancerelocatebucket extends StandardParameters {
4103
+ /**
4104
+ * Name of the bucket to advance the relocate for.
4105
+ */
4106
+ bucket?: string;
4107
+ /**
4108
+ * ID of the operation resource.
4109
+ */
4110
+ operationId?: string;
4111
+ /**
4112
+ * Request body metadata
4113
+ */
4114
+ requestBody?: Schema$AdvanceRelocateBucketOperationRequest;
4115
+ }
3948
4116
  export interface Params$Resource$Operations$Cancel extends StandardParameters {
3949
4117
  /**
3950
4118
  * The parent bucket of the operation resource.
package/build/v1.js CHANGED
@@ -742,6 +742,37 @@ var storage_v1;
742
742
  return (0, googleapis_common_1.createAPIRequest)(parameters);
743
743
  }
744
744
  }
745
+ relocate(paramsOrCallback, optionsOrCallback, callback) {
746
+ let params = (paramsOrCallback || {});
747
+ let options = (optionsOrCallback || {});
748
+ if (typeof paramsOrCallback === 'function') {
749
+ callback = paramsOrCallback;
750
+ params = {};
751
+ options = {};
752
+ }
753
+ if (typeof optionsOrCallback === 'function') {
754
+ callback = optionsOrCallback;
755
+ options = {};
756
+ }
757
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
758
+ const parameters = {
759
+ options: Object.assign({
760
+ url: (rootUrl + '/storage/v1/b/{bucket}/relocate').replace(/([^:]\/)\/+/g, '$1'),
761
+ method: 'POST',
762
+ apiVersion: '',
763
+ }, options),
764
+ params,
765
+ requiredParams: ['bucket'],
766
+ pathParams: ['bucket'],
767
+ context: this.context,
768
+ };
769
+ if (callback) {
770
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
771
+ }
772
+ else {
773
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
774
+ }
775
+ }
745
776
  restore(paramsOrCallback, optionsOrCallback, callback) {
746
777
  let params = (paramsOrCallback || {});
747
778
  let options = (optionsOrCallback || {});
@@ -2101,6 +2132,38 @@ var storage_v1;
2101
2132
  return (0, googleapis_common_1.createAPIRequest)(parameters);
2102
2133
  }
2103
2134
  }
2135
+ move(paramsOrCallback, optionsOrCallback, callback) {
2136
+ let params = (paramsOrCallback || {});
2137
+ let options = (optionsOrCallback || {});
2138
+ if (typeof paramsOrCallback === 'function') {
2139
+ callback = paramsOrCallback;
2140
+ params = {};
2141
+ options = {};
2142
+ }
2143
+ if (typeof optionsOrCallback === 'function') {
2144
+ callback = optionsOrCallback;
2145
+ options = {};
2146
+ }
2147
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
2148
+ const parameters = {
2149
+ options: Object.assign({
2150
+ url: (rootUrl +
2151
+ '/storage/v1/b/{bucket}/o/{sourceObject}/moveTo/o/{destinationObject}').replace(/([^:]\/)\/+/g, '$1'),
2152
+ method: 'POST',
2153
+ apiVersion: '',
2154
+ }, options),
2155
+ params,
2156
+ requiredParams: ['bucket', 'sourceObject', 'destinationObject'],
2157
+ pathParams: ['bucket', 'destinationObject', 'sourceObject'],
2158
+ context: this.context,
2159
+ };
2160
+ if (callback) {
2161
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
2162
+ }
2163
+ else {
2164
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
2165
+ }
2166
+ }
2104
2167
  patch(paramsOrCallback, optionsOrCallback, callback) {
2105
2168
  let params = (paramsOrCallback || {});
2106
2169
  let options = (optionsOrCallback || {});
@@ -2337,6 +2400,39 @@ var storage_v1;
2337
2400
  constructor(context) {
2338
2401
  this.context = context;
2339
2402
  }
2403
+ advanceRelocateBucket(paramsOrCallback, optionsOrCallback, callback) {
2404
+ let params = (paramsOrCallback ||
2405
+ {});
2406
+ let options = (optionsOrCallback || {});
2407
+ if (typeof paramsOrCallback === 'function') {
2408
+ callback = paramsOrCallback;
2409
+ params = {};
2410
+ options = {};
2411
+ }
2412
+ if (typeof optionsOrCallback === 'function') {
2413
+ callback = optionsOrCallback;
2414
+ options = {};
2415
+ }
2416
+ const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
2417
+ const parameters = {
2418
+ options: Object.assign({
2419
+ url: (rootUrl +
2420
+ '/storage/v1/b/{bucket}/operations/{operationId}/advanceRelocateBucket').replace(/([^:]\/)\/+/g, '$1'),
2421
+ method: 'POST',
2422
+ apiVersion: '',
2423
+ }, options),
2424
+ params,
2425
+ requiredParams: ['bucket', 'operationId'],
2426
+ pathParams: ['bucket', 'operationId'],
2427
+ context: this.context,
2428
+ };
2429
+ if (callback) {
2430
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
2431
+ }
2432
+ else {
2433
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
2434
+ }
2435
+ }
2340
2436
  cancel(paramsOrCallback, optionsOrCallback, callback) {
2341
2437
  let params = (paramsOrCallback ||
2342
2438
  {});