@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
126 lines • 4.66 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkspaceConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an AWS Managed Service for Prometheus Workspace Configuration.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.amp.Workspace("example", {});
* const exampleWorkspaceConfiguration = new aws.amp.WorkspaceConfiguration("example", {
* workspaceId: example.id,
* retentionPeriodInDays: 60,
* limitsPerLabelSets: [
* {
* labelSet: {
* env: "dev",
* },
* limits: {
* maxSeries: 100000,
* },
* },
* {
* labelSet: {
* env: "prod",
* },
* limits: {
* maxSeries: 400000,
* },
* },
* ],
* });
* ```
*
* ### Setting up default bucket
*
* The default bucket limit is the maximum number of active time series that can be
* ingested in the workspace, counting only time series that don’t match a defined
* label set.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.amp.Workspace("example", {});
* const exampleWorkspaceConfiguration = new aws.amp.WorkspaceConfiguration("example", {
* workspaceId: example.id,
* limitsPerLabelSets: [{
* labelSet: {},
* limits: {
* maxSeries: 50000,
* },
* }],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import AMP (Managed Prometheus) Workspace Configuration using the `workspace_id`. For example
*
* ```sh
* $ pulumi import aws:amp/workspaceConfiguration:WorkspaceConfiguration example ws-12345678-abcd-1234-abcd-123456789012
* ```
*/
class WorkspaceConfiguration extends pulumi.CustomResource {
/**
* Get an existing WorkspaceConfiguration 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 WorkspaceConfiguration(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of WorkspaceConfiguration. 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'] === WorkspaceConfiguration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["limitsPerLabelSets"] = state?.limitsPerLabelSets;
resourceInputs["region"] = state?.region;
resourceInputs["retentionPeriodInDays"] = state?.retentionPeriodInDays;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["workspaceId"] = state?.workspaceId;
}
else {
const args = argsOrState;
if (args?.workspaceId === undefined && !opts.urn) {
throw new Error("Missing required property 'workspaceId'");
}
resourceInputs["limitsPerLabelSets"] = args?.limitsPerLabelSets;
resourceInputs["region"] = args?.region;
resourceInputs["retentionPeriodInDays"] = args?.retentionPeriodInDays;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["workspaceId"] = args?.workspaceId;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(WorkspaceConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.WorkspaceConfiguration = WorkspaceConfiguration;
/** @internal */
WorkspaceConfiguration.__pulumiType = 'aws:amp/workspaceConfiguration:WorkspaceConfiguration';
//# sourceMappingURL=workspaceConfiguration.js.map
;