Skip to content

Commit f12ebab

Browse files
yoshi-automationsofisl
authored andcommitted
feat(vpcaccess): update the API
#### vpcaccess:v1beta1 The following keys were changed: - resources.projects.resources.locations.resources.operations.methods.list.description #### vpcaccess:v1 The following keys were added: - resources.projects.resources.locations.resources.connectors.methods.patch.description - resources.projects.resources.locations.resources.connectors.methods.patch.flatPath - resources.projects.resources.locations.resources.connectors.methods.patch.httpMethod - resources.projects.resources.locations.resources.connectors.methods.patch.id - resources.projects.resources.locations.resources.connectors.methods.patch.parameterOrder - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.name.description - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.name.location - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.name.pattern - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.name.required - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.name.type - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.updateMask.description - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.updateMask.format - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.updateMask.location - resources.projects.resources.locations.resources.connectors.methods.patch.parameters.updateMask.type - resources.projects.resources.locations.resources.connectors.methods.patch.path - resources.projects.resources.locations.resources.connectors.methods.patch.request.$ref - resources.projects.resources.locations.resources.connectors.methods.patch.response.$ref - resources.projects.resources.locations.resources.connectors.methods.patch.scopes The following keys were changed: - resources.projects.resources.locations.resources.operations.methods.list.description
1 parent d1dcdfe commit f12ebab

File tree

4 files changed

+206
-6
lines changed

4 files changed

+206
-6
lines changed

discovery/vpcaccess-v1.json

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,40 @@
272272
"scopes": [
273273
"https://www.googleapis.com/auth/cloud-platform"
274274
]
275+
},
276+
"patch": {
277+
"description": "Updates a Serverless VPC Access connector, returns an operation.",
278+
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}",
279+
"httpMethod": "PATCH",
280+
"id": "vpcaccess.projects.locations.connectors.patch",
281+
"parameterOrder": [
282+
"name"
283+
],
284+
"parameters": {
285+
"name": {
286+
"description": "The resource name in the format `projects/*/locations/*/connectors/*`.",
287+
"location": "path",
288+
"pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$",
289+
"required": true,
290+
"type": "string"
291+
},
292+
"updateMask": {
293+
"description": "The fields to update on the entry group. If absent or empty, all modifiable fields are updated.",
294+
"format": "google-fieldmask",
295+
"location": "query",
296+
"type": "string"
297+
}
298+
},
299+
"path": "v1/{+name}",
300+
"request": {
301+
"$ref": "Connector"
302+
},
303+
"response": {
304+
"$ref": "Operation"
305+
},
306+
"scopes": [
307+
"https://www.googleapis.com/auth/cloud-platform"
308+
]
275309
}
276310
}
277311
},
@@ -303,7 +337,7 @@
303337
]
304338
},
305339
"list": {
306-
"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
340+
"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
307341
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations",
308342
"httpMethod": "GET",
309343
"id": "vpcaccess.projects.locations.operations.list",
@@ -350,7 +384,7 @@
350384
}
351385
}
352386
},
353-
"revision": "20230222",
387+
"revision": "20230309",
354388
"rootUrl": "https://vpcaccess.googleapis.com/",
355389
"schemas": {
356390
"Connector": {

discovery/vpcaccess-v1beta1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
]
338338
},
339339
"list": {
340-
"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
340+
"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.",
341341
"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations",
342342
"httpMethod": "GET",
343343
"id": "vpcaccess.projects.locations.operations.list",
@@ -384,7 +384,7 @@
384384
}
385385
}
386386
},
387-
"revision": "20230222",
387+
"revision": "20230309",
388388
"rootUrl": "https://vpcaccess.googleapis.com/",
389389
"schemas": {
390390
"Connector": {

src/apis/vpcaccess/v1.ts

Lines changed: 167 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,156 @@ export namespace vpcaccess_v1 {
11041104
return createAPIRequest<Schema$ListConnectorsResponse>(parameters);
11051105
}
11061106
}
1107+
1108+
/**
1109+
* Updates a Serverless VPC Access connector, returns an operation.
1110+
* @example
1111+
* ```js
1112+
* // Before running the sample:
1113+
* // - Enable the API at:
1114+
* // https://console.developers.google.com/apis/api/vpcaccess.googleapis.com
1115+
* // - Login into gcloud by running:
1116+
* // `$ gcloud auth application-default login`
1117+
* // - Install the npm module by running:
1118+
* // `$ npm install googleapis`
1119+
*
1120+
* const {google} = require('googleapis');
1121+
* const vpcaccess = google.vpcaccess('v1');
1122+
*
1123+
* async function main() {
1124+
* const auth = new google.auth.GoogleAuth({
1125+
* // Scopes can be specified either as an array or as a single, space-delimited string.
1126+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1127+
* });
1128+
*
1129+
* // Acquire an auth client, and bind it to all future calls
1130+
* const authClient = await auth.getClient();
1131+
* google.options({auth: authClient});
1132+
*
1133+
* // Do the magic
1134+
* const res = await vpcaccess.projects.locations.connectors.patch({
1135+
* // The resource name in the format `projects/x/locations/x/connectors/x`.
1136+
* name: 'projects/my-project/locations/my-location/connectors/my-connector',
1137+
* // The fields to update on the entry group. If absent or empty, all modifiable fields are updated.
1138+
* updateMask: 'placeholder-value',
1139+
*
1140+
* // Request body metadata
1141+
* requestBody: {
1142+
* // request body parameters
1143+
* // {
1144+
* // "connectedProjects": [],
1145+
* // "ipCidrRange": "my_ipCidrRange",
1146+
* // "machineType": "my_machineType",
1147+
* // "maxInstances": 0,
1148+
* // "maxThroughput": 0,
1149+
* // "minInstances": 0,
1150+
* // "minThroughput": 0,
1151+
* // "name": "my_name",
1152+
* // "network": "my_network",
1153+
* // "state": "my_state",
1154+
* // "subnet": {}
1155+
* // }
1156+
* },
1157+
* });
1158+
* console.log(res.data);
1159+
*
1160+
* // Example response
1161+
* // {
1162+
* // "done": false,
1163+
* // "error": {},
1164+
* // "metadata": {},
1165+
* // "name": "my_name",
1166+
* // "response": {}
1167+
* // }
1168+
* }
1169+
*
1170+
* main().catch(e => {
1171+
* console.error(e);
1172+
* throw e;
1173+
* });
1174+
*
1175+
* ```
1176+
*
1177+
* @param params - Parameters for request
1178+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1179+
* @param callback - Optional callback that handles the response.
1180+
* @returns A promise if used with async/await, or void if used with a callback.
1181+
*/
1182+
patch(
1183+
params: Params$Resource$Projects$Locations$Connectors$Patch,
1184+
options: StreamMethodOptions
1185+
): GaxiosPromise<Readable>;
1186+
patch(
1187+
params?: Params$Resource$Projects$Locations$Connectors$Patch,
1188+
options?: MethodOptions
1189+
): GaxiosPromise<Schema$Operation>;
1190+
patch(
1191+
params: Params$Resource$Projects$Locations$Connectors$Patch,
1192+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
1193+
callback: BodyResponseCallback<Readable>
1194+
): void;
1195+
patch(
1196+
params: Params$Resource$Projects$Locations$Connectors$Patch,
1197+
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1198+
callback: BodyResponseCallback<Schema$Operation>
1199+
): void;
1200+
patch(
1201+
params: Params$Resource$Projects$Locations$Connectors$Patch,
1202+
callback: BodyResponseCallback<Schema$Operation>
1203+
): void;
1204+
patch(callback: BodyResponseCallback<Schema$Operation>): void;
1205+
patch(
1206+
paramsOrCallback?:
1207+
| Params$Resource$Projects$Locations$Connectors$Patch
1208+
| BodyResponseCallback<Schema$Operation>
1209+
| BodyResponseCallback<Readable>,
1210+
optionsOrCallback?:
1211+
| MethodOptions
1212+
| StreamMethodOptions
1213+
| BodyResponseCallback<Schema$Operation>
1214+
| BodyResponseCallback<Readable>,
1215+
callback?:
1216+
| BodyResponseCallback<Schema$Operation>
1217+
| BodyResponseCallback<Readable>
1218+
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1219+
let params = (paramsOrCallback ||
1220+
{}) as Params$Resource$Projects$Locations$Connectors$Patch;
1221+
let options = (optionsOrCallback || {}) as MethodOptions;
1222+
1223+
if (typeof paramsOrCallback === 'function') {
1224+
callback = paramsOrCallback;
1225+
params = {} as Params$Resource$Projects$Locations$Connectors$Patch;
1226+
options = {};
1227+
}
1228+
1229+
if (typeof optionsOrCallback === 'function') {
1230+
callback = optionsOrCallback;
1231+
options = {};
1232+
}
1233+
1234+
const rootUrl = options.rootUrl || 'https://vpcaccess.googleapis.com/';
1235+
const parameters = {
1236+
options: Object.assign(
1237+
{
1238+
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1239+
method: 'PATCH',
1240+
},
1241+
options
1242+
),
1243+
params,
1244+
requiredParams: ['name'],
1245+
pathParams: ['name'],
1246+
context: this.context,
1247+
};
1248+
if (callback) {
1249+
createAPIRequest<Schema$Operation>(
1250+
parameters,
1251+
callback as BodyResponseCallback<unknown>
1252+
);
1253+
} else {
1254+
return createAPIRequest<Schema$Operation>(parameters);
1255+
}
1256+
}
11071257
}
11081258

11091259
export interface Params$Resource$Projects$Locations$Connectors$Create
@@ -1151,6 +1301,22 @@ export namespace vpcaccess_v1 {
11511301
*/
11521302
parent?: string;
11531303
}
1304+
export interface Params$Resource$Projects$Locations$Connectors$Patch
1305+
extends StandardParameters {
1306+
/**
1307+
* The resource name in the format `projects/x/locations/x/connectors/x`.
1308+
*/
1309+
name?: string;
1310+
/**
1311+
* The fields to update on the entry group. If absent or empty, all modifiable fields are updated.
1312+
*/
1313+
updateMask?: string;
1314+
1315+
/**
1316+
* Request body metadata
1317+
*/
1318+
requestBody?: Schema$Connector;
1319+
}
11541320

11551321
export class Resource$Projects$Locations$Operations {
11561322
context: APIRequestContext;
@@ -1289,7 +1455,7 @@ export namespace vpcaccess_v1 {
12891455
}
12901456

12911457
/**
1292-
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
1458+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
12931459
* @example
12941460
* ```js
12951461
* // Before running the sample:

src/apis/vpcaccess/v1beta1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ export namespace vpcaccess_v1beta1 {
14551455
}
14561456

14571457
/**
1458-
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
1458+
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
14591459
* @example
14601460
* ```js
14611461
* // Before running the sample:

0 commit comments

Comments
 (0)