Show / Hide Table of Contents

Class RouteTableAssociation

Provides a resource to create an association between a route table and a subnet or a route table and an internet gateway or virtual private gateway.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var routeTableAssociation = new Aws.Ec2.RouteTableAssociation("routeTableAssociation", new Aws.Ec2.RouteTableAssociationArgs
    {
        SubnetId = aws_subnet.Foo.Id,
        RouteTableId = aws_route_table.Bar.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RouteTableAssociation
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class RouteTableAssociation : CustomResource

Constructors

View Source

RouteTableAssociation(String, RouteTableAssociationArgs, CustomResourceOptions)

Create a RouteTableAssociation resource with the given unique name, arguments, and options.

Declaration
public RouteTableAssociation(string name, RouteTableAssociationArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RouteTableAssociationArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

GatewayId

The gateway ID to create an association. Conflicts with subnet_id.

Declaration
public Output<string> GatewayId { get; }
Property Value
Type Description
Output<System.String>
View Source

RouteTableId

The ID of the routing table to associate with.

Declaration
public Output<string> RouteTableId { get; }
Property Value
Type Description
Output<System.String>
View Source

SubnetId

The subnet ID to create an association. Conflicts with gateway_id.

Declaration
public Output<string> SubnetId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RouteTableAssociationState, CustomResourceOptions)

Get an existing RouteTableAssociation resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static RouteTableAssociation Get(string name, Input<string> id, RouteTableAssociationState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RouteTableAssociationState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RouteTableAssociation
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.