This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html). # AWS::EC2::ClientVpnRoute Specifies a network route to add 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. A target network association must be created before you can specify a route. If you're setting up all the components of a Client VPN endpoint at the same time, you must use the [DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) to declare a dependency on the `AWS::EC2::ClientVpnTargetNetworkAssociation` resource. ## Syntax To declare this entity in your CloudFormation template, use the following syntax: ### JSON ``` { "Type" : "AWS::EC2::ClientVpnRoute", "Properties" : { "[ClientVpnEndpointId](#cfn-ec2-clientvpnroute-clientvpnendpointid)" : {{String}}, "[Description](#cfn-ec2-clientvpnroute-description)" : {{String}}, "[DestinationCidrBlock](#cfn-ec2-clientvpnroute-destinationcidrblock)" : {{String}}, "[TargetVpcSubnetId](#cfn-ec2-clientvpnroute-targetvpcsubnetid)" : {{String}} } } ``` ### YAML ``` Type: AWS::EC2::ClientVpnRoute Properties: [ClientVpnEndpointId](#cfn-ec2-clientvpnroute-clientvpnendpointid): {{String}} [Description](#cfn-ec2-clientvpnroute-description): {{String}} [DestinationCidrBlock](#cfn-ec2-clientvpnroute-destinationcidrblock): {{String}} [TargetVpcSubnetId](#cfn-ec2-clientvpnroute-targetvpcsubnetid): {{String}} ``` ## Properties `ClientVpnEndpointId` The ID of the Client VPN endpoint to which to add the route. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `Description` A brief description of the route. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `DestinationCidrBlock` 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 *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `TargetVpcSubnetId` 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. *Required*: No *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) ## Examples ### Add a route to a client VPN endpoint The following example adds a route for internet access to a client VPN endpoint. #### YAML ``` myRoute: Type: "AWS::EC2::ClientVpnRoute" Properties: ClientVpnEndpointId: Ref: myClientVpnEndpoint TargetVpcSubnetId: Ref: mySubnet DestinationCidrBlock: "0.0.0.0/0" Description: "myRoute" ``` #### JSON ``` "myRoute": { "Type": "AWS::EC2::ClientVpnRoute", "Properties": { "ClientVpnEndpointId": { "Ref": "myClientVpnEndpoint" }, "TargetVpcSubnetId": { "Ref": "mySubnet" }, "DestinationCidrBlock": "0.0.0.0/0", "Description": "myRoute" } } ``` ## See also + [Getting Started with Client VPN](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-getting-started.html) in the *AWS Client VPN Administrator Guide* + [Routes](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-routes.html) in the *AWS Client VPN Administrator Guide*

AltStyle によって変換されたページ (->オリジナル) /