use of com.google.cloud.bigquery.connection.v1.DeleteConnectionRequest in project java-bigqueryconnection by googleapis.
the class ConnectionServiceClient method deleteConnection.
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes connection and associated credential.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
* ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
* connectionServiceClient.deleteConnection(name);
* }
* }</pre>
*
* @param name Required. Name of the deleted connection, for example:
* `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteConnection(ConnectionName name) {
DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteConnection(request);
}
Aggregations