@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
150 lines • 7.15 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.ProviderAwsCloudwatchScrapeJob = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as grafana from "@pulumi/grafana";
* import * as grafana from "@pulumiverse/grafana";
*
* const test = grafana.cloud.getStack({
* slug: "gcloudstacktest",
* });
* const testGetRole = aws.iam.getRole({
* name: "my-role",
* });
* const testAwsAccount = new grafana.cloudprovider.AwsAccount("test", {
* stackId: test.then(test => test.id),
* roleArn: testGetRole.then(testGetRole => testGetRole.arn),
* regions: [
* "us-east-1",
* "us-east-2",
* "us-west-1",
* ],
* });
* const testAwsCloudwatchScrapeJob = new grafana.cloudprovider.AwsCloudwatchScrapeJob("test", {
* stackId: test.then(test => test.id),
* name: "my-cloudwatch-scrape-job",
* awsAccountResourceId: testAwsAccount.resourceId,
* exportTags: true,
* services: [{
* name: "AWS/EC2",
* metrics: [
* {
* name: "CPUUtilization",
* statistics: ["Average"],
* },
* {
* name: "StatusCheckFailed",
* statistics: ["Maximum"],
* },
* ],
* scrapeIntervalSeconds: 300,
* resourceDiscoveryTagFilters: [{
* key: "k8s.io/cluster-autoscaler/enabled",
* value: "true",
* }],
* tagsToAddToMetrics: ["eks:cluster-name"],
* }],
* customNamespaces: [{
* name: "CoolApp",
* metrics: [{
* name: "CoolMetric",
* statistics: [
* "Maximum",
* "Sum",
* ],
* }],
* scrapeIntervalSeconds: 300,
* }],
* staticLabels: {
* label1: "value1",
* label2: "value2",
* },
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:cloud/providerAwsCloudwatchScrapeJob:ProviderAwsCloudwatchScrapeJob name "{{ stack_id }}:{{ name }}"
* ```
*
* @deprecated grafana.cloud/providerawscloudwatchscrapejob.ProviderAwsCloudwatchScrapeJob has been deprecated in favor of grafana.cloudprovider/awscloudwatchscrapejob.AwsCloudwatchScrapeJob
*/
class ProviderAwsCloudwatchScrapeJob extends pulumi.CustomResource {
/**
* Get an existing ProviderAwsCloudwatchScrapeJob 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("ProviderAwsCloudwatchScrapeJob is deprecated: grafana.cloud/providerawscloudwatchscrapejob.ProviderAwsCloudwatchScrapeJob has been deprecated in favor of grafana.cloudprovider/awscloudwatchscrapejob.AwsCloudwatchScrapeJob");
return new ProviderAwsCloudwatchScrapeJob(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ProviderAwsCloudwatchScrapeJob. 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'] === ProviderAwsCloudwatchScrapeJob.__pulumiType;
}
/** @deprecated grafana.cloud/providerawscloudwatchscrapejob.ProviderAwsCloudwatchScrapeJob has been deprecated in favor of grafana.cloudprovider/awscloudwatchscrapejob.AwsCloudwatchScrapeJob */
constructor(name, argsOrState, opts) {
pulumi.log.warn("ProviderAwsCloudwatchScrapeJob is deprecated: grafana.cloud/providerawscloudwatchscrapejob.ProviderAwsCloudwatchScrapeJob has been deprecated in favor of grafana.cloudprovider/awscloudwatchscrapejob.AwsCloudwatchScrapeJob");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["awsAccountResourceId"] = state ? state.awsAccountResourceId : undefined;
resourceInputs["customNamespaces"] = state ? state.customNamespaces : undefined;
resourceInputs["disabledReason"] = state ? state.disabledReason : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["exportTags"] = state ? state.exportTags : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["regionsSubsetOverrides"] = state ? state.regionsSubsetOverrides : undefined;
resourceInputs["services"] = state ? state.services : undefined;
resourceInputs["stackId"] = state ? state.stackId : undefined;
resourceInputs["staticLabels"] = state ? state.staticLabels : undefined;
}
else {
const args = argsOrState;
if ((!args || args.awsAccountResourceId === undefined) && !opts.urn) {
throw new Error("Missing required property 'awsAccountResourceId'");
}
if ((!args || args.stackId === undefined) && !opts.urn) {
throw new Error("Missing required property 'stackId'");
}
resourceInputs["awsAccountResourceId"] = args ? args.awsAccountResourceId : undefined;
resourceInputs["customNamespaces"] = args ? args.customNamespaces : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["exportTags"] = args ? args.exportTags : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["regionsSubsetOverrides"] = args ? args.regionsSubsetOverrides : undefined;
resourceInputs["services"] = args ? args.services : undefined;
resourceInputs["stackId"] = args ? args.stackId : undefined;
resourceInputs["staticLabels"] = args ? args.staticLabels : undefined;
resourceInputs["disabledReason"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ProviderAwsCloudwatchScrapeJob.__pulumiType, name, resourceInputs, opts);
}
}
exports.ProviderAwsCloudwatchScrapeJob = ProviderAwsCloudwatchScrapeJob;
/** @internal */
ProviderAwsCloudwatchScrapeJob.__pulumiType = 'grafana:cloud/providerAwsCloudwatchScrapeJob:ProviderAwsCloudwatchScrapeJob';
//# sourceMappingURL=providerAwsCloudwatchScrapeJob.js.map