pub struct ActiveActiveVpcPeeringCreateRequest {
pub provider: Option<String>,
pub command_type: Option<String>,
pub source_region: Option<String>,
pub destination_region: Option<String>,
pub aws_account_id: Option<String>,
pub vpc_id: Option<String>,
pub vpc_cidr: Option<String>,
pub vpc_cidrs: Option<Vec<String>>,
pub gcp_project_id: Option<String>,
pub network_name: Option<String>,
}Expand description
Active-Active VPC peering creation request.
The Redis Cloud API documents this as a oneOf between an AWS-shaped body
(requiring sourceRegion, destinationRegion, awsAccountId, vpcId) and
a GCP-shaped body (requiring sourceRegion, vpcProjectUid,
vpcNetworkName). Like VpcPeeringCreateRequest, both providers live in
one struct and use #[serde(rename = ...)] so each field serializes to the
exact wire name the spec requires. Use Self::for_aws or
Self::for_gcp to construct provider-targeted bodies that avoid mixing
fields.
A type-safe enum split that prevents AWS+GCP field mixing at compile time is tracked as a follow-on under #65.
Fields§
§provider: Option<String>Cloud provider discriminator (e.g. “AWS”, “GCP”).
command_type: Option<String>Read-only on the response; populated by the server.
source_region: Option<String>Name of the region to create the VPC peering from. Required for both providers.
destination_region: Option<String>Name of the region to create the VPC peering to. AWS only; required.
aws_account_id: Option<String>AWS account ID (spec required for AWS).
vpc_id: Option<String>AWS VPC ID (spec required for AWS).
vpc_cidr: Option<String>VPC CIDR. AWS only; optional.
vpc_cidrs: Option<Vec<String>>List of VPC CIDRs. AWS only; optional.
gcp_project_id: Option<String>GCP project UID. Wire name: vpcProjectUid (spec required for GCP).
network_name: Option<String>GCP network name. Wire name: vpcNetworkName (spec required for GCP).
Implementations§
Source§impl ActiveActiveVpcPeeringCreateRequest
impl ActiveActiveVpcPeeringCreateRequest
Sourcepub fn for_aws(
source_region: impl Into<String>,
destination_region: impl Into<String>,
aws_account_id: impl Into<String>,
vpc_id: impl Into<String>,
) -> Self
pub fn for_aws( source_region: impl Into<String>, destination_region: impl Into<String>, aws_account_id: impl Into<String>, vpc_id: impl Into<String>, ) -> Self
Construct an AWS-targeted Active-Active VPC peering creation body.
Pre-populates provider = "AWS" and the four required AWS fields
(sourceRegion, destinationRegion, awsAccountId, vpcId). Optional
CIDR fields can be set directly on the returned struct.
Sourcepub fn for_gcp(
source_region: impl Into<String>,
project_uid: impl Into<String>,
network_name: impl Into<String>,
) -> Self
pub fn for_gcp( source_region: impl Into<String>, project_uid: impl Into<String>, network_name: impl Into<String>, ) -> Self
Construct a GCP-targeted Active-Active VPC peering creation body.
Pre-populates provider = "GCP" and the three required GCP fields
(sourceRegion, vpcProjectUid, vpcNetworkName).
Trait Implementations§
Source§impl Clone for ActiveActiveVpcPeeringCreateRequest
impl Clone for ActiveActiveVpcPeeringCreateRequest
Source§fn clone(&self) -> ActiveActiveVpcPeeringCreateRequest
fn clone(&self) -> ActiveActiveVpcPeeringCreateRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more