UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

164 lines (163 loc) 4.83 kB
import * as pulumi from "@pulumi/pulumi"; /** * 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 * ``` */ export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: RuleFileState, opts?: pulumi.CustomResourceOptions): RuleFile; /** * 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: any): obj is RuleFile; /** * The content of the rule file. */ readonly content: pulumi.Output<string>; /** * The create time of workspace. */ readonly createTime: pulumi.Output<string>; /** * The description of the rule file. */ readonly description: pulumi.Output<string | undefined>; /** * The last update time of rule file. */ readonly lastUpdateTime: pulumi.Output<string>; /** * The name of the rule file. */ readonly name: pulumi.Output<string>; /** * The rule count number of rule file. */ readonly ruleCount: pulumi.Output<number>; /** * The id of rule file. */ readonly ruleFileId: pulumi.Output<string>; /** * The status of workspace. */ readonly status: pulumi.Output<string>; /** * The id of the workspace. */ readonly workspaceId: pulumi.Output<string>; /** * Create a RuleFile resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RuleFileArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RuleFile resources. */ export interface RuleFileState { /** * The content of the rule file. */ content?: pulumi.Input<string>; /** * The create time of workspace. */ createTime?: pulumi.Input<string>; /** * The description of the rule file. */ description?: pulumi.Input<string>; /** * The last update time of rule file. */ lastUpdateTime?: pulumi.Input<string>; /** * The name of the rule file. */ name?: pulumi.Input<string>; /** * The rule count number of rule file. */ ruleCount?: pulumi.Input<number>; /** * The id of rule file. */ ruleFileId?: pulumi.Input<string>; /** * The status of workspace. */ status?: pulumi.Input<string>; /** * The id of the workspace. */ workspaceId?: pulumi.Input<string>; } /** * The set of arguments for constructing a RuleFile resource. */ export interface RuleFileArgs { /** * The content of the rule file. */ content: pulumi.Input<string>; /** * The description of the rule file. */ description?: pulumi.Input<string>; /** * The name of the rule file. */ name?: pulumi.Input<string>; /** * The id of the workspace. */ workspaceId: pulumi.Input<string>; }