Class HubServiceClient (1.34.0)

GitHub RepositoryProduct Reference

Service Description: Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
   HubName name = HubName.of("[PROJECT]", "[HUB]");
   Hub response = hubServiceClient.getHub(name);
 }
 

Note: close() needs to be called on the HubServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
MethodDescriptionMethod Variants

ListHubs

Lists the Network Connectivity Center hubs associated with a given project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listHubs(ListHubsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listHubs(LocationName parent)

  • listHubs(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listHubsPagedCallable()

  • listHubsCallable()

GetHub

Gets details about a Network Connectivity Center hub.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getHub(GetHubRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getHub(HubName name)

  • getHub(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getHubCallable()

CreateHub

Creates a new Network Connectivity Center hub in the specified project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createHubAsync(CreateHubRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createHubAsync(LocationName parent, Hub hub, String hubId)

  • createHubAsync(String parent, Hub hub, String hubId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createHubOperationCallable()

  • createHubCallable()

UpdateHub

Updates the description and/or labels of a Network Connectivity Center hub.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateHubAsync(UpdateHubRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateHubAsync(Hub hub, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateHubOperationCallable()

  • updateHubCallable()

DeleteHub

Deletes a Network Connectivity Center hub.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteHubAsync(DeleteHubRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteHubAsync(HubName name)

  • deleteHubAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteHubOperationCallable()

  • deleteHubCallable()

ListHubSpokes

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listHubSpokes(ListHubSpokesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listHubSpokes(HubName name)

  • listHubSpokes(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listHubSpokesPagedCallable()

  • listHubSpokesCallable()

ListSpokes

Lists the Network Connectivity Center spokes in a specified project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listSpokes(ListSpokesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSpokes(LocationName parent)

  • listSpokes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSpokesPagedCallable()

  • listSpokesCallable()

GetSpoke

Gets details about a Network Connectivity Center spoke.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSpoke(GetSpokeRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSpoke(SpokeName name)

  • getSpoke(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSpokeCallable()

CreateSpoke

Creates a Network Connectivity Center spoke.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createSpokeAsync(CreateSpokeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createSpokeAsync(LocationName parent, Spoke spoke, String spokeId)

  • createSpokeAsync(String parent, Spoke spoke, String spokeId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createSpokeOperationCallable()

  • createSpokeCallable()

UpdateSpoke

Updates the parameters of a Network Connectivity Center spoke.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateSpokeAsync(UpdateSpokeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateSpokeAsync(Spoke spoke, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateSpokeOperationCallable()

  • updateSpokeCallable()

RejectHubSpoke

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • rejectHubSpokeAsync(RejectHubSpokeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • rejectHubSpokeAsync(HubName name, SpokeName spokeUri)

  • rejectHubSpokeAsync(HubName name, String spokeUri)

  • rejectHubSpokeAsync(String name, SpokeName spokeUri)

  • rejectHubSpokeAsync(String name, String spokeUri)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • rejectHubSpokeOperationCallable()

  • rejectHubSpokeCallable()

AcceptHubSpoke

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • acceptHubSpokeAsync(AcceptHubSpokeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • acceptHubSpokeAsync(HubName name, SpokeName spokeUri)

  • acceptHubSpokeAsync(HubName name, String spokeUri)

  • acceptHubSpokeAsync(String name, SpokeName spokeUri)

  • acceptHubSpokeAsync(String name, String spokeUri)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • acceptHubSpokeOperationCallable()

  • acceptHubSpokeCallable()

DeleteSpoke

Deletes a Network Connectivity Center spoke.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteSpokeAsync(DeleteSpokeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteSpokeAsync(SpokeName name)

  • deleteSpokeAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteSpokeOperationCallable()

  • deleteSpokeCallable()

GetRouteTable

Gets details about a Network Connectivity Center route table.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRouteTable(GetRouteTableRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRouteTable(RouteTableName name)

  • getRouteTable(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRouteTableCallable()

GetRoute

Gets details about the specified route.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRoute(GetRouteRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRoute(HubRouteName name)

  • getRoute(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRouteCallable()

ListRoutes

Lists routes in a given project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRoutes(ListRoutesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRoutes