UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

107 lines 4.87 kB
"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.Partition = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a [Sumologic Partition](https://help.sumologic.com/docs/manage/partitions/data-tiers/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const examplePartition = new sumologic.Partition("examplePartition", { * name: "examplePartition", * routingExpression: "_sourcecategory=*/IAC", * analyticsTier: "continuous", * isCompliant: false, * isIncludedInDefaultSearch: true, * }); * ``` * * ## Attributes reference * * The following attributes are exported: * * - `id` - Unique identifier for the partition. * * ## Import * * Partitions can can be imported using the id. The list of partitions and their ids can be obtained using the Sumologic [partions api][2]. * * hcl * * ```sh * $ pulumi import sumologic:index/partition:Partition partition 1234567890 * ``` * * [1]: https://help.sumologic.com/docs/manage/partitions/data-tiers/ * * [2]: https://api.sumologic.com/docs/#operation/listPartitions */ class Partition extends pulumi.CustomResource { /** * Get an existing Partition 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 Partition(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Partition. 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'] === Partition.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["analyticsTier"] = state ? state.analyticsTier : undefined; resourceInputs["dataForwardingId"] = state ? state.dataForwardingId : undefined; resourceInputs["indexType"] = state ? state.indexType : undefined; resourceInputs["isActive"] = state ? state.isActive : undefined; resourceInputs["isCompliant"] = state ? state.isCompliant : undefined; resourceInputs["isIncludedInDefaultSearch"] = state ? state.isIncludedInDefaultSearch : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["reduceRetentionPeriodImmediately"] = state ? state.reduceRetentionPeriodImmediately : undefined; resourceInputs["retentionPeriod"] = state ? state.retentionPeriod : undefined; resourceInputs["routingExpression"] = state ? state.routingExpression : undefined; resourceInputs["totalBytes"] = state ? state.totalBytes : undefined; } else { const args = argsOrState; resourceInputs["analyticsTier"] = args ? args.analyticsTier : undefined; resourceInputs["isCompliant"] = args ? args.isCompliant : undefined; resourceInputs["isIncludedInDefaultSearch"] = args ? args.isIncludedInDefaultSearch : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["reduceRetentionPeriodImmediately"] = args ? args.reduceRetentionPeriodImmediately : undefined; resourceInputs["retentionPeriod"] = args ? args.retentionPeriod : undefined; resourceInputs["routingExpression"] = args ? args.routingExpression : undefined; resourceInputs["dataForwardingId"] = undefined /*out*/; resourceInputs["indexType"] = undefined /*out*/; resourceInputs["isActive"] = undefined /*out*/; resourceInputs["totalBytes"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Partition.__pulumiType, name, resourceInputs, opts); } } exports.Partition = Partition; /** @internal */ Partition.__pulumiType = 'sumologic:index/partition:Partition'; //# sourceMappingURL=partition.js.map