@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
95 lines • 4.7 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomDevice = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > This resource requires the API token scopes **Read entities** (`entities.read`) and **Write entities** (`entities.write`)
*
* ## Dynatrace Documentation
*
* - Monitored entities API - https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2
*
* ## Resource Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const _name_ = new dynatrace.CustomDevice("#name#", {
* customDeviceId: "customDeviceId",
* displayName: "customDevicename",
* });
* ```
*/
class CustomDevice extends pulumi.CustomResource {
/**
* Get an existing CustomDevice 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 CustomDevice(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CustomDevice. 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'] === CustomDevice.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["configUrl"] = state ? state.configUrl : undefined;
resourceInputs["customDeviceId"] = state ? state.customDeviceId : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["dnsNames"] = state ? state.dnsNames : undefined;
resourceInputs["entityId"] = state ? state.entityId : undefined;
resourceInputs["faviconUrl"] = state ? state.faviconUrl : undefined;
resourceInputs["group"] = state ? state.group : undefined;
resourceInputs["ipAddresses"] = state ? state.ipAddresses : undefined;
resourceInputs["listenPorts"] = state ? state.listenPorts : undefined;
resourceInputs["properties"] = state ? state.properties : undefined;
resourceInputs["props"] = state ? state.props : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["uiBased"] = state ? state.uiBased : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["configUrl"] = args ? args.configUrl : undefined;
resourceInputs["customDeviceId"] = args ? args.customDeviceId : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["dnsNames"] = args ? args.dnsNames : undefined;
resourceInputs["faviconUrl"] = args ? args.faviconUrl : undefined;
resourceInputs["group"] = args ? args.group : undefined;
resourceInputs["ipAddresses"] = args ? args.ipAddresses : undefined;
resourceInputs["listenPorts"] = args ? args.listenPorts : undefined;
resourceInputs["properties"] = args ? args.properties : undefined;
resourceInputs["props"] = args ? args.props : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["uiBased"] = args ? args.uiBased : undefined;
resourceInputs["entityId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CustomDevice.__pulumiType, name, resourceInputs, opts);
}
}
exports.CustomDevice = CustomDevice;
/** @internal */
CustomDevice.__pulumiType = 'dynatrace:index/customDevice:CustomDevice';
//# sourceMappingURL=customDevice.js.map