Class MainRouteTableAssociation


  • public class MainRouteTableAssociation
    extends com.pulumi.resources.CustomResource
    Provides a resource for managing the main routing table of a VPC. > **NOTE:** **Do not** use both `aws.ec2.DefaultRouteTable` to manage a default route table **and** `aws.ec2.MainRouteTableAssociation` with the same VPC due to possible route conflicts. See aws.ec2.DefaultRouteTable documentation for more details. For more information, see the Amazon VPC User Guide on [Route Tables](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html#Route_Replacing_Main_Table). For information about managing normal route tables in Pulumi, see `aws.ec2.RouteTable`. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2.MainRouteTableAssociation;
     import com.pulumi.aws.ec2.MainRouteTableAssociationArgs;
     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 a = new MainRouteTableAssociation("a", MainRouteTableAssociationArgs.builder()
                 .vpcId(foo.id())
                 .routeTableId(bar.id())
                 .build());
     
         }
     }
     
     
    • 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MainRouteTableAssociation get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, MainRouteTableAssociationState 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> originalRouteTableId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> routeTableId()  
      com.pulumi.core.Output<java.lang.String> vpcId()  
      • 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

      • MainRouteTableAssociation

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

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

        public MainRouteTableAssociation​(java.lang.String name,
                                         MainRouteTableAssociationArgs 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

      • originalRouteTableId

        public com.pulumi.core.Output<java.lang.String> originalRouteTableId()
        Returns:
        Original route table ID, used internally; see __Notes__ below
      • 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.
      • routeTableId

        public com.pulumi.core.Output<java.lang.String> routeTableId()
        Returns:
        ID of the Route Table to set as the new main route table for the target VPC
      • vpcId

        public com.pulumi.core.Output<java.lang.String> vpcId()
        Returns:
        ID of the VPC whose main route table should be set
      • get

        public static MainRouteTableAssociation get​(java.lang.String name,
                                                    com.pulumi.core.Output<java.lang.String> id,
                                                    @Nullable
                                                    MainRouteTableAssociationState 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.