Skip to content

Commit 1f629e3

Browse files
feat(storage): update the API
#### storage:v1 The following keys were added: - resources.operations.methods.advanceRelocateBucket.description - resources.operations.methods.advanceRelocateBucket.httpMethod - resources.operations.methods.advanceRelocateBucket.id - resources.operations.methods.advanceRelocateBucket.parameterOrder - resources.operations.methods.advanceRelocateBucket.parameters.bucket.description - resources.operations.methods.advanceRelocateBucket.parameters.bucket.location - resources.operations.methods.advanceRelocateBucket.parameters.bucket.required - resources.operations.methods.advanceRelocateBucket.parameters.bucket.type - resources.operations.methods.advanceRelocateBucket.parameters.operationId.description - resources.operations.methods.advanceRelocateBucket.parameters.operationId.location - resources.operations.methods.advanceRelocateBucket.parameters.operationId.required - resources.operations.methods.advanceRelocateBucket.parameters.operationId.type - resources.operations.methods.advanceRelocateBucket.path - resources.operations.methods.advanceRelocateBucket.request.$ref - resources.operations.methods.advanceRelocateBucket.scopes - schemas.AdvanceRelocateBucketOperationRequest.description - schemas.AdvanceRelocateBucketOperationRequest.id - schemas.AdvanceRelocateBucketOperationRequest.properties.expireTime.description - schemas.AdvanceRelocateBucketOperationRequest.properties.expireTime.format - schemas.AdvanceRelocateBucketOperationRequest.properties.expireTime.type - schemas.AdvanceRelocateBucketOperationRequest.properties.ttl.description - schemas.AdvanceRelocateBucketOperationRequest.properties.ttl.format - schemas.AdvanceRelocateBucketOperationRequest.properties.ttl.type - schemas.AdvanceRelocateBucketOperationRequest.type
1 parent e204b50 commit 1f629e3

File tree

2 files changed

+166
-2
lines changed

2 files changed

+166
-2
lines changed

discovery/storage-v1.json

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"location": "us-west4"
9494
}
9595
],
96-
"etag": "\"3133363239393031373133303332303839383336\"",
96+
"etag": "\"3132333635343336333933383332343134323139\"",
9797
"icons": {
9898
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
9999
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
@@ -3869,6 +3869,38 @@
38693869
},
38703870
"operations": {
38713871
"methods": {
3872+
"advanceRelocateBucket": {
3873+
"description": "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.",
3874+
"httpMethod": "POST",
3875+
"id": "storage.buckets.operations.advanceRelocateBucket",
3876+
"parameterOrder": [
3877+
"bucket",
3878+
"operationId"
3879+
],
3880+
"parameters": {
3881+
"bucket": {
3882+
"description": "Name of the bucket to advance the relocate for.",
3883+
"location": "path",
3884+
"required": true,
3885+
"type": "string"
3886+
},
3887+
"operationId": {
3888+
"description": "ID of the operation resource.",
3889+
"location": "path",
3890+
"required": true,
3891+
"type": "string"
3892+
}
3893+
},
3894+
"path": "b/{bucket}/operations/{operationId}/advanceRelocateBucket",
3895+
"request": {
3896+
"$ref": "AdvanceRelocateBucketOperationRequest"
3897+
},
3898+
"scopes": [
3899+
"https://www.googleapis.com/auth/cloud-platform",
3900+
"https://www.googleapis.com/auth/devstorage.full_control",
3901+
"https://www.googleapis.com/auth/devstorage.read_write"
3902+
]
3903+
},
38723904
"cancel": {
38733905
"description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.",
38743906
"httpMethod": "POST",
@@ -4224,9 +4256,26 @@
42244256
}
42254257
}
42264258
},
4227-
"revision": "20240924",
4259+
"revision": "20241008",
42284260
"rootUrl": "https://storage.googleapis.com/",
42294261
"schemas": {
4262+
"AdvanceRelocateBucketOperationRequest": {
4263+
"description": "An AdvanceRelocateBucketOperation request.",
4264+
"id": "AdvanceRelocateBucketOperationRequest",
4265+
"properties": {
4266+
"expireTime": {
4267+
"description": "Specifies the time when the relocation will revert to the sync stage if the relocation hasn't succeeded.",
4268+
"format": "date-time",
4269+
"type": "string"
4270+
},
4271+
"ttl": {
4272+
"description": "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.",
4273+
"format": "google-duration",
4274+
"type": "string"
4275+
}
4276+
},
4277+
"type": "object"
4278+
},
42304279
"AnywhereCache": {
42314280
"description": "An Anywhere Cache instance.",
42324281
"id": "AnywhereCache",

src/apis/storage/v1.ts

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,19 @@ export namespace storage_v1 {
139139
}
140140
}
141141

142+
/**
143+
* An AdvanceRelocateBucketOperation request.
144+
*/
145+
export interface Schema$AdvanceRelocateBucketOperationRequest {
146+
/**
147+
* Specifies the time when the relocation will revert to the sync stage if the relocation hasn't succeeded.
148+
*/
149+
expireTime?: string | null;
150+
/**
151+
* 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.
152+
*/
153+
ttl?: string | null;
154+
}
142155
/**
143156
* An Anywhere Cache instance.
144157
*/
@@ -9327,6 +9340,92 @@ export namespace storage_v1 {
93279340
this.context = context;
93289341
}
93299342

9343+
/**
9344+
* 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.
9345+
*
9346+
* @param params - Parameters for request
9347+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
9348+
* @param callback - Optional callback that handles the response.
9349+
* @returns A promise if used with async/await, or void if used with a callback.
9350+
*/
9351+
advanceRelocateBucket(
9352+
params: Params$Resource$Operations$Advancerelocatebucket,
9353+
options: StreamMethodOptions
9354+
): GaxiosPromise<Readable>;
9355+
advanceRelocateBucket(
9356+
params?: Params$Resource$Operations$Advancerelocatebucket,
9357+
options?: MethodOptions
9358+
): GaxiosPromise<void>;
9359+
advanceRelocateBucket(
9360+
params: Params$Resource$Operations$Advancerelocatebucket,
9361+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
9362+
callback: BodyResponseCallback<Readable>
9363+
): void;
9364+
advanceRelocateBucket(
9365+
params: Params$Resource$Operations$Advancerelocatebucket,
9366+
options: MethodOptions | BodyResponseCallback<void>,
9367+
callback: BodyResponseCallback<void>
9368+
): void;
9369+
advanceRelocateBucket(
9370+
params: Params$Resource$Operations$Advancerelocatebucket,
9371+
callback: BodyResponseCallback<void>
9372+
): void;
9373+
advanceRelocateBucket(callback: BodyResponseCallback<void>): void;
9374+
advanceRelocateBucket(
9375+
paramsOrCallback?:
9376+
| Params$Resource$Operations$Advancerelocatebucket
9377+
| BodyResponseCallback<void>
9378+
| BodyResponseCallback<Readable>,
9379+
optionsOrCallback?:
9380+
| MethodOptions
9381+
| StreamMethodOptions
9382+
| BodyResponseCallback<void>
9383+
| BodyResponseCallback<Readable>,
9384+
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
9385+
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
9386+
let params = (paramsOrCallback ||
9387+
{}) as Params$Resource$Operations$Advancerelocatebucket;
9388+
let options = (optionsOrCallback || {}) as MethodOptions;
9389+
9390+
if (typeof paramsOrCallback === 'function') {
9391+
callback = paramsOrCallback;
9392+
params = {} as Params$Resource$Operations$Advancerelocatebucket;
9393+
options = {};
9394+
}
9395+
9396+
if (typeof optionsOrCallback === 'function') {
9397+
callback = optionsOrCallback;
9398+
options = {};
9399+
}
9400+
9401+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
9402+
const parameters = {
9403+
options: Object.assign(
9404+
{
9405+
url: (
9406+
rootUrl +
9407+
'/storage/v1/b/{bucket}/operations/{operationId}/advanceRelocateBucket'
9408+
).replace(/([^:]\/)\/+/g, '$1'),
9409+
method: 'POST',
9410+
apiVersion: '',
9411+
},
9412+
options
9413+
),
9414+
params,
9415+
requiredParams: ['bucket', 'operationId'],
9416+
pathParams: ['bucket', 'operationId'],
9417+
context: this.context,
9418+
};
9419+
if (callback) {
9420+
createAPIRequest<void>(
9421+
parameters,
9422+
callback as BodyResponseCallback<unknown>
9423+
);
9424+
} else {
9425+
return createAPIRequest<void>(parameters);
9426+
}
9427+
}
9428+
93309429
/**
93319430
* Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.
93329431
*
@@ -9602,6 +9701,22 @@ export namespace storage_v1 {
96029701
}
96039702
}
96049703

9704+
export interface Params$Resource$Operations$Advancerelocatebucket
9705+
extends StandardParameters {
9706+
/**
9707+
* Name of the bucket to advance the relocate for.
9708+
*/
9709+
bucket?: string;
9710+
/**
9711+
* ID of the operation resource.
9712+
*/
9713+
operationId?: string;
9714+
9715+
/**
9716+
* Request body metadata
9717+
*/
9718+
requestBody?: Schema$AdvanceRelocateBucketOperationRequest;
9719+
}
96059720
export interface Params$Resource$Operations$Cancel
96069721
extends StandardParameters {
96079722
/**

0 commit comments

Comments
 (0)