UNPKG

@pulumi/aws

Version:

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

118 lines 5.3 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, Object.assign(Object.assign({}, 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 ? state.addressFamily : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["destination"] = state ? state.destination : undefined; resourceInputs["destinationPort"] = state ? state.destinationPort : undefined; resourceInputs["monitorName"] = state ? state.monitorName : undefined; resourceInputs["packetSize"] = state ? state.packetSize : undefined; resourceInputs["probeId"] = state ? state.probeId : undefined; resourceInputs["protocol"] = state ? state.protocol : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["sourceArn"] = state ? state.sourceArn : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; } else { const args = argsOrState; if ((!args || args.destination === undefined) && !opts.urn) { throw new Error("Missing required property 'destination'"); } if ((!args || args.monitorName === undefined) && !opts.urn) { throw new Error("Missing required property 'monitorName'"); } if ((!args || args.protocol === undefined) && !opts.urn) { throw new Error("Missing required property 'protocol'"); } if ((!args || args.sourceArn === undefined) && !opts.urn) { throw new Error("Missing required property 'sourceArn'"); } resourceInputs["destination"] = args ? args.destination : undefined; resourceInputs["destinationPort"] = args ? args.destinationPort : undefined; resourceInputs["monitorName"] = args ? args.monitorName : undefined; resourceInputs["packetSize"] = args ? args.packetSize : undefined; resourceInputs["protocol"] = args ? args.protocol : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["sourceArn"] = args ? args.sourceArn : undefined; resourceInputs["tags"] = args ? args.tags : undefined; 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