"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.RuleFile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage vmp rule file
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooWorkspace = new volcengine.vmp.Workspace("fooWorkspace", {
 *     instanceTypeId: "vmp.standard.15d",
 *     deleteProtectionEnabled: false,
 *     description: "acc-test-1",
 *     username: "admin123",
 *     password: "**********",
 * });
 * const fooRuleFile = new volcengine.vmp.RuleFile("fooRuleFile", {
 *     workspaceId: fooWorkspace.id,
 *     description: "acc-test-1",
 *     content: `groups:
 *     - interval: 10s
 *       name: recording_rules
 *       rules:
 *         - expr: sum(irate(container_cpu_usage_seconds_total{image!=""}[5m])) by (pod) *100
 *           labels:
 *             team: operations
 *           record: pod:cpu:useage
 * `,
 * });
 * ```
 *
 * ## Import
 *
 * VMP Rule File can be imported using the workspace_id:rule_file_id, e.g.
 * (We can only get rule file by WorkspaceId and RuleFileId)
 *
 * ```sh
 * $ pulumi import volcengine:vmp/ruleFile:RuleFile default 60dde3ca-951c-4c05-8777-e5a7caa07ad6:d6f72bd9-674e-4651-b98c-3797657d9614
 * ```
 */
class RuleFile extends pulumi.CustomResource {
    /**
     * Get an existing RuleFile 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 RuleFile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of RuleFile.  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'] === RuleFile.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["content"] = state ? state.content : undefined;
            resourceInputs["createTime"] = state ? state.createTime : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["lastUpdateTime"] = state ? state.lastUpdateTime : undefined;
            resourceInputs["name"] = state ? state.name : undefined;
            resourceInputs["ruleCount"] = state ? state.ruleCount : undefined;
            resourceInputs["ruleFileId"] = state ? state.ruleFileId : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["workspaceId"] = state ? state.workspaceId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.content === undefined) && !opts.urn) {
                throw new Error("Missing required property 'content'");
            }
            if ((!args || args.workspaceId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'workspaceId'");
            }
            resourceInputs["content"] = args ? args.content : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["name"] = args ? args.name : undefined;
            resourceInputs["workspaceId"] = args ? args.workspaceId : undefined;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["lastUpdateTime"] = undefined /*out*/;
            resourceInputs["ruleCount"] = undefined /*out*/;
            resourceInputs["ruleFileId"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RuleFile.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RuleFile = RuleFile;
/** @internal */
RuleFile.__pulumiType = 'volcengine:vmp/ruleFile:RuleFile';
//# sourceMappingURL=ruleFile.js.map