@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
119 lines • 7.21 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.K8sWorkloadAnomalies = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class K8sWorkloadAnomalies extends pulumi.CustomResource {
/**
* Get an existing K8sWorkloadAnomalies 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 K8sWorkloadAnomalies(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of K8sWorkloadAnomalies. 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'] === K8sWorkloadAnomalies.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["containerRestarts"] = state ? state.containerRestarts : undefined;
resourceInputs["deploymentStuck"] = state ? state.deploymentStuck : undefined;
resourceInputs["highCpuThrottling"] = state ? state.highCpuThrottling : undefined;
resourceInputs["highCpuUsage"] = state ? state.highCpuUsage : undefined;
resourceInputs["highMemoryUsage"] = state ? state.highMemoryUsage : undefined;
resourceInputs["jobFailureEvents"] = state ? state.jobFailureEvents : undefined;
resourceInputs["notAllPodsReady"] = state ? state.notAllPodsReady : undefined;
resourceInputs["oomKills"] = state ? state.oomKills : undefined;
resourceInputs["pendingPods"] = state ? state.pendingPods : undefined;
resourceInputs["podBackoffEvents"] = state ? state.podBackoffEvents : undefined;
resourceInputs["podEvictionEvents"] = state ? state.podEvictionEvents : undefined;
resourceInputs["podPreemptionEvents"] = state ? state.podPreemptionEvents : undefined;
resourceInputs["podStuckInTerminating"] = state ? state.podStuckInTerminating : undefined;
resourceInputs["scope"] = state ? state.scope : undefined;
resourceInputs["workloadWithoutReadyPods"] = state ? state.workloadWithoutReadyPods : undefined;
}
else {
const args = argsOrState;
if ((!args || args.containerRestarts === undefined) && !opts.urn) {
throw new Error("Missing required property 'containerRestarts'");
}
if ((!args || args.deploymentStuck === undefined) && !opts.urn) {
throw new Error("Missing required property 'deploymentStuck'");
}
if ((!args || args.highCpuThrottling === undefined) && !opts.urn) {
throw new Error("Missing required property 'highCpuThrottling'");
}
if ((!args || args.highCpuUsage === undefined) && !opts.urn) {
throw new Error("Missing required property 'highCpuUsage'");
}
if ((!args || args.highMemoryUsage === undefined) && !opts.urn) {
throw new Error("Missing required property 'highMemoryUsage'");
}
if ((!args || args.jobFailureEvents === undefined) && !opts.urn) {
throw new Error("Missing required property 'jobFailureEvents'");
}
if ((!args || args.notAllPodsReady === undefined) && !opts.urn) {
throw new Error("Missing required property 'notAllPodsReady'");
}
if ((!args || args.oomKills === undefined) && !opts.urn) {
throw new Error("Missing required property 'oomKills'");
}
if ((!args || args.pendingPods === undefined) && !opts.urn) {
throw new Error("Missing required property 'pendingPods'");
}
if ((!args || args.podBackoffEvents === undefined) && !opts.urn) {
throw new Error("Missing required property 'podBackoffEvents'");
}
if ((!args || args.podEvictionEvents === undefined) && !opts.urn) {
throw new Error("Missing required property 'podEvictionEvents'");
}
if ((!args || args.podPreemptionEvents === undefined) && !opts.urn) {
throw new Error("Missing required property 'podPreemptionEvents'");
}
if ((!args || args.podStuckInTerminating === undefined) && !opts.urn) {
throw new Error("Missing required property 'podStuckInTerminating'");
}
if ((!args || args.workloadWithoutReadyPods === undefined) && !opts.urn) {
throw new Error("Missing required property 'workloadWithoutReadyPods'");
}
resourceInputs["containerRestarts"] = args ? args.containerRestarts : undefined;
resourceInputs["deploymentStuck"] = args ? args.deploymentStuck : undefined;
resourceInputs["highCpuThrottling"] = args ? args.highCpuThrottling : undefined;
resourceInputs["highCpuUsage"] = args ? args.highCpuUsage : undefined;
resourceInputs["highMemoryUsage"] = args ? args.highMemoryUsage : undefined;
resourceInputs["jobFailureEvents"] = args ? args.jobFailureEvents : undefined;
resourceInputs["notAllPodsReady"] = args ? args.notAllPodsReady : undefined;
resourceInputs["oomKills"] = args ? args.oomKills : undefined;
resourceInputs["pendingPods"] = args ? args.pendingPods : undefined;
resourceInputs["podBackoffEvents"] = args ? args.podBackoffEvents : undefined;
resourceInputs["podEvictionEvents"] = args ? args.podEvictionEvents : undefined;
resourceInputs["podPreemptionEvents"] = args ? args.podPreemptionEvents : undefined;
resourceInputs["podStuckInTerminating"] = args ? args.podStuckInTerminating : undefined;
resourceInputs["scope"] = args ? args.scope : undefined;
resourceInputs["workloadWithoutReadyPods"] = args ? args.workloadWithoutReadyPods : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(K8sWorkloadAnomalies.__pulumiType, name, resourceInputs, opts);
}
}
exports.K8sWorkloadAnomalies = K8sWorkloadAnomalies;
/** @internal */
K8sWorkloadAnomalies.__pulumiType = 'dynatrace:index/k8sWorkloadAnomalies:K8sWorkloadAnomalies';
//# sourceMappingURL=k8sWorkloadAnomalies.js.map