Skip to content

Commit

Permalink
feat(servicenetworking): update the API
Browse files Browse the repository at this point in the history
#### servicenetworking:v1beta

The following keys were changed:
- schemas.Service.properties.configVersion.description

#### servicenetworking:v1

The following keys were added:
- resources.services.resources.connections.methods.deleteConnection.description
- resources.services.resources.connections.methods.deleteConnection.flatPath
- resources.services.resources.connections.methods.deleteConnection.httpMethod
- resources.services.resources.connections.methods.deleteConnection.id
- resources.services.resources.connections.methods.deleteConnection.parameterOrder
- resources.services.resources.connections.methods.deleteConnection.parameters.name.description
- resources.services.resources.connections.methods.deleteConnection.parameters.name.location
- resources.services.resources.connections.methods.deleteConnection.parameters.name.pattern
- resources.services.resources.connections.methods.deleteConnection.parameters.name.required
- resources.services.resources.connections.methods.deleteConnection.parameters.name.type
- resources.services.resources.connections.methods.deleteConnection.path
- resources.services.resources.connections.methods.deleteConnection.request.$ref
- resources.services.resources.connections.methods.deleteConnection.response.$ref
- resources.services.resources.connections.methods.deleteConnection.scopes
- schemas.DeleteConnectionRequest.description
- schemas.DeleteConnectionRequest.id
- schemas.DeleteConnectionRequest.properties.consumerNetwork.description
- schemas.DeleteConnectionRequest.properties.consumerNetwork.type
- schemas.DeleteConnectionRequest.type

The following keys were changed:
- schemas.Service.properties.configVersion.description
  • Loading branch information
yoshi-automation authored and sofisl committed Apr 5, 2021
1 parent 1134cc9 commit 63edb25
Show file tree
Hide file tree
Showing 4 changed files with 209 additions and 6 deletions.
44 changes: 42 additions & 2 deletions discovery/servicenetworking-v1.json
Expand Up @@ -415,6 +415,35 @@
"https://www.googleapis.com/auth/service.management"
]
},
"deleteConnection": {
"description": "Deletes a private service access connection.",
"flatPath": "v1/services/{servicesId}/connections/{connectionsId}",
"httpMethod": "POST",
"id": "servicenetworking.services.connections.deleteConnection",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name}/connections/{vpc_peering_name}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.",
"location": "path",
"pattern": "^services/[^/]+/connections/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "DeleteConnectionRequest"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management"
]
},
"list": {
"description": "List the private connections that are configured in a service consumer's VPC network.",
"flatPath": "v1/services/{servicesId}/connections",
Expand Down Expand Up @@ -831,7 +860,7 @@
}
}
},
"revision": "20210319",
"revision": "20210331",
"rootUrl": "https://servicenetworking.googleapis.com/",
"schemas": {
"AddDnsRecordSetMetadata": {
Expand Down Expand Up @@ -1473,6 +1502,17 @@
"properties": {},
"type": "object"
},
"DeleteConnectionRequest": {
"description": "Request to delete a private service access connection. The call will fail if there are any managed service instances using this connection.",
"id": "DeleteConnectionRequest",
"properties": {
"consumerNetwork": {
"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is a network name.",
"type": "string"
}
},
"type": "object"
},
"DeletePeeredDnsDomainMetadata": {
"description": "Metadata provided through GetOperation request for the LRO generated by DeletePeeredDnsDomain API.",
"id": "DeletePeeredDnsDomainMetadata",
Expand Down Expand Up @@ -2819,7 +2859,7 @@
"description": "Billing configuration."
},
"configVersion": {
"description": "Deprecated. The service config compiler always sets this field to `3`.",
"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.",
"format": "uint32",
"type": "integer"
},
Expand Down
4 changes: 2 additions & 2 deletions discovery/servicenetworking-v1beta.json
Expand Up @@ -307,7 +307,7 @@
}
}
},
"revision": "20210319",
"revision": "20210331",
"rootUrl": "https://servicenetworking.googleapis.com/",
"schemas": {
"AddDnsRecordSetMetadata": {
Expand Down Expand Up @@ -2060,7 +2060,7 @@
"description": "Billing configuration."
},
"configVersion": {
"description": "Deprecated. The service config compiler always sets this field to `3`.",
"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.",
"format": "uint32",
"type": "integer"
},
Expand Down
165 changes: 164 additions & 1 deletion src/apis/servicenetworking/v1.ts
Expand Up @@ -604,6 +604,15 @@ export namespace servicenetworking_v1 {
* Metadata provided through GetOperation request for the LRO generated by Delete Connection API
*/
export interface Schema$DeleteConnectionMetadata {}
/**
* Request to delete a private service access connection. The call will fail if there are any managed service instances using this connection.
*/
export interface Schema$DeleteConnectionRequest {
/**
* Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project\}/global/networks/{network\} {project\} is a project number, as in '12345' {network\} is a network name.
*/
consumerNetwork?: string | null;
}
/**
* Metadata provided through GetOperation request for the LRO generated by DeletePeeredDnsDomain API.
*/
Expand Down Expand Up @@ -1538,7 +1547,7 @@ export namespace servicenetworking_v1 {
*/
billing?: Schema$Billing;
/**
* Deprecated. The service config compiler always sets this field to `3`.
* Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.
*/
configVersion?: number | null;
/**
Expand Down Expand Up @@ -3431,6 +3440,148 @@ export namespace servicenetworking_v1 {
}
}

/**
* Deletes a private service access connection.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/servicenetworking.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const servicenetworking = google.servicenetworking('v1');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: [
* 'https://www.googleapis.com/auth/cloud-platform',
* 'https://www.googleapis.com/auth/service.management',
* ],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await servicenetworking.services.connections.deleteConnection({
* // Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
* name: 'services/my-service/connections/my-connection',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "consumerNetwork": "my_consumerNetwork"
* // }
* },
* });
* console.log(res.data);
*
* // Example response
* // {
* // "done": false,
* // "error": {},
* // "metadata": {},
* // "name": "my_name",
* // "response": {}
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
deleteConnection(
params: Params$Resource$Services$Connections$Deleteconnection,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
deleteConnection(
params?: Params$Resource$Services$Connections$Deleteconnection,
options?: MethodOptions
): GaxiosPromise<Schema$Operation>;
deleteConnection(
params: Params$Resource$Services$Connections$Deleteconnection,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
deleteConnection(
params: Params$Resource$Services$Connections$Deleteconnection,
options: MethodOptions | BodyResponseCallback<Schema$Operation>,
callback: BodyResponseCallback<Schema$Operation>
): void;
deleteConnection(
params: Params$Resource$Services$Connections$Deleteconnection,
callback: BodyResponseCallback<Schema$Operation>
): void;
deleteConnection(callback: BodyResponseCallback<Schema$Operation>): void;
deleteConnection(
paramsOrCallback?:
| Params$Resource$Services$Connections$Deleteconnection
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Operation>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Services$Connections$Deleteconnection;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Services$Connections$Deleteconnection;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl =
options.rootUrl || 'https://servicenetworking.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
},
options
),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Operation>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Operation>(parameters);
}
}

/**
* List the private connections that are configured in a service consumer's VPC network.
* @example
Expand Down Expand Up @@ -3733,6 +3884,18 @@ export namespace servicenetworking_v1 {
*/
requestBody?: Schema$Connection;
}
export interface Params$Resource$Services$Connections$Deleteconnection
extends StandardParameters {
/**
* Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name\}/connections/{vpc_peering_name\}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.
*/
name?: string;

/**
* Request body metadata
*/
requestBody?: Schema$DeleteConnectionRequest;
}
export interface Params$Resource$Services$Connections$List
extends StandardParameters {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/apis/servicenetworking/v1beta.ts
Expand Up @@ -1361,7 +1361,7 @@ export namespace servicenetworking_v1beta {
*/
billing?: Schema$Billing;
/**
* Deprecated. The service config compiler always sets this field to `3`.
* Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.
*/
configVersion?: number | null;
/**
Expand Down

0 comments on commit 63edb25

Please sign in to comment.