@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
105 lines • 4.63 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.NetworkInsightsPath = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a Network Insights Path resource. Part of the "Reachability Analyzer" service in the AWS VPC console.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.ec2.NetworkInsightsPath("test", {
* source: source.id,
* destination: destination.id,
* protocol: "tcp",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Network Insights Paths using the `id`. For example:
*
* ```sh
* $ pulumi import aws:ec2/networkInsightsPath:NetworkInsightsPath test nip-00edfba169923aefd
* ```
*/
class NetworkInsightsPath extends pulumi.CustomResource {
/**
* Get an existing NetworkInsightsPath 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 NetworkInsightsPath(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of NetworkInsightsPath. 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'] === NetworkInsightsPath.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["destination"] = state?.destination;
resourceInputs["destinationArn"] = state?.destinationArn;
resourceInputs["destinationIp"] = state?.destinationIp;
resourceInputs["destinationPort"] = state?.destinationPort;
resourceInputs["filterAtDestination"] = state?.filterAtDestination;
resourceInputs["filterAtSource"] = state?.filterAtSource;
resourceInputs["protocol"] = state?.protocol;
resourceInputs["region"] = state?.region;
resourceInputs["source"] = state?.source;
resourceInputs["sourceArn"] = state?.sourceArn;
resourceInputs["sourceIp"] = state?.sourceIp;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.protocol === undefined && !opts.urn) {
throw new Error("Missing required property 'protocol'");
}
if (args?.source === undefined && !opts.urn) {
throw new Error("Missing required property 'source'");
}
resourceInputs["destination"] = args?.destination;
resourceInputs["destinationIp"] = args?.destinationIp;
resourceInputs["destinationPort"] = args?.destinationPort;
resourceInputs["filterAtDestination"] = args?.filterAtDestination;
resourceInputs["filterAtSource"] = args?.filterAtSource;
resourceInputs["protocol"] = args?.protocol;
resourceInputs["region"] = args?.region;
resourceInputs["source"] = args?.source;
resourceInputs["sourceIp"] = args?.sourceIp;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["destinationArn"] = undefined /*out*/;
resourceInputs["sourceArn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(NetworkInsightsPath.__pulumiType, name, resourceInputs, opts);
}
}
exports.NetworkInsightsPath = NetworkInsightsPath;
/** @internal */
NetworkInsightsPath.__pulumiType = 'aws:ec2/networkInsightsPath:NetworkInsightsPath';
//# sourceMappingURL=networkInsightsPath.js.map