Package com.pulumi.aws.ec2transitgateway
Class Route
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2transitgateway.Route
-
public class Route extends com.pulumi.resources.CustomResource
Manages an EC2 Transit Gateway Route. ## Example Usage ### Standard usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ec2transitgateway.Route; import com.pulumi.aws.ec2transitgateway.RouteArgs; import java.util.List; import java.util.ArrayList; 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 example = new Route("example", RouteArgs.builder() .destinationCidrBlock("0.0.0.0/0") .transitGatewayAttachmentId(aws_ec2_transit_gateway_vpc_attachment.example().id()) .transitGatewayRouteTableId(aws_ec2_transit_gateway.example().association_default_route_table_id()) .build()); } } ``` ### Blackhole route ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ec2transitgateway.Route; import com.pulumi.aws.ec2transitgateway.RouteArgs; import java.util.List; import java.util.ArrayList; 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 example = new Route("example", RouteArgs.builder() .destinationCidrBlock("0.0.0.0/0") .blackhole(true) .transitGatewayRouteTableId(aws_ec2_transit_gateway.example().association_default_route_table_id()) .build()); } } ``` ## Import Using `pulumi import`, import `aws_ec2_transit_gateway_route` using the EC2 Transit Gateway Route Table, an underscore, and the destination. For example: ```sh $ pulumi import aws:ec2transitgateway/route:Route example tgw-rtb-12345678_0.0.0.0/0 ```
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
blackhole()
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.util.Optional<java.lang.String>>
transitGatewayAttachmentId()
com.pulumi.core.Output<java.lang.String>
transitGatewayRouteTableId()
-
-
-
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
-
blackhole
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> blackhole()
- Returns:
- Indicates whether to drop traffic that matches this route (default to `false`).
-
destinationCidrBlock
public com.pulumi.core.Output<java.lang.String> destinationCidrBlock()
- Returns:
- IPv4 or IPv6 RFC1924 CIDR used for destination matches. Routing decisions are based on the most specific match.
-
transitGatewayAttachmentId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> transitGatewayAttachmentId()
- Returns:
- Identifier of EC2 Transit Gateway Attachment (required if `blackhole` is set to false).
-
transitGatewayRouteTableId
public com.pulumi.core.Output<java.lang.String> transitGatewayRouteTableId()
- Returns:
- Identifier of EC2 Transit Gateway Route Table.
-
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.
-
-