@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
105 lines • 5.13 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined;
resourceInputs["destination"] = state ? state.destination : undefined;
resourceInputs["destinationArn"] = state ? state.destinationArn : undefined;
resourceInputs["destinationIp"] = state ? state.destinationIp : undefined;
resourceInputs["destinationPort"] = state ? state.destinationPort : undefined;
resourceInputs["filterAtDestination"] = state ? state.filterAtDestination : undefined;
resourceInputs["filterAtSource"] = state ? state.filterAtSource : undefined;
resourceInputs["protocol"] = state ? state.protocol : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["source"] = state ? state.source : undefined;
resourceInputs["sourceArn"] = state ? state.sourceArn : undefined;
resourceInputs["sourceIp"] = state ? state.sourceIp : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
}
else {
const args = argsOrState;
if ((!args || args.protocol === undefined) && !opts.urn) {
throw new Error("Missing required property 'protocol'");
}
if ((!args || args.source === undefined) && !opts.urn) {
throw new Error("Missing required property 'source'");
}
resourceInputs["destination"] = args ? args.destination : undefined;
resourceInputs["destinationIp"] = args ? args.destinationIp : undefined;
resourceInputs["destinationPort"] = args ? args.destinationPort : undefined;
resourceInputs["filterAtDestination"] = args ? args.filterAtDestination : undefined;
resourceInputs["filterAtSource"] = args ? args.filterAtSource : undefined;
resourceInputs["protocol"] = args ? args.protocol : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["source"] = args ? args.source : undefined;
resourceInputs["sourceIp"] = args ? args.sourceIp : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
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