@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
114 lines • 3.95 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.getManagementZoneOutput = exports.getManagementZone = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* The management zone data source allows the management zone ID to be retrieved by its name.
*
* > This data source requires the API token scope **Read configuration** (`ReadConfig`)
*
* !> This data source is utilizing an older API endpoint, please use dynatrace.ManagementZoneV2 instead.
*
* - `name` queries for all management zones with the specified name
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumi/dynatrace";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const test = dynatrace.getManagementZone({
* name: "Example",
* });
* const _name_ = new dynatrace.CalculatedServiceMetric("#name#", {
* conditions: [{
* conditions: [{
* attribute: "HTTP_REQUEST_METHOD",
* comparison: {
* httpMethod: {
* operator: "EQUALS_ANY_OF",
* values: [
* "POST",
* "GET",
* ],
* },
* negate: false,
* },
* }],
* }],
* enabled: true,
* managementZones: [test.then(test => test.id)],
* metricDefinition: {
* metric: "REQUEST_ATTRIBUTE",
* requestAttribute: "foo",
* },
* metricKey: "calc:service.#name#",
* unit: "MILLI_SECOND_PER_MINUTE",
* });
* ```
*/
function getManagementZone(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("dynatrace:index/getManagementZone:getManagementZone", {
"name": args.name,
}, opts);
}
exports.getManagementZone = getManagementZone;
/**
* The management zone data source allows the management zone ID to be retrieved by its name.
*
* > This data source requires the API token scope **Read configuration** (`ReadConfig`)
*
* !> This data source is utilizing an older API endpoint, please use dynatrace.ManagementZoneV2 instead.
*
* - `name` queries for all management zones with the specified name
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumi/dynatrace";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const test = dynatrace.getManagementZone({
* name: "Example",
* });
* const _name_ = new dynatrace.CalculatedServiceMetric("#name#", {
* conditions: [{
* conditions: [{
* attribute: "HTTP_REQUEST_METHOD",
* comparison: {
* httpMethod: {
* operator: "EQUALS_ANY_OF",
* values: [
* "POST",
* "GET",
* ],
* },
* negate: false,
* },
* }],
* }],
* enabled: true,
* managementZones: [test.then(test => test.id)],
* metricDefinition: {
* metric: "REQUEST_ATTRIBUTE",
* requestAttribute: "foo",
* },
* metricKey: "calc:service.#name#",
* unit: "MILLI_SECOND_PER_MINUTE",
* });
* ```
*/
function getManagementZoneOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("dynatrace:index/getManagementZone:getManagementZone", {
"name": args.name,
}, opts);
}
exports.getManagementZoneOutput = getManagementZoneOutput;
//# sourceMappingURL=getManagementZone.js.map