Class Route


  • public class Route
    extends com.pulumi.resources.CustomResource
    Provides additional routes for AWS Client VPN endpoints. For more information on usage, please see the [AWS Client VPN Administrator's Guide](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/what-is.html). ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2clientvpn.Endpoint;
     import com.pulumi.aws.ec2clientvpn.EndpointArgs;
     import com.pulumi.aws.ec2clientvpn.inputs.EndpointConnectionLogOptionsArgs;
     import com.pulumi.aws.ec2clientvpn.inputs.EndpointAuthenticationOptionArgs;
     import com.pulumi.aws.ec2clientvpn.NetworkAssociation;
     import com.pulumi.aws.ec2clientvpn.NetworkAssociationArgs;
     import com.pulumi.aws.ec2clientvpn.Route;
     import com.pulumi.aws.ec2clientvpn.RouteArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var exampleEndpoint = new Endpoint("exampleEndpoint", EndpointArgs.builder()
                 .connectionLogOptions(EndpointConnectionLogOptionsArgs.builder()
                     .enabled(false)
                     .build())
                 .authenticationOptions(EndpointAuthenticationOptionArgs.builder()
                     .type("certificate-authentication")
                     .rootCertificateChainArn(exampleAwsAcmCertificate.arn())
                     .build())
                 .description("Example Client VPN endpoint")
                 .serverCertificateArn(exampleAwsAcmCertificate.arn())
                 .clientCidrBlock("10.0.0.0/16")
                 .build());
     
             var exampleNetworkAssociation = new NetworkAssociation("exampleNetworkAssociation", NetworkAssociationArgs.builder()
                 .clientVpnEndpointId(exampleEndpoint.id())
                 .subnetId(exampleAwsSubnet.id())
                 .build());
     
             var example = new Route("example", RouteArgs.builder()
                 .clientVpnEndpointId(exampleEndpoint.id())
                 .destinationCidrBlock("0.0.0.0/0")
                 .targetVpcSubnetId(exampleNetworkAssociation.subnetId())
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import AWS Client VPN routes using the endpoint ID, target subnet ID, and destination CIDR block. All values are separated by a `,`. For example: ```sh $ pulumi import aws:ec2clientvpn/route:Route example cvpn-endpoint-1234567890abcdef,subnet-9876543210fedcba,10.1.0.0/24 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Route​(java.lang.String name)  
      Route​(java.lang.String name, RouteArgs args)  
      Route​(java.lang.String name, RouteArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> clientVpnEndpointId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.String> destinationCidrBlock()  
      static Route get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RouteState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> origin()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> targetVpcSubnetId()  
      com.pulumi.core.Output<java.lang.String> transitGatewayAttachmentId()  
      com.pulumi.core.Output<java.lang.String> type()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Route

        public Route​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Route

        public Route​(java.lang.String name,
                     RouteArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Route

        public Route​(java.lang.String name,
                     RouteArgs args,
                     @Nullable
                     com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • clientVpnEndpointId

        public com.pulumi.core.Output<java.lang.String> clientVpnEndpointId()
        Returns:
        The ID of the Client VPN endpoint.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        A brief description of the route.
      • destinationCidrBlock

        public com.pulumi.core.Output<java.lang.String> destinationCidrBlock()
        Returns:
        The IPv4 or IPv6 address range, in CIDR notation, of the route destination.
      • origin

        public com.pulumi.core.Output<java.lang.String> origin()
        Returns:
        Indicates how the Client VPN route was added. Will be `add-route` for routes created by this resource.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • targetVpcSubnetId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> targetVpcSubnetId()
        Returns:
        The ID of the Subnet to route the traffic through. It must already be attached to the Client VPN. Required for VPC-based Client VPN endpoints. Not applicable for Transit Gateway-based Client VPN endpoints.
      • transitGatewayAttachmentId

        public com.pulumi.core.Output<java.lang.String> transitGatewayAttachmentId()
        Returns:
        The ID of the Transit Gateway attachment, if the route targets a Transit Gateway-based Client VPN endpoint.
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        The type of the route.
      • get

        public static Route get​(java.lang.String name,
                                com.pulumi.core.Output<java.lang.String> id,
                                @Nullable
                                RouteState state,
                                @Nullable
                                com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.