UNPKG

@pulumi/wavefront

Version:

A Pulumi package for creating and managing wavefront cloud resources.

121 lines (120 loc) 4.34 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Wavefront Metrics Policy Resource. This allows management of Metrics Policy to control access to time series, histograms, and delta counters * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as wavefront from "@pulumi/wavefront"; * * const everyone = wavefront.getDefaultUserGroup({}); * const main = new wavefront.MetricsPolicy("main", {policyRules: [{ * name: "Allow All Metrics", * description: "Predefined policy rule. Allows access to all metrics (timeseries, histograms, and counters) for all accounts. If this rule is removed, all accounts can access all metrics if there are no matching blocking rules.", * prefixes: ["*"], * tagsAnded: false, * accessType: "ALLOW", * userGroupIds: [everyone.then(everyone => everyone.groupId)], * }]}); * ``` * * ## Data Source * * Provides a Wavefront Metrics Policy Data Source. This allows looking up the current policy and associated rules. * * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as wavefront from "@pulumi/wavefront"; * * export = async () => { * const policy = await wavefront.getMetricsPolicy({}); * return { * policy: policy, * }; * } * ``` * * ## Import * * Users can be imported by using the `updated_epoch_millis`, e.g.: * * ```sh * $ pulumi import wavefront:index/metricsPolicy:MetricsPolicy some_metrics_policy 1651846476678 * ``` */ export declare class MetricsPolicy extends pulumi.CustomResource { /** * Get an existing MetricsPolicy 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?: MetricsPolicyState, opts?: pulumi.CustomResourceOptions): MetricsPolicy; /** * Returns true if the given object is an instance of MetricsPolicy. 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 MetricsPolicy; /** * The customer the user is associated with. */ readonly customer: pulumi.Output<string>; /** * List of Metrics Policies, must have at least one entry. */ readonly policyRules: pulumi.Output<outputs.MetricsPolicyPolicyRule[]>; /** * When the policy was applied in epoch_millis. */ readonly updatedEpochMillis: pulumi.Output<number>; /** * The accountId who applied the current policy. */ readonly updaterId: pulumi.Output<string>; /** * Create a MetricsPolicy 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: MetricsPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MetricsPolicy resources. */ export interface MetricsPolicyState { /** * The customer the user is associated with. */ customer?: pulumi.Input<string>; /** * List of Metrics Policies, must have at least one entry. */ policyRules?: pulumi.Input<pulumi.Input<inputs.MetricsPolicyPolicyRule>[]>; /** * When the policy was applied in epoch_millis. */ updatedEpochMillis?: pulumi.Input<number>; /** * The accountId who applied the current policy. */ updaterId?: pulumi.Input<string>; } /** * The set of arguments for constructing a MetricsPolicy resource. */ export interface MetricsPolicyArgs { /** * List of Metrics Policies, must have at least one entry. */ policyRules: pulumi.Input<pulumi.Input<inputs.MetricsPolicyPolicyRule>[]>; }