@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
99 lines • 4.22 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.TrafficMirrorTarget = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Traffic mirror target.\
* Read [limits and considerations](https://docs.aws.amazon.com/vpc/latest/mirroring/traffic-mirroring-considerations.html) for traffic mirroring
*
* ## Example Usage
*
* To create a basic traffic mirror session
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const nlb = new aws.ec2.TrafficMirrorTarget("nlb", {
* description: "NLB target",
* networkLoadBalancerArn: lb.arn,
* });
* const eni = new aws.ec2.TrafficMirrorTarget("eni", {
* description: "ENI target",
* networkInterfaceId: test.primaryNetworkInterfaceId,
* });
* const gwlb = new aws.ec2.TrafficMirrorTarget("gwlb", {
* description: "GWLB target",
* gatewayLoadBalancerEndpointId: example.id,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import traffic mirror targets using the `id`. For example:
*
* ```sh
* $ pulumi import aws:ec2/trafficMirrorTarget:TrafficMirrorTarget target tmt-0c13a005422b86606
* ```
*/
class TrafficMirrorTarget extends pulumi.CustomResource {
/**
* Get an existing TrafficMirrorTarget 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, id, state, opts) {
return new TrafficMirrorTarget(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of TrafficMirrorTarget. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === TrafficMirrorTarget.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["description"] = state?.description;
resourceInputs["gatewayLoadBalancerEndpointId"] = state?.gatewayLoadBalancerEndpointId;
resourceInputs["networkInterfaceId"] = state?.networkInterfaceId;
resourceInputs["networkLoadBalancerArn"] = state?.networkLoadBalancerArn;
resourceInputs["ownerId"] = state?.ownerId;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
resourceInputs["description"] = args?.description;
resourceInputs["gatewayLoadBalancerEndpointId"] = args?.gatewayLoadBalancerEndpointId;
resourceInputs["networkInterfaceId"] = args?.networkInterfaceId;
resourceInputs["networkLoadBalancerArn"] = args?.networkLoadBalancerArn;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["ownerId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TrafficMirrorTarget.__pulumiType, name, resourceInputs, opts);
}
}
exports.TrafficMirrorTarget = TrafficMirrorTarget;
/** @internal */
TrafficMirrorTarget.__pulumiType = 'aws:ec2/trafficMirrorTarget:TrafficMirrorTarget';
//# sourceMappingURL=trafficMirrorTarget.js.map