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