UNPKG

@pulumiverse/dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

93 lines 4.31 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.AutotagRules = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > `dynatrace.AutotagV2` is the primary resource to manage auto tags. This particular resource allows you to manage a subset of tags of a given auto tag ID. The benefit of this is that it allows the flexibility of multiple users to manage the same automatically applied tag. * * > This resource requires the API token scopes **Read settings** (`settings.read`) and **Write settings** (`settings.write`) * * ## Dynatrace Documentation * * - Define and apply tags - https://www.dynatrace.com/support/help/how-to-use-dynatrace/tags-and-metadata/setup/how-to-define-tags * * - Settings API - https://www.dynatrace.com/support/help/dynatrace-api/environment-api/settings (schemaId: `builtin:tags.auto-tagging`) * * The full documentation of the export feature is available [here](https://dt-url.net/h203qmc). * * ## Resource Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dynatrace from "@pulumiverse/dynatrace"; * * const sampleAutotagV2 = new dynatrace.AutotagV2("sampleAutotagV2", {rulesMaintainedExternally: true}); * //Be careful when maintaining `dynatrace_autotag_rules` in separate modules. * //Do not execute `pulumi up` in parallel when several modules contain * //`dynatrace_autotag_rules` referring to the same `dynatrace_autotag_v2`. * const sampleAutotagRules = new dynatrace.AutotagRules("sampleAutotagRules", { * autoTagId: sampleAutotagV2.id, * rules: { * rules: [{ * type: "SELECTOR", * enabled: true, * entitySelector: "type(SERVICE),tag(sample)", * valueFormat: "disabled", * valueNormalization: "Leave text as-is", * }], * }, * }); * ``` */ class AutotagRules extends pulumi.CustomResource { /** * Get an existing AutotagRules 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 AutotagRules(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AutotagRules. 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'] === AutotagRules.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["autoTagId"] = state ? state.autoTagId : undefined; resourceInputs["currentState"] = state ? state.currentState : undefined; resourceInputs["rules"] = state ? state.rules : undefined; } else { const args = argsOrState; if ((!args || args.autoTagId === undefined) && !opts.urn) { throw new Error("Missing required property 'autoTagId'"); } resourceInputs["autoTagId"] = args ? args.autoTagId : undefined; resourceInputs["currentState"] = args ? args.currentState : undefined; resourceInputs["rules"] = args ? args.rules : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AutotagRules.__pulumiType, name, resourceInputs, opts); } } exports.AutotagRules = AutotagRules; /** @internal */ AutotagRules.__pulumiType = 'dynatrace:index/autotagRules:AutotagRules'; //# sourceMappingURL=autotagRules.js.map