Skip to content

Commit e40cb95

Browse files
yoshi-automationsofisl
authored andcommitted
feat(storage): update the API
#### storage:v1 The following keys were added: - resources.buckets.methods.relocate.description - resources.buckets.methods.relocate.httpMethod - resources.buckets.methods.relocate.id - resources.buckets.methods.relocate.parameterOrder - resources.buckets.methods.relocate.parameters.bucket.description - resources.buckets.methods.relocate.parameters.bucket.location - resources.buckets.methods.relocate.parameters.bucket.required - resources.buckets.methods.relocate.parameters.bucket.type - resources.buckets.methods.relocate.path - resources.buckets.methods.relocate.request.$ref - resources.buckets.methods.relocate.response.$ref - resources.buckets.methods.relocate.scopes - resources.objects.methods.get.parameters.restoreToken.description - resources.objects.methods.get.parameters.restoreToken.location - resources.objects.methods.get.parameters.restoreToken.type - resources.objects.methods.restore.parameters.restoreToken.description - resources.objects.methods.restore.parameters.restoreToken.location - resources.objects.methods.restore.parameters.restoreToken.type - schemas.Object.properties.restoreToken.description - schemas.Object.properties.restoreToken.type - schemas.RelocateBucketRequest.description - schemas.RelocateBucketRequest.id - schemas.RelocateBucketRequest.properties.destinationCustomPlacementConfig.description - schemas.RelocateBucketRequest.properties.destinationCustomPlacementConfig.properties.dataLocations.description - schemas.RelocateBucketRequest.properties.destinationCustomPlacementConfig.properties.dataLocations.items.type - schemas.RelocateBucketRequest.properties.destinationCustomPlacementConfig.properties.dataLocations.type - schemas.RelocateBucketRequest.properties.destinationCustomPlacementConfig.type - schemas.RelocateBucketRequest.properties.destinationLocation.description - schemas.RelocateBucketRequest.properties.destinationLocation.type - schemas.RelocateBucketRequest.properties.validateOnly.description - schemas.RelocateBucketRequest.properties.validateOnly.type - schemas.RelocateBucketRequest.type The following keys were changed: - endpoints
1 parent 3c85e30 commit e40cb95

File tree

2 files changed

+256
-2
lines changed

2 files changed

+256
-2
lines changed

discovery/storage-v1.json

Lines changed: 122 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"endpointUrl": "https://storage.europe-west3.rep.googleapis.com/",
3333
"location": "europe-west3"
3434
},
35+
{
36+
"description": "Regional Endpoint",
37+
"endpointUrl": "https://storage.europe-west8.rep.googleapis.com/",
38+
"location": "europe-west8"
39+
},
3540
{
3641
"description": "Regional Endpoint",
3742
"endpointUrl": "https://storage.europe-west9.rep.googleapis.com/",
@@ -41,9 +46,54 @@
4146
"description": "Regional Endpoint",
4247
"endpointUrl": "https://storage.me-central2.rep.googleapis.com/",
4348
"location": "me-central2"
49+
},
50+
{
51+
"description": "Regional Endpoint",
52+
"endpointUrl": "https://storage.us-central1.rep.googleapis.com/",
53+
"location": "us-central1"
54+
},
55+
{
56+
"description": "Regional Endpoint",
57+
"endpointUrl": "https://storage.us-east1.rep.googleapis.com/",
58+
"location": "us-east1"
59+
},
60+
{
61+
"description": "Regional Endpoint",
62+
"endpointUrl": "https://storage.us-east4.rep.googleapis.com/",
63+
"location": "us-east4"
64+
},
65+
{
66+
"description": "Regional Endpoint",
67+
"endpointUrl": "https://storage.us-east5.rep.googleapis.com/",
68+
"location": "us-east5"
69+
},
70+
{
71+
"description": "Regional Endpoint",
72+
"endpointUrl": "https://storage.us-south1.rep.googleapis.com/",
73+
"location": "us-south1"
74+
},
75+
{
76+
"description": "Regional Endpoint",
77+
"endpointUrl": "https://storage.us-west1.rep.googleapis.com/",
78+
"location": "us-west1"
79+
},
80+
{
81+
"description": "Regional Endpoint",
82+
"endpointUrl": "https://storage.us-west2.rep.googleapis.com/",
83+
"location": "us-west2"
84+
},
85+
{
86+
"description": "Regional Endpoint",
87+
"endpointUrl": "https://storage.us-west3.rep.googleapis.com/",
88+
"location": "us-west3"
89+
},
90+
{
91+
"description": "Regional Endpoint",
92+
"endpointUrl": "https://storage.us-west4.rep.googleapis.com/",
93+
"location": "us-west4"
4494
}
4595
],
46-
"etag": "\"38363036373236373330353534313035333932\"",
96+
"etag": "\"3133363239393031373133303332303839383336\"",
4797
"icons": {
4898
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
4999
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
@@ -1029,6 +1079,34 @@
10291079
"https://www.googleapis.com/auth/devstorage.full_control"
10301080
]
10311081
},
1082+
"relocate": {
1083+
"description": "Initiates a long-running Relocate Bucket operation on the specified bucket.",
1084+
"httpMethod": "POST",
1085+
"id": "storage.buckets.relocate",
1086+
"parameterOrder": [
1087+
"bucket"
1088+
],
1089+
"parameters": {
1090+
"bucket": {
1091+
"description": "Name of the bucket to be moved.",
1092+
"location": "path",
1093+
"required": true,
1094+
"type": "string"
1095+
}
1096+
},
1097+
"path": "b/{bucket}/relocate",
1098+
"request": {
1099+
"$ref": "RelocateBucketRequest"
1100+
},
1101+
"response": {
1102+
"$ref": "GoogleLongrunningOperation"
1103+
},
1104+
"scopes": [
1105+
"https://www.googleapis.com/auth/cloud-platform",
1106+
"https://www.googleapis.com/auth/devstorage.full_control",
1107+
"https://www.googleapis.com/auth/devstorage.read_write"
1108+
]
1109+
},
10321110
"restore": {
10331111
"description": "Restores a soft-deleted bucket.",
10341112
"httpMethod": "POST",
@@ -2829,6 +2907,11 @@
28292907
"location": "query",
28302908
"type": "string"
28312909
},
2910+
"restoreToken": {
2911+
"description": "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.",
2912+
"location": "query",
2913+
"type": "string"
2914+
},
28322915
"softDeleted": {
28332916
"description": "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).",
28342917
"location": "query",
@@ -3304,6 +3387,11 @@
33043387
"location": "query",
33053388
"type": "string"
33063389
},
3390+
"restoreToken": {
3391+
"description": "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.",
3392+
"location": "query",
3393+
"type": "string"
3394+
},
33073395
"userProject": {
33083396
"description": "The project to be billed for this request. Required for Requester Pays buckets.",
33093397
"location": "query",
@@ -4136,7 +4224,7 @@
41364224
}
41374225
}
41384226
},
4139-
"revision": "20240819",
4227+
"revision": "20240924",
41404228
"rootUrl": "https://storage.googleapis.com/",
41414229
"schemas": {
41424230
"AnywhereCache": {
@@ -5597,6 +5685,10 @@
55975685
},
55985686
"type": "object"
55995687
},
5688+
"restoreToken": {
5689+
"description": "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.",
5690+
"type": "string"
5691+
},
56005692
"retention": {
56015693
"description": "A collection of object level retention parameters.",
56025694
"properties": {
@@ -5865,6 +5957,34 @@
58655957
},
58665958
"type": "object"
58675959
},
5960+
"RelocateBucketRequest": {
5961+
"description": "A Relocate Bucket request.",
5962+
"id": "RelocateBucketRequest",
5963+
"properties": {
5964+
"destinationCustomPlacementConfig": {
5965+
"description": "The bucket's new custom placement configuration if relocating to a Custom Dual Region.",
5966+
"properties": {
5967+
"dataLocations": {
5968+
"description": "The list of regional locations in which data is placed.",
5969+
"items": {
5970+
"type": "string"
5971+
},
5972+
"type": "array"
5973+
}
5974+
},
5975+
"type": "object"
5976+
},
5977+
"destinationLocation": {
5978+
"description": "The new location the bucket will be relocated to.",
5979+
"type": "string"
5980+
},
5981+
"validateOnly": {
5982+
"description": "If true, validate the operation, but do not actually relocate the bucket.",
5983+
"type": "boolean"
5984+
}
5985+
},
5986+
"type": "object"
5987+
},
58685988
"RewriteResponse": {
58695989
"description": "A rewrite response.",
58705990
"id": "RewriteResponse",

src/apis/storage/v1.ts

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,10 @@ export namespace storage_v1 {
10581058
* The owner of the object. This will always be the uploader of the object.
10591059
*/
10601060
owner?: {entity?: string; entityId?: string} | null;
1061+
/**
1062+
* 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.
1063+
*/
1064+
restoreToken?: string | null;
10611065
/**
10621066
* A collection of object level retention parameters.
10631067
*/
@@ -1234,6 +1238,23 @@ export namespace storage_v1 {
12341238
*/
12351239
version?: number | null;
12361240
}
1241+
/**
1242+
* A Relocate Bucket request.
1243+
*/
1244+
export interface Schema$RelocateBucketRequest {
1245+
/**
1246+
* The bucket's new custom placement configuration if relocating to a Custom Dual Region.
1247+
*/
1248+
destinationCustomPlacementConfig?: {dataLocations?: string[]} | null;
1249+
/**
1250+
* The new location the bucket will be relocated to.
1251+
*/
1252+
destinationLocation?: string | null;
1253+
/**
1254+
* If true, validate the operation, but do not actually relocate the bucket.
1255+
*/
1256+
validateOnly?: boolean | null;
1257+
}
12371258
/**
12381259
* A rewrite response.
12391260
*/
@@ -3384,6 +3405,100 @@ export namespace storage_v1 {
33843405
}
33853406
}
33863407

3408+
/**
3409+
* Initiates a long-running Relocate Bucket operation on the specified bucket.
3410+
*
3411+
* @param params - Parameters for request
3412+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3413+
* @param callback - Optional callback that handles the response.
3414+
* @returns A promise if used with async/await, or void if used with a callback.
3415+
*/
3416+
relocate(
3417+
params: Params$Resource$Buckets$Relocate,
3418+
options: StreamMethodOptions
3419+
): GaxiosPromise<Readable>;
3420+
relocate(
3421+
params?: Params$Resource$Buckets$Relocate,
3422+
options?: MethodOptions
3423+
): GaxiosPromise<Schema$GoogleLongrunningOperation>;
3424+
relocate(
3425+
params: Params$Resource$Buckets$Relocate,
3426+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
3427+
callback: BodyResponseCallback<Readable>
3428+
): void;
3429+
relocate(
3430+
params: Params$Resource$Buckets$Relocate,
3431+
options:
3432+
| MethodOptions
3433+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>,
3434+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
3435+
): void;
3436+
relocate(
3437+
params: Params$Resource$Buckets$Relocate,
3438+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
3439+
): void;
3440+
relocate(
3441+
callback: BodyResponseCallback<Schema$GoogleLongrunningOperation>
3442+
): void;
3443+
relocate(
3444+
paramsOrCallback?:
3445+
| Params$Resource$Buckets$Relocate
3446+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
3447+
| BodyResponseCallback<Readable>,
3448+
optionsOrCallback?:
3449+
| MethodOptions
3450+
| StreamMethodOptions
3451+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
3452+
| BodyResponseCallback<Readable>,
3453+
callback?:
3454+
| BodyResponseCallback<Schema$GoogleLongrunningOperation>
3455+
| BodyResponseCallback<Readable>
3456+
):
3457+
| void
3458+
| GaxiosPromise<Schema$GoogleLongrunningOperation>
3459+
| GaxiosPromise<Readable> {
3460+
let params = (paramsOrCallback || {}) as Params$Resource$Buckets$Relocate;
3461+
let options = (optionsOrCallback || {}) as MethodOptions;
3462+
3463+
if (typeof paramsOrCallback === 'function') {
3464+
callback = paramsOrCallback;
3465+
params = {} as Params$Resource$Buckets$Relocate;
3466+
options = {};
3467+
}
3468+
3469+
if (typeof optionsOrCallback === 'function') {
3470+
callback = optionsOrCallback;
3471+
options = {};
3472+
}
3473+
3474+
const rootUrl = options.rootUrl || 'https://storage.googleapis.com/';
3475+
const parameters = {
3476+
options: Object.assign(
3477+
{
3478+
url: (rootUrl + '/storage/v1/b/{bucket}/relocate').replace(
3479+
/([^:]\/)\/+/g,
3480+
'$1'
3481+
),
3482+
method: 'POST',
3483+
apiVersion: '',
3484+
},
3485+
options
3486+
),
3487+
params,
3488+
requiredParams: ['bucket'],
3489+
pathParams: ['bucket'],
3490+
context: this.context,
3491+
};
3492+
if (callback) {
3493+
createAPIRequest<Schema$GoogleLongrunningOperation>(
3494+
parameters,
3495+
callback as BodyResponseCallback<unknown>
3496+
);
3497+
} else {
3498+
return createAPIRequest<Schema$GoogleLongrunningOperation>(parameters);
3499+
}
3500+
}
3501+
33873502
/**
33883503
* Restores a soft-deleted bucket.
33893504
*
@@ -3924,6 +4039,17 @@ export namespace storage_v1 {
39244039
*/
39254040
requestBody?: Schema$Bucket;
39264041
}
4042+
export interface Params$Resource$Buckets$Relocate extends StandardParameters {
4043+
/**
4044+
* Name of the bucket to be moved.
4045+
*/
4046+
bucket?: string;
4047+
4048+
/**
4049+
* Request body metadata
4050+
*/
4051+
requestBody?: Schema$RelocateBucketRequest;
4052+
}
39274053
export interface Params$Resource$Buckets$Restore extends StandardParameters {
39284054
/**
39294055
* Name of a bucket.
@@ -8709,6 +8835,10 @@ export namespace storage_v1 {
87098835
* Set of properties to return. Defaults to noAcl.
87108836
*/
87118837
projection?: string;
8838+
/**
8839+
* 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.
8840+
*/
8841+
restoreToken?: string;
87128842
/**
87138843
* 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).
87148844
*/
@@ -8949,6 +9079,10 @@ export namespace storage_v1 {
89499079
* Set of properties to return. Defaults to full.
89509080
*/
89519081
projection?: string;
9082+
/**
9083+
* 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.
9084+
*/
9085+
restoreToken?: string;
89529086
/**
89539087
* The project to be billed for this request. Required for Requester Pays buckets.
89549088
*/

0 commit comments

Comments
 (0)