UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

118 lines 4.84 kB
"use strict"; // *** 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.Probe = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Network Monitor Probe. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmonitor.Monitor("example", { * aggregationPeriod: 30, * monitorName: "example", * }); * const exampleProbe = new aws.networkmonitor.Probe("example", { * monitorName: example.monitorName, * destination: "127.0.0.1", * destinationPort: 80, * protocol: "TCP", * sourceArn: exampleAwsSubnet.arn, * packetSize: 200, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_networkmonitor_probe` using the monitor name and probe id. For example: * * ```sh * $ pulumi import aws:networkmonitor/probe:Probe example monitor-7786087912324693644,probe-3qm8p693i4fi1h8lqylzkbp42e * ``` */ class Probe extends pulumi.CustomResource { /** * Get an existing Probe 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 Probe(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Probe. 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'] === Probe.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["addressFamily"] = state?.addressFamily; resourceInputs["arn"] = state?.arn; resourceInputs["destination"] = state?.destination; resourceInputs["destinationPort"] = state?.destinationPort; resourceInputs["monitorName"] = state?.monitorName; resourceInputs["packetSize"] = state?.packetSize; resourceInputs["probeId"] = state?.probeId; resourceInputs["protocol"] = state?.protocol; resourceInputs["region"] = state?.region; resourceInputs["sourceArn"] = state?.sourceArn; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["vpcId"] = state?.vpcId; } else { const args = argsOrState; if (args?.destination === undefined && !opts.urn) { throw new Error("Missing required property 'destination'"); } if (args?.monitorName === undefined && !opts.urn) { throw new Error("Missing required property 'monitorName'"); } if (args?.protocol === undefined && !opts.urn) { throw new Error("Missing required property 'protocol'"); } if (args?.sourceArn === undefined && !opts.urn) { throw new Error("Missing required property 'sourceArn'"); } resourceInputs["destination"] = args?.destination; resourceInputs["destinationPort"] = args?.destinationPort; resourceInputs["monitorName"] = args?.monitorName; resourceInputs["packetSize"] = args?.packetSize; resourceInputs["protocol"] = args?.protocol; resourceInputs["region"] = args?.region; resourceInputs["sourceArn"] = args?.sourceArn; resourceInputs["tags"] = args?.tags; resourceInputs["addressFamily"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["probeId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Probe.__pulumiType, name, resourceInputs, opts); } } exports.Probe = Probe; /** @internal */ Probe.__pulumiType = 'aws:networkmonitor/probe:Probe'; //# sourceMappingURL=probe.js.map