
com.pulumi.aws.ec2transitgateway.kotlin.PolicyTable.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ec2transitgateway.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [PolicyTable].
*/
@PulumiTagMarker
public class PolicyTableResourceBuilder internal constructor() {
public var name: String? = null
public var args: PolicyTableArgs = PolicyTableArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend PolicyTableArgsBuilder.() -> Unit) {
val builder = PolicyTableArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): PolicyTable {
val builtJavaResource = com.pulumi.aws.ec2transitgateway.PolicyTable(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PolicyTable(builtJavaResource)
}
}
/**
* Manages an EC2 Transit Gateway Policy Table.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2transitgateway.PolicyTable("example", {
* transitGatewayId: exampleAwsEc2TransitGateway.id,
* tags: {
* Name: "Example Policy Table",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2transitgateway.PolicyTable("example",
* transit_gateway_id=example_aws_ec2_transit_gateway["id"],
* tags={
* "Name": "Example Policy Table",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2TransitGateway.PolicyTable("example", new()
* {
* TransitGatewayId = exampleAwsEc2TransitGateway.Id,
* Tags =
* {
* { "Name", "Example Policy Table" },
* },
* });
* });
* ```
* ```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.NewPolicyTable(ctx, "example", &ec2transitgateway.PolicyTableArgs{
* TransitGatewayId: pulumi.Any(exampleAwsEc2TransitGateway.Id),
* Tags: pulumi.StringMap{
* "Name": pulumi.String("Example Policy Table"),
* },
* })
* 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.PolicyTable;
* import com.pulumi.aws.ec2transitgateway.PolicyTableArgs;
* 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 PolicyTable("example", PolicyTableArgs.builder()
* .transitGatewayId(exampleAwsEc2TransitGateway.id())
* .tags(Map.of("Name", "Example Policy Table"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2transitgateway:PolicyTable
* properties:
* transitGatewayId: ${exampleAwsEc2TransitGateway.id}
* tags:
* Name: Example Policy Table
* ```
*
* ## Import
* Using `pulumi import`, import `aws_ec2_transit_gateway_policy_table` using the EC2 Transit Gateway Policy Table identifier. For example:
* ```sh
* $ pulumi import aws:ec2transitgateway/policyTable:PolicyTable example tgw-rtb-12345678
* ```
*/
public class PolicyTable internal constructor(
override val javaResource: com.pulumi.aws.ec2transitgateway.PolicyTable,
) : KotlinCustomResource(javaResource, PolicyTableMapper) {
/**
* EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The state of the EC2 Transit Gateway Policy Table.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
/**
* Key-value tags for the EC2 Transit Gateway Policy Table. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy