@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
68 lines • 3.39 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.ApiDetection = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class ApiDetection extends pulumi.CustomResource {
/**
* Get an existing ApiDetection 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 ApiDetection(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ApiDetection. 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'] === ApiDetection.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["apiColor"] = state ? state.apiColor : undefined;
resourceInputs["apiName"] = state ? state.apiName : undefined;
resourceInputs["conditions"] = state ? state.conditions : undefined;
resourceInputs["insertAfter"] = state ? state.insertAfter : undefined;
resourceInputs["technology"] = state ? state.technology : undefined;
resourceInputs["thirdPartyApi"] = state ? state.thirdPartyApi : undefined;
}
else {
const args = argsOrState;
if ((!args || args.apiColor === undefined) && !opts.urn) {
throw new Error("Missing required property 'apiColor'");
}
if ((!args || args.apiName === undefined) && !opts.urn) {
throw new Error("Missing required property 'apiName'");
}
if ((!args || args.thirdPartyApi === undefined) && !opts.urn) {
throw new Error("Missing required property 'thirdPartyApi'");
}
resourceInputs["apiColor"] = args ? args.apiColor : undefined;
resourceInputs["apiName"] = args ? args.apiName : undefined;
resourceInputs["conditions"] = args ? args.conditions : undefined;
resourceInputs["insertAfter"] = args ? args.insertAfter : undefined;
resourceInputs["technology"] = args ? args.technology : undefined;
resourceInputs["thirdPartyApi"] = args ? args.thirdPartyApi : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ApiDetection.__pulumiType, name, resourceInputs, opts);
}
}
exports.ApiDetection = ApiDetection;
/** @internal */
ApiDetection.__pulumiType = 'dynatrace:index/apiDetection:ApiDetection';
//# sourceMappingURL=apiDetection.js.map