import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an EC2 Transit Gateway Policy Table Entry. Each entry defines a traffic matching rule within a Transit Gateway Policy Table that routes matching traffic to a specified transit gateway route table, enabling Policy-Based Routing (PBR). * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2transitgateway.PolicyTableEntry("example", { * transitGatewayPolicyTableId: exampleAwsEc2TransitGatewayPolicyTable.id, * policyRuleNumber: "100", * targetRouteTableId: exampleAwsEc2TransitGatewayRouteTable.id, * }); * ``` * * ### Full Traffic Matching Rule * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2transitgateway.PolicyTableEntry("example", { * policyRule: { * metadata: { * key: "test", * value: "test", * }, * sourceCidrBlock: "10.0.1.0/24", * sourcePortRange: "*", * destinationCidrBlock: "10.0.2.0/24", * destinationPortRange: "443", * protocol: "6", * }, * transitGatewayPolicyTableId: exampleAwsEc2TransitGatewayPolicyTable.id, * policyRuleNumber: "200", * targetRouteTableId: exampleAwsEc2TransitGatewayRouteTable.id, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `transitGatewayPolicyTableId` (String) EC2 Transit Gateway Policy Table identifier. * * `policyRuleNumber` (String) Rule number for this entry. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import `aws.ec2transitgateway.PolicyTableEntry` using the composite identifier. For example: * * ```sh * $ pulumi import aws:ec2transitgateway/policyTableEntry:PolicyTableEntry example tgw-ptb-000000000fffffff,100 * ``` */ export declare class PolicyTableEntry extends pulumi.CustomResource { /** * Get an existing PolicyTableEntry resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PolicyTableEntryState, opts?: pulumi.CustomResourceOptions): PolicyTableEntry; /** * Returns true if the given object is an instance of PolicyTableEntry. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is PolicyTableEntry; /** * Matching criteria for the policy table entry. See below. */ readonly policyRule: pulumi.Output; /** * Rule number for this entry. Changing this value forces a new resource. Lower numbers are evaluated first and take precedence. Enter an integer from 1 to 50,000. Leave gaps between numbers (for example, 100, 110, 120) so you can insert rules later without renumbering. */ readonly policyRuleNumber: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * ID of the transit gateway route table to use for traffic matching this rule. */ readonly targetRouteTableId: pulumi.Output; /** * EC2 Transit Gateway Policy Table identifier. * * The following arguments are optional: */ readonly transitGatewayPolicyTableId: pulumi.Output; /** * Create a PolicyTableEntry resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PolicyTableEntryArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PolicyTableEntry resources. */ export interface PolicyTableEntryState { /** * Matching criteria for the policy table entry. See below. */ policyRule?: pulumi.Input; /** * Rule number for this entry. Changing this value forces a new resource. Lower numbers are evaluated first and take precedence. Enter an integer from 1 to 50,000. Leave gaps between numbers (for example, 100, 110, 120) so you can insert rules later without renumbering. */ policyRuleNumber?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * ID of the transit gateway route table to use for traffic matching this rule. */ targetRouteTableId?: pulumi.Input; /** * EC2 Transit Gateway Policy Table identifier. * * The following arguments are optional: */ transitGatewayPolicyTableId?: pulumi.Input; } /** * The set of arguments for constructing a PolicyTableEntry resource. */ export interface PolicyTableEntryArgs { /** * Matching criteria for the policy table entry. See below. */ policyRule?: pulumi.Input; /** * Rule number for this entry. Changing this value forces a new resource. Lower numbers are evaluated first and take precedence. Enter an integer from 1 to 50,000. Leave gaps between numbers (for example, 100, 110, 120) so you can insert rules later without renumbering. */ policyRuleNumber: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * ID of the transit gateway route table to use for traffic matching this rule. */ targetRouteTableId: pulumi.Input; /** * EC2 Transit Gateway Policy Table identifier. * * The following arguments are optional: */ transitGatewayPolicyTableId: pulumi.Input; } //# sourceMappingURL=policyTableEntry.d.ts.map