create_client_vpn_route
¶
create_client_vpn_route(
*,
config_overrides: Optional[EC2ClientConfig] = None,
client_vpn_endpoint_id: Optional[ClientVpnEndpointId] = None,
destination_cidr_block: Optional[String] = None,
target_vpc_subnet_id: Optional[SubnetId] = None,
description: Optional[String] = None,
client_token: Optional[String] = None,
dry_run: Optional[Boolean] = None,
) -> CreateClientVpnRouteResult
Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint has a route table that describes the available destination network routes. Each route in the route table specifies the path for traffic to specific resources or networks.
Parameters:
-
client_vpn_endpoint_id(Optional[ClientVpnEndpointId], default:None) –The ID of the Client VPN endpoint to which to add the route.
-
destination_cidr_block(Optional[String], default:None) –The IPv4 address range, in CIDR notation, of the route destination. For example:
-
To add a route for Internet access, enter
0.0.0.0/0 -
To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range
-
To add a route for an on-premises network, enter the Amazon Web Services Site-to-Site VPN connection's IPv4 CIDR range
-
To add a route for the local network, enter the client CIDR range
-
-
target_vpc_subnet_id(Optional[SubnetId], default:None) –The ID of the subnet through which you want to route traffic. The specified subnet must be an existing target network of the Client VPN endpoint.
Alternatively, if you're adding a route for the local network, specify
local.This parameter is required for VPC-based Client VPN endpoints. For Transit Gateway-based endpoints, this parameter is not required.
-
description(Optional[String], default:None) –A brief description of the route.
-
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 | |