
com.pulumi.aws.ec2transitgateway.kotlin.PrefixListReferenceArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ec2transitgateway.kotlin
import com.pulumi.aws.ec2transitgateway.PrefixListReferenceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an EC2 Transit Gateway Prefix List Reference.
* ## Example Usage
* ### Attachment Routing
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2transitgateway.PrefixListReference("example", {
* prefixListId: exampleAwsEc2ManagedPrefixList.id,
* transitGatewayAttachmentId: exampleAwsEc2TransitGatewayVpcAttachment.id,
* transitGatewayRouteTableId: exampleAwsEc2TransitGateway.associationDefaultRouteTableId,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2transitgateway.PrefixListReference("example",
* prefix_list_id=example_aws_ec2_managed_prefix_list["id"],
* transit_gateway_attachment_id=example_aws_ec2_transit_gateway_vpc_attachment["id"],
* transit_gateway_route_table_id=example_aws_ec2_transit_gateway["associationDefaultRouteTableId"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2TransitGateway.PrefixListReference("example", new()
* {
* PrefixListId = exampleAwsEc2ManagedPrefixList.Id,
* TransitGatewayAttachmentId = exampleAwsEc2TransitGatewayVpcAttachment.Id,
* TransitGatewayRouteTableId = exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ec2transitgateway.NewPrefixListReference(ctx, "example", &ec2transitgateway.PrefixListReferenceArgs{
* PrefixListId: pulumi.Any(exampleAwsEc2ManagedPrefixList.Id),
* TransitGatewayAttachmentId: pulumi.Any(exampleAwsEc2TransitGatewayVpcAttachment.Id),
* TransitGatewayRouteTableId: pulumi.Any(exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.ec2transitgateway.PrefixListReference;
* import com.pulumi.aws.ec2transitgateway.PrefixListReferenceArgs;
* 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 PrefixListReference("example", PrefixListReferenceArgs.builder()
* .prefixListId(exampleAwsEc2ManagedPrefixList.id())
* .transitGatewayAttachmentId(exampleAwsEc2TransitGatewayVpcAttachment.id())
* .transitGatewayRouteTableId(exampleAwsEc2TransitGateway.associationDefaultRouteTableId())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2transitgateway:PrefixListReference
* properties:
* prefixListId: ${exampleAwsEc2ManagedPrefixList.id}
* transitGatewayAttachmentId: ${exampleAwsEc2TransitGatewayVpcAttachment.id}
* transitGatewayRouteTableId: ${exampleAwsEc2TransitGateway.associationDefaultRouteTableId}
* ```
*
* ### Blackhole Routing
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2transitgateway.PrefixListReference("example", {
* blackhole: true,
* prefixListId: exampleAwsEc2ManagedPrefixList.id,
* transitGatewayRouteTableId: exampleAwsEc2TransitGateway.associationDefaultRouteTableId,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2transitgateway.PrefixListReference("example",
* blackhole=True,
* prefix_list_id=example_aws_ec2_managed_prefix_list["id"],
* transit_gateway_route_table_id=example_aws_ec2_transit_gateway["associationDefaultRouteTableId"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2TransitGateway.PrefixListReference("example", new()
* {
* Blackhole = true,
* PrefixListId = exampleAwsEc2ManagedPrefixList.Id,
* TransitGatewayRouteTableId = exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ec2transitgateway.NewPrefixListReference(ctx, "example", &ec2transitgateway.PrefixListReferenceArgs{
* Blackhole: pulumi.Bool(true),
* PrefixListId: pulumi.Any(exampleAwsEc2ManagedPrefixList.Id),
* TransitGatewayRouteTableId: pulumi.Any(exampleAwsEc2TransitGateway.AssociationDefaultRouteTableId),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.ec2transitgateway.PrefixListReference;
* import com.pulumi.aws.ec2transitgateway.PrefixListReferenceArgs;
* 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 PrefixListReference("example", PrefixListReferenceArgs.builder()
* .blackhole(true)
* .prefixListId(exampleAwsEc2ManagedPrefixList.id())
* .transitGatewayRouteTableId(exampleAwsEc2TransitGateway.associationDefaultRouteTableId())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2transitgateway:PrefixListReference
* properties:
* blackhole: true
* prefixListId: ${exampleAwsEc2ManagedPrefixList.id}
* transitGatewayRouteTableId: ${exampleAwsEc2TransitGateway.associationDefaultRouteTableId}
* ```
*
* ## Import
* Using `pulumi import`, import `aws_ec2_transit_gateway_prefix_list_reference` using the EC2 Transit Gateway Route Table identifier and EC2 Prefix List identifier, separated by an underscore (`_`). For example:
* ```sh
* $ pulumi import aws:ec2transitgateway/prefixListReference:PrefixListReference example tgw-rtb-12345678_pl-12345678
* ```
* @property blackhole Indicates whether to drop traffic that matches the Prefix List. Defaults to `false`.
* @property prefixListId Identifier of EC2 Prefix List.
* @property transitGatewayAttachmentId Identifier of EC2 Transit Gateway Attachment.
* @property transitGatewayRouteTableId Identifier of EC2 Transit Gateway Route Table.
* The following arguments are optional:
*/
public data class PrefixListReferenceArgs(
public val blackhole: Output? = null,
public val prefixListId: Output? = null,
public val transitGatewayAttachmentId: Output? = null,
public val transitGatewayRouteTableId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.ec2transitgateway.PrefixListReferenceArgs =
com.pulumi.aws.ec2transitgateway.PrefixListReferenceArgs.builder()
.blackhole(blackhole?.applyValue({ args0 -> args0 }))
.prefixListId(prefixListId?.applyValue({ args0 -> args0 }))
.transitGatewayAttachmentId(transitGatewayAttachmentId?.applyValue({ args0 -> args0 }))
.transitGatewayRouteTableId(transitGatewayRouteTableId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PrefixListReferenceArgs].
*/
@PulumiTagMarker
public class PrefixListReferenceArgsBuilder internal constructor() {
private var blackhole: Output? = null
private var prefixListId: Output? = null
private var transitGatewayAttachmentId: Output? = null
private var transitGatewayRouteTableId: Output? = null
/**
* @param value Indicates whether to drop traffic that matches the Prefix List. Defaults to `false`.
*/
@JvmName("jvinpjawxqyutqsa")
public suspend fun blackhole(`value`: Output) {
this.blackhole = value
}
/**
* @param value Identifier of EC2 Prefix List.
*/
@JvmName("uiajkpxeluwkkrbw")
public suspend fun prefixListId(`value`: Output) {
this.prefixListId = value
}
/**
* @param value Identifier of EC2 Transit Gateway Attachment.
*/
@JvmName("mdrxejpbmkafhmmp")
public suspend fun transitGatewayAttachmentId(`value`: Output) {
this.transitGatewayAttachmentId = value
}
/**
* @param value Identifier of EC2 Transit Gateway Route Table.
* The following arguments are optional:
*/
@JvmName("npijugelvxcyqmpn")
public suspend fun transitGatewayRouteTableId(`value`: Output) {
this.transitGatewayRouteTableId = value
}
/**
* @param value Indicates whether to drop traffic that matches the Prefix List. Defaults to `false`.
*/
@JvmName("yrwadhylgynhnsyp")
public suspend fun blackhole(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.blackhole = mapped
}
/**
* @param value Identifier of EC2 Prefix List.
*/
@JvmName("xknovmnmabaxnstd")
public suspend fun prefixListId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.prefixListId = mapped
}
/**
* @param value Identifier of EC2 Transit Gateway Attachment.
*/
@JvmName("lhcbxtpnortkmnev")
public suspend fun transitGatewayAttachmentId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.transitGatewayAttachmentId = mapped
}
/**
* @param value Identifier of EC2 Transit Gateway Route Table.
* The following arguments are optional:
*/
@JvmName("kmyjahjofcvlpvii")
public suspend fun transitGatewayRouteTableId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.transitGatewayRouteTableId = mapped
}
internal fun build(): PrefixListReferenceArgs = PrefixListReferenceArgs(
blackhole = blackhole,
prefixListId = prefixListId,
transitGatewayAttachmentId = transitGatewayAttachmentId,
transitGatewayRouteTableId = transitGatewayRouteTableId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy