create_client_vpn_route
async
¶
create_client_vpn_route(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 | |