UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

106 lines 5.29 kB
"use strict"; // *** 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.CockpitAlertManager = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `scaleway.observability.AlertManager` resource allows you to enable and manage the Scaleway Cockpit [alert manager](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#alert-manager). * * Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information. * * ## Example Usage * * ### Enable the alert manager and configure managed alerts * * The following commands allow you to: * * - enable the alert manager in a Project named `tfTestProject` * - enable [managed alerts](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#managed-alerts) * - set up [contact points](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#contact-points) to receive alert notifications * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const project = new scaleway.account.Project("project", {name: "tf_test_project"}); * const alertManager = new scaleway.observability.AlertManager("alert_manager", { * projectId: project.id, * enableManagedAlerts: true, * contactPoints: [ * { * email: "alert1@example.com", * }, * { * email: "alert2@example.com", * }, * ], * }); * ``` * * ## Import * * This section explains how to import alert managers using the ID of the Project associated with Cockpit. * * bash * * ```sh * $ pulumi import scaleway:index/cockpitAlertManager:CockpitAlertManager main fr-par/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/cockpitalertmanager.CockpitAlertManager has been deprecated in favor of scaleway.observability/alertmanager.AlertManager */ class CockpitAlertManager extends pulumi.CustomResource { /** * Get an existing CockpitAlertManager 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) { pulumi.log.warn("CockpitAlertManager is deprecated: scaleway.index/cockpitalertmanager.CockpitAlertManager has been deprecated in favor of scaleway.observability/alertmanager.AlertManager"); return new CockpitAlertManager(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of CockpitAlertManager. 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'] === CockpitAlertManager.__pulumiType; } /** @deprecated scaleway.index/cockpitalertmanager.CockpitAlertManager has been deprecated in favor of scaleway.observability/alertmanager.AlertManager */ constructor(name, argsOrState, opts) { pulumi.log.warn("CockpitAlertManager is deprecated: scaleway.index/cockpitalertmanager.CockpitAlertManager has been deprecated in favor of scaleway.observability/alertmanager.AlertManager"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["alertManagerUrl"] = state ? state.alertManagerUrl : undefined; resourceInputs["contactPoints"] = state ? state.contactPoints : undefined; resourceInputs["enableManagedAlerts"] = state ? state.enableManagedAlerts : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["region"] = state ? state.region : undefined; } else { const args = argsOrState; resourceInputs["contactPoints"] = args ? args.contactPoints : undefined; resourceInputs["enableManagedAlerts"] = args ? args.enableManagedAlerts : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["alertManagerUrl"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CockpitAlertManager.__pulumiType, name, resourceInputs, opts); } } exports.CockpitAlertManager = CockpitAlertManager; /** @internal */ CockpitAlertManager.__pulumiType = 'scaleway:index/cockpitAlertManager:CockpitAlertManager'; //# sourceMappingURL=cockpitAlertManager.js.map