pub struct HubService { /* private fields */ }Expand description
Implements a client for the Network Connectivity API.
§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.
§Configuration
HubService has various configuration parameters, the defaults should
work with most applications.
§Pooling and Cloning
HubService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap HubService in
an Rc or Arc to reuse it, because it already uses an Arc
internally.
Implementations§
Source§impl HubService
impl HubService
Sourcepub async fn new_with_config(conf: ClientConfig) -> Result<Self>
pub async fn new_with_config(conf: ClientConfig) -> Result<Self>
Creates a new client with the specified configuration.
Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: HubService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: HubService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is when mocking the client.
Sourcepub fn list_hubs(&self, parent: impl Into<String>) -> ListHubs
pub fn list_hubs(&self, parent: impl Into<String>) -> ListHubs
Lists the Network Connectivity Center hubs associated with a given project.
Sourcepub fn get_hub(&self, name: impl Into<String>) -> GetHub
pub fn get_hub(&self, name: impl Into<String>) -> GetHub
Gets details about a Network Connectivity Center hub.
Sourcepub fn create_hub(&self, parent: impl Into<String>) -> CreateHub
pub fn create_hub(&self, parent: impl Into<String>) -> CreateHub
Creates a new Network Connectivity Center hub in the specified project.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_hub(&self, hub: impl Into<Hub>) -> UpdateHub
pub fn update_hub(&self, hub: impl Into<Hub>) -> UpdateHub
Updates the description and/or labels of a Network Connectivity Center hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_hub(&self, name: impl Into<String>) -> DeleteHub
pub fn delete_hub(&self, name: impl Into<String>) -> DeleteHub
Deletes a Network Connectivity Center hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_hub_spokes(&self, name: impl Into<String>) -> ListHubSpokes
pub fn list_hub_spokes(&self, name: impl Into<String>) -> 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.
Sourcepub fn query_hub_status(&self, name: impl Into<String>) -> QueryHubStatus
pub fn query_hub_status(&self, name: impl Into<String>) -> QueryHubStatus
Query the Private Service Connect propagation status of a Network Connectivity Center hub.
Sourcepub fn list_spokes(&self, parent: impl Into<String>) -> ListSpokes
pub fn list_spokes(&self, parent: impl Into<String>) -> ListSpokes
Lists the Network Connectivity Center spokes in a specified project and location.
Sourcepub fn get_spoke(&self, name: impl Into<String>) -> GetSpoke
pub fn get_spoke(&self, name: impl Into<String>) -> GetSpoke
Gets details about a Network Connectivity Center spoke.
Sourcepub fn create_spoke(&self, parent: impl Into<String>) -> CreateSpoke
pub fn create_spoke(&self, parent: impl Into<String>) -> CreateSpoke
Creates a Network Connectivity Center spoke.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_spoke(&self, spoke: impl Into<Spoke>) -> UpdateSpoke
pub fn update_spoke(&self, spoke: impl Into<Spoke>) -> UpdateSpoke
Updates the parameters of a Network Connectivity Center spoke.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn reject_hub_spoke(&self, name: impl Into<String>) -> RejectHubSpoke
pub fn reject_hub_spoke(&self, name: impl Into<String>) -> 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.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn accept_hub_spoke(&self, name: impl Into<String>) -> AcceptHubSpoke
pub fn accept_hub_spoke(&self, name: impl Into<String>) -> AcceptHubSpoke
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_spoke(&self, name: impl Into<String>) -> DeleteSpoke
pub fn delete_spoke(&self, name: impl Into<String>) -> DeleteSpoke
Deletes a Network Connectivity Center spoke.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_route_table(&self, name: impl Into<String>) -> GetRouteTable
pub fn get_route_table(&self, name: impl Into<String>) -> GetRouteTable
Gets details about a Network Connectivity Center route table.
Sourcepub fn get_route(&self, name: impl Into<String>) -> GetRoute
pub fn get_route(&self, name: impl Into<String>) -> GetRoute
Gets details about the specified route.
Sourcepub fn list_routes(&self, parent: impl Into<String>) -> ListRoutes
pub fn list_routes(&self, parent: impl Into<String>) -> ListRoutes
Lists routes in a given route table.
Sourcepub fn list_route_tables(&self, parent: impl Into<String>) -> ListRouteTables
pub fn list_route_tables(&self, parent: impl Into<String>) -> ListRouteTables
Lists route tables in a given hub.
Sourcepub fn get_group(&self, name: impl Into<String>) -> GetGroup
pub fn get_group(&self, name: impl Into<String>) -> GetGroup
Gets details about a Network Connectivity Center group.
Sourcepub fn list_groups(&self, parent: impl Into<String>) -> ListGroups
pub fn list_groups(&self, parent: impl Into<String>) -> ListGroups
Lists groups in a given hub.
Sourcepub fn update_group(&self, group: impl Into<Group>) -> UpdateGroup
pub fn update_group(&self, group: impl Into<Group>) -> UpdateGroup
Updates the parameters of a Network Connectivity Center group.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_locations(&self, name: impl Into<String>) -> ListLocations
pub fn list_locations(&self, name: impl Into<String>) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self, name: impl Into<String>) -> GetLocation
pub fn get_location(&self, name: impl Into<String>) -> GetLocation
Gets information about a location.
Sourcepub fn set_iam_policy(&self, resource: impl Into<String>) -> SetIamPolicy
pub fn set_iam_policy(&self, resource: impl Into<String>) -> SetIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
errors.
Sourcepub fn get_iam_policy(&self, resource: impl Into<String>) -> GetIamPolicy
pub fn get_iam_policy(&self, resource: impl Into<String>) -> GetIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Sourcepub fn test_iam_permissions(
&self,
resource: impl Into<String>,
) -> TestIamPermissions
pub fn test_iam_permissions( &self, resource: impl Into<String>, ) -> TestIamPermissions
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Sourcepub fn list_operations(&self, name: impl Into<String>) -> ListOperations
pub fn list_operations(&self, name: impl Into<String>) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self, name: impl Into<String>) -> GetOperation
pub fn get_operation(&self, name: impl Into<String>) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn delete_operation(&self, name: impl Into<String>) -> DeleteOperation
pub fn delete_operation(&self, name: impl Into<String>) -> DeleteOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self, name: impl Into<String>) -> CancelOperation
pub fn cancel_operation(&self, name: impl Into<String>) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for HubService
impl Clone for HubService
Source§fn clone(&self) -> HubService
fn clone(&self) -> HubService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more