import * as core from "@terrascript/core"; export interface Ec2TrafficMirrorSessionArgs extends core.ResourceArgs { /** * (Optional) A description of the traffic mirror session. */ description?: string | core.StringOut; /** * (Required, Forces new) ID of the source network interface. Not all network interfaces are eligible a * s mirror sources. On EC2 instances only nitro based instances support mirroring. */ networkInterfaceId: string | core.StringOut; /** * (Optional) The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do * not specify this parameter when you want to mirror the entire packet. To mirror a subset of the pack * et, set this to the length (in bytes) that you want to mirror. */ packetLength?: number | core.NumberOut; /** * (Required) - The session number determines the order in which sessions are evaluated when an interfa * ce is used by multiple sessions. The first session with a matching filter is the one that mirrors th * e packets. */ sessionNumber: number | core.NumberOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; trafficMirrorFilterId: string | core.StringOut; /** * (Required) ID of the traffic mirror target to be used */ trafficMirrorTargetId: string | core.StringOut; /** * (Optional) - The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN proto * col, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at * random. */ virtualNetworkId?: number | core.NumberOut; } export class Ec2TrafficMirrorSession extends core.Resource { /** * The ARN of the traffic mirror session. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) A description of the traffic mirror session. */ @core.attr(String) public description?: string | core.StringOut; /** * The name of the session. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required, Forces new) ID of the source network interface. Not all network interfaces are eligible a * s mirror sources. On EC2 instances only nitro based instances support mirroring. */ @core.attr(String) public networkInterfaceId!: string | core.StringOut; /** * The AWS account ID of the session owner. */ @core.attr(String, { computed: true }) public ownerId!: string | core.StringOut; /** * (Optional) The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do * not specify this parameter when you want to mirror the entire packet. To mirror a subset of the pack * et, set this to the length (in bytes) that you want to mirror. */ @core.attr(Number) public packetLength?: number | core.NumberOut; /** * (Required) - The session number determines the order in which sessions are evaluated when an interfa * ce is used by multiple sessions. The first session with a matching filter is the one that mirrors th * e packets. */ @core.attr(Number) public sessionNumber!: number | core.NumberOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; @core.attr(String) public trafficMirrorFilterId!: string | core.StringOut; /** * (Required) ID of the traffic mirror target to be used */ @core.attr(String) public trafficMirrorTargetId!: string | core.StringOut; /** * (Optional) - The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN proto * col, see RFC 7348. If you do not specify a VirtualNetworkId, an account-wide unique id is chosen at * random. */ @core.attr(Number, { computed: true }) public virtualNetworkId?: number | core.NumberOut; constructor(name: string, args?: Ec2TrafficMirrorSessionArgs) { super(name, "aws_ec2_traffic_mirror_session", args); } public override getNamespace(): string { return "aws_vpc"; } }