1. Packages
  2. AWS
  3. API Docs
  4. ec2transitgateway
  5. PolicyTable
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ec2transitgateway.PolicyTable

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages an EC2 Transit Gateway Policy Table.

    Example Usage

    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",
        },
    });
    
    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",
        })
    
    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
    	})
    }
    
    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" },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2transitgateway:PolicyTable
        properties:
          transitGatewayId: ${exampleAwsEc2TransitGateway.id}
          tags:
            Name: Example Policy Table
    

    Create PolicyTable Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PolicyTable(name: string, args: PolicyTableArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyTable(resource_name: str,
                    args: PolicyTableArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyTable(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    transit_gateway_id: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None)
    func NewPolicyTable(ctx *Context, name string, args PolicyTableArgs, opts ...ResourceOption) (*PolicyTable, error)
    public PolicyTable(string name, PolicyTableArgs args, CustomResourceOptions? opts = null)
    public PolicyTable(String name, PolicyTableArgs args)
    public PolicyTable(String name, PolicyTableArgs args, CustomResourceOptions options)
    
    type: aws:ec2transitgateway:PolicyTable
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PolicyTableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PolicyTableArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PolicyTableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyTableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyTableArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var policyTableResource = new Aws.Ec2TransitGateway.PolicyTable("policyTableResource", new()
    {
        TransitGatewayId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ec2transitgateway.NewPolicyTable(ctx, "policyTableResource", &ec2transitgateway.PolicyTableArgs{
    	TransitGatewayId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var policyTableResource = new PolicyTable("policyTableResource", PolicyTableArgs.builder()
        .transitGatewayId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    policy_table_resource = aws.ec2transitgateway.PolicyTable("policyTableResource",
        transit_gateway_id="string",
        tags={
            "string": "string",
        })
    
    const policyTableResource = new aws.ec2transitgateway.PolicyTable("policyTableResource", {
        transitGatewayId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:ec2transitgateway:PolicyTable
    properties:
        tags:
            string: string
        transitGatewayId: string
    

    PolicyTable Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PolicyTable resource accepts the following input properties:

    TransitGatewayId string
    EC2 Transit Gateway identifier.
    Tags Dictionary<string, string>
    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.
    TransitGatewayId string
    EC2 Transit Gateway identifier.
    Tags map[string]string
    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.
    transitGatewayId String
    EC2 Transit Gateway identifier.
    tags Map<String,String>
    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.
    transitGatewayId string
    EC2 Transit Gateway identifier.
    tags {[key: string]: string}
    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.
    transit_gateway_id str
    EC2 Transit Gateway identifier.
    tags Mapping[str, str]
    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.
    transitGatewayId String
    EC2 Transit Gateway identifier.
    tags Map<String>
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyTable resource produces the following output properties:

    Arn string
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The state of the EC2 Transit Gateway Policy Table.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The state of the EC2 Transit Gateway Policy Table.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The state of the EC2 Transit Gateway Policy Table.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The state of the EC2 Transit Gateway Policy Table.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The state of the EC2 Transit Gateway Policy Table.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The state of the EC2 Transit Gateway Policy Table.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing PolicyTable Resource

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

    public static get(name: string, id: Input<ID>, state?: PolicyTableState, opts?: CustomResourceOptions): PolicyTable
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            state: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            transit_gateway_id: Optional[str] = None) -> PolicyTable
    func GetPolicyTable(ctx *Context, name string, id IDInput, state *PolicyTableState, opts ...ResourceOption) (*PolicyTable, error)
    public static PolicyTable Get(string name, Input<string> id, PolicyTableState? state, CustomResourceOptions? opts = null)
    public static PolicyTable get(String name, Output<String> id, PolicyTableState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    State string
    The state of the EC2 Transit Gateway Policy Table.
    Tags Dictionary<string, string>
    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.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TransitGatewayId string
    EC2 Transit Gateway identifier.
    Arn string
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    State string
    The state of the EC2 Transit Gateway Policy Table.
    Tags map[string]string
    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.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TransitGatewayId string
    EC2 Transit Gateway identifier.
    arn String
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    state String
    The state of the EC2 Transit Gateway Policy Table.
    tags Map<String,String>
    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.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    transitGatewayId String
    EC2 Transit Gateway identifier.
    arn string
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    state string
    The state of the EC2 Transit Gateway Policy Table.
    tags {[key: string]: string}
    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.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    transitGatewayId string
    EC2 Transit Gateway identifier.
    arn str
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    state str
    The state of the EC2 Transit Gateway Policy Table.
    tags Mapping[str, str]
    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.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    transit_gateway_id str
    EC2 Transit Gateway identifier.
    arn String
    EC2 Transit Gateway Policy Table Amazon Resource Name (ARN).
    state String
    The state of the EC2 Transit Gateway Policy Table.
    tags Map<String>
    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.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    transitGatewayId String
    EC2 Transit Gateway identifier.

    Import

    Using pulumi import, import aws_ec2_transit_gateway_policy_table using the EC2 Transit Gateway Policy Table identifier. For example:

    $ pulumi import aws:ec2transitgateway/policyTable:PolicyTable example tgw-rtb-12345678
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi