UNPKG

@maienm/pulumi-readarr

Version:

A Pulumi package for creating and managing Readarr resources. Based on terraform-provider-readarr: version v2.1.0

95 lines 3.99 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.DelayProfile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Profiles -->Delay Profile resource. * For more information refer to [Delay Profiles](https://wiki.servarr.com/readarr/settings#delay-profiles) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as readarr from "@maienm/pulumi-readarr"; * * const example = new readarr.profiles.DelayProfile("example", { * enableTorrent: true, * enableUsenet: true, * preferredProtocol: "torrent", * tags: [ * 1, * 2, * ], * torrentDelay: 0, * usenetDelay: 0, * }); * ``` * * ## Import * * import using the API/UI ID * * ```sh * $ pulumi import readarr:Profiles/delayProfile:DelayProfile example 10 * ``` */ class DelayProfile extends pulumi.CustomResource { /** * Get an existing DelayProfile 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 DelayProfile(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DelayProfile. 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'] === DelayProfile.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["enableTorrent"] = state ? state.enableTorrent : undefined; resourceInputs["enableUsenet"] = state ? state.enableUsenet : undefined; resourceInputs["order"] = state ? state.order : undefined; resourceInputs["preferredProtocol"] = state ? state.preferredProtocol : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["torrentDelay"] = state ? state.torrentDelay : undefined; resourceInputs["usenetDelay"] = state ? state.usenetDelay : undefined; } else { const args = argsOrState; if ((!args || args.tags === undefined) && !opts.urn) { throw new Error("Missing required property 'tags'"); } resourceInputs["enableTorrent"] = args ? args.enableTorrent : undefined; resourceInputs["enableUsenet"] = args ? args.enableUsenet : undefined; resourceInputs["order"] = args ? args.order : undefined; resourceInputs["preferredProtocol"] = args ? args.preferredProtocol : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["torrentDelay"] = args ? args.torrentDelay : undefined; resourceInputs["usenetDelay"] = args ? args.usenetDelay : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DelayProfile.__pulumiType, name, resourceInputs, opts); } } exports.DelayProfile = DelayProfile; /** @internal */ DelayProfile.__pulumiType = 'readarr:Profiles/delayProfile:DelayProfile'; //# sourceMappingURL=delayProfile.js.map