pub struct ConnectivityHandler {
pub vpc_peering: VpcPeeringHandler,
pub psc: PscHandler,
pub transit_gateway: TransitGatewayHandler,
}Expand description
Unified connectivity handler combining VPC Peering, PSC, and Transit Gateway operations.
ConnectivityHandler is a backward-compatibility facade: each method
delegates to the underlying specialized handler. New code should prefer
the specialized handlers directly — they expose the full surface for their
respective connectivity domains:
VpcPeeringHandler— VPC peering for AWS, GCP, and AzurePscHandler— Google Cloud Private Service ConnectTransitGatewayHandler— AWS Transit Gateway attachments
Errors returned from delegated calls propagate unchanged; see each backing handler’s documentation for the full error surface.
§Example
use redis_cloud::{CloudClient, ConnectivityHandler};
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let connectivity = ConnectivityHandler::new(client);
let _vpc_task = connectivity.get_vpc_peering(123).await?;Fields§
§vpc_peering: VpcPeeringHandlerVPC peering sub-handler. See VpcPeeringHandler.
psc: PscHandlerPrivate Service Connect sub-handler. See PscHandler.
transit_gateway: TransitGatewayHandlerTransit Gateway sub-handler. See TransitGatewayHandler.
Implementations§
Source§impl ConnectivityHandler
impl ConnectivityHandler
Sourcepub fn new(client: CloudClient) -> Self
pub fn new(client: CloudClient) -> Self
Construct a ConnectivityHandler wired to the supplied CloudClient.
Internally clones the client into each of the three sub-handlers, so
client can be dropped after construction if not needed elsewhere.
Sourcepub async fn get_vpc_peering(
&self,
subscription_id: i32,
) -> Result<TaskStateUpdate>
pub async fn get_vpc_peering( &self, subscription_id: i32, ) -> Result<TaskStateUpdate>
Get the VPC peering configuration for a Pro subscription.
GET /subscriptions/{subscriptionId}/peerings. Delegates to
VpcPeeringHandler::get.
§Errors
Propagates any crate::CloudError returned by the underlying call —
typically NotFound if the subscription has no peering configured,
AuthenticationFailed for bad credentials, or InternalServerError.
Sourcepub async fn create_vpc_peering(
&self,
subscription_id: i32,
request: &VpcPeeringCreateRequest,
) -> Result<TaskStateUpdate>
pub async fn create_vpc_peering( &self, subscription_id: i32, request: &VpcPeeringCreateRequest, ) -> Result<TaskStateUpdate>
Create a VPC peering on a Pro subscription.
POST /subscriptions/{subscriptionId}/peerings. Delegates to
VpcPeeringHandler::create. Use
VpcPeeringCreateRequest::for_aws or
VpcPeeringCreateRequest::for_gcp to build a provider-targeted body
with the spec’s required fields.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses. BadRequest is common when the body is missing
provider-required fields.
Sourcepub async fn delete_vpc_peering(
&self,
subscription_id: i32,
peering_id: i32,
) -> Result<TaskStateUpdate>
pub async fn delete_vpc_peering( &self, subscription_id: i32, peering_id: i32, ) -> Result<TaskStateUpdate>
Delete a VPC peering by its peering ID.
DELETE /subscriptions/{subscriptionId}/peerings/{peeringId}.
Delegates to VpcPeeringHandler::delete. The deletion is asynchronous;
the returned TaskStateUpdate carries a
task_id that can be polled to completion.
§Errors
Returns crate::CloudError for non-2xx responses; NotFound if the
peering does not exist.
Sourcepub async fn update_vpc_peering(
&self,
subscription_id: i32,
peering_id: i32,
request: &VpcPeeringUpdateAwsRequest,
) -> Result<TaskStateUpdate>
pub async fn update_vpc_peering( &self, subscription_id: i32, peering_id: i32, request: &VpcPeeringUpdateAwsRequest, ) -> Result<TaskStateUpdate>
Update a VPC peering’s CIDR list.
PUT /subscriptions/{subscriptionId}/peerings/{peeringId}. Translates
the AWS-only VpcPeeringUpdateAwsRequest into the underlying
VpcPeeringCreateRequest shape and delegates to
VpcPeeringHandler::update.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses.
Sourcepub async fn get_psc_service(
&self,
subscription_id: i32,
) -> Result<TaskStateUpdate>
pub async fn get_psc_service( &self, subscription_id: i32, ) -> Result<TaskStateUpdate>
Get the Private Service Connect service for a Pro subscription.
GET /subscriptions/{subscriptionId}/private-service-connect.
Delegates to PscHandler::get_service.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses. NotFound is returned when no PSC service is configured.
Sourcepub async fn create_psc_service(
&self,
subscription_id: i32,
) -> Result<TaskStateUpdate>
pub async fn create_psc_service( &self, subscription_id: i32, ) -> Result<TaskStateUpdate>
Create a Private Service Connect service on a Pro subscription.
POST /subscriptions/{subscriptionId}/private-service-connect.
Delegates to PscHandler::create_service.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses.
Sourcepub async fn delete_psc_service(
&self,
subscription_id: i32,
) -> Result<TaskStateUpdate>
pub async fn delete_psc_service( &self, subscription_id: i32, ) -> Result<TaskStateUpdate>
Delete the Private Service Connect service for a Pro subscription.
DELETE /subscriptions/{subscriptionId}/private-service-connect.
Delegates to PscHandler::delete_service. The deletion is
asynchronous; the returned
TaskStateUpdate carries a task_id
that can be polled to completion.
§Errors
Returns crate::CloudError for non-2xx responses.
Sourcepub async fn create_psc_endpoint(
&self,
subscription_id: i32,
psc_service_id: i32,
request: &PscEndpointUpdateRequest,
) -> Result<TaskStateUpdate>
pub async fn create_psc_endpoint( &self, subscription_id: i32, psc_service_id: i32, request: &PscEndpointUpdateRequest, ) -> Result<TaskStateUpdate>
Create a PSC endpoint under the subscription’s PSC service.
POST /subscriptions/{subscriptionId}/private-service-connect/.../endpoints.
Delegates to PscHandler::create_endpoint.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses; BadRequest if the endpoint payload is malformed.
Sourcepub async fn get_tgws(&self, subscription_id: i32) -> Result<TaskStateUpdate>
pub async fn get_tgws(&self, subscription_id: i32) -> Result<TaskStateUpdate>
List Transit Gateway attachments for a Pro subscription.
GET /subscriptions/{subscriptionId}/transitGateways. Delegates to
TransitGatewayHandler::get_attachments.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses.
Sourcepub async fn create_tgw_attachment(
&self,
subscription_id: i32,
tgw_id: &str,
) -> Result<TaskStateUpdate>
pub async fn create_tgw_attachment( &self, subscription_id: i32, tgw_id: &str, ) -> Result<TaskStateUpdate>
Create a Transit Gateway attachment for the given TGW ID.
POST /subscriptions/{subscriptionId}/transitGateways/{tgwId}.
Delegates to TransitGatewayHandler::create_attachment_with_id.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses; BadRequest if tgw_id is not in a valid AWS format.
Sourcepub async fn delete_tgw_attachment(
&self,
subscription_id: i32,
attachment_id: i32,
) -> Result<TaskStateUpdate>
pub async fn delete_tgw_attachment( &self, subscription_id: i32, attachment_id: i32, ) -> Result<TaskStateUpdate>
Delete a Transit Gateway attachment by attachment ID.
DELETE /subscriptions/{subscriptionId}/transitGateways/{tgwId}.
Delegates to TransitGatewayHandler::delete_attachment. The deletion
is asynchronous; the returned
TaskStateUpdate carries a task_id
that can be polled to completion.
§Errors
Returns crate::CloudError for non-2xx responses; NotFound if
the attachment does not exist.
Sourcepub async fn update_tgw_cidrs(
&self,
subscription_id: i32,
attachment_id: &str,
request: &TgwUpdateCidrsRequest,
) -> Result<TaskStateUpdate>
pub async fn update_tgw_cidrs( &self, subscription_id: i32, attachment_id: &str, request: &TgwUpdateCidrsRequest, ) -> Result<TaskStateUpdate>
Update the CIDR list on a Transit Gateway attachment.
PUT /subscriptions/{subscriptionId}/transitGateways/{tgwId}/attachment.
Translates TgwUpdateCidrsRequest (which carries CIDR-with-status
entries) into the TgwAttachmentRequest the underlying handler
expects and delegates to
TransitGatewayHandler::update_attachment_cidrs. Only the
cidr_address portion of each CIDR entry is forwarded.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses; BadRequest if any CIDR string is not in valid form.
Sourcepub async fn update_psc_service_endpoint(
&self,
subscription_id: i32,
psc_service_id: i32,
endpoint_id: i32,
request: &PscEndpointUpdateRequest,
) -> Result<TaskStateUpdate>
pub async fn update_psc_service_endpoint( &self, subscription_id: i32, psc_service_id: i32, endpoint_id: i32, request: &PscEndpointUpdateRequest, ) -> Result<TaskStateUpdate>
Update a PSC endpoint by endpoint ID. Backward-compatibility wrapper
over PscHandler::update_endpoint.
PUT /subscriptions/{subscriptionId}/private-service-connect/.../endpoints/{endpointId}.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses.
Sourcepub async fn update_tgw_attachment_cidrs(
&self,
subscription_id: i32,
attachment_id: &str,
request: &TgwUpdateCidrsRequest,
) -> Result<TaskStateUpdate>
pub async fn update_tgw_attachment_cidrs( &self, subscription_id: i32, attachment_id: &str, request: &TgwUpdateCidrsRequest, ) -> Result<TaskStateUpdate>
Alias for Self::update_tgw_cidrs retained for backward
compatibility. New code should call update_tgw_cidrs directly.
§Errors
Forwards any crate::CloudError from the wrapped call.
Sourcepub async fn list_tgw_attachments(
&self,
subscription_id: i32,
) -> Result<TaskStateUpdate>
pub async fn list_tgw_attachments( &self, subscription_id: i32, ) -> Result<TaskStateUpdate>
List Transit Gateway attachments for a Pro subscription (simplified).
Preferred alias for get_tgws, whose name is
ambiguous. get_tgws is retained as a backward-compatibility shim.
GET /subscriptions/{subscriptionId}/transitGateways.
§Errors
Returns crate::CloudError for transport, auth, or 4xx/5xx
responses.
§Example
use redis_cloud::{CloudClient, ConnectivityHandler};
let client = CloudClient::builder()
.api_key("your-api-key")
.api_secret("your-api-secret")
.build()?;
let connectivity = ConnectivityHandler::new(client);
let attachments = connectivity.list_tgw_attachments(123).await?;