ClientVpnRouteOptions
- class aws_cdk.aws_ec2.ClientVpnRouteOptions(*, cidr, target, description=None)
Bases:
object
Options for a ClientVpnRoute.
- Parameters:
cidr (
str
) – 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 AWS Site-to-Site VPN connection’s IPv4 CIDR range - To add a route for the local network, enter the client CIDR rangetarget (
ClientVpnRouteTarget
) – The target for the route.description (
Optional
[str
]) – A brief description of the authorization rule. Default: - no description
- ExampleMetadata:
fixture=client-vpn infused
Example:
endpoint = vpc.add_client_vpn_endpoint("Endpoint", cidr="10.100.0.0/16", server_certificate_arn="arn:aws:acm:us-east-1:123456789012:certificate/server-certificate-id", user_based_authentication=ec2.ClientVpnUserBasedAuthentication.federated(saml_provider) ) # Client-to-client access endpoint.add_route("Route", cidr="10.100.0.0/16", target=ec2.ClientVpnRouteTarget.local() )
Attributes
- cidr
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 AWS Site-to-Site VPN connection’s IPv4 CIDR range
To add a route for the local network, enter the client CIDR range
- description
A brief description of the authorization rule.
- Default:
no description
- target
The target for the route.