UNPKG

@maienm/pulumi-readarr

Version:

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

177 lines 9.69 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.MediaManagement = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Media Management -->Media Management resource. * For more information refer to [Naming](https://wiki.servarr.com/readarr/settings#file-management) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as readarr from "@maienm/pulumi-readarr"; * * const example = new readarr.mediamanagement.MediaManagement("example", { * allowFingerprinting: "never", * chmodFolder: "755", * chownGroup: "arrs", * createEmptyAuthorFolders: true, * deleteEmptyFolders: true, * downloadPropersRepacks: "preferAndUpgrade", * extraFileExtensions: "info", * fileDate: "bookReleaseDate", * hardlinksCopy: true, * importExtraFiles: true, * minimumFreeSpace: 100, * recycleBinDays: 7, * recycleBinPath: "/bin", * rescanAfterRefresh: "always", * setPermissions: true, * skipFreeSpaceCheck: true, * unmonitorPreviousBooks: false, * watchIbraryForChanges: true, * }); * ``` * * ## Import * * import does not need parameters * * ```sh * $ pulumi import readarr:MediaManagement/mediaManagement:MediaManagement example "" * ``` */ class MediaManagement extends pulumi.CustomResource { /** * Get an existing MediaManagement 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 MediaManagement(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MediaManagement. 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'] === MediaManagement.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowFingerprinting"] = state ? state.allowFingerprinting : undefined; resourceInputs["chmodFolder"] = state ? state.chmodFolder : undefined; resourceInputs["chownGroup"] = state ? state.chownGroup : undefined; resourceInputs["createEmptyAuthorFolders"] = state ? state.createEmptyAuthorFolders : undefined; resourceInputs["deleteEmptyFolders"] = state ? state.deleteEmptyFolders : undefined; resourceInputs["downloadPropersRepacks"] = state ? state.downloadPropersRepacks : undefined; resourceInputs["extraFileExtensions"] = state ? state.extraFileExtensions : undefined; resourceInputs["fileDate"] = state ? state.fileDate : undefined; resourceInputs["hardlinksCopy"] = state ? state.hardlinksCopy : undefined; resourceInputs["importExtraFiles"] = state ? state.importExtraFiles : undefined; resourceInputs["minimumFreeSpace"] = state ? state.minimumFreeSpace : undefined; resourceInputs["recycleBinDays"] = state ? state.recycleBinDays : undefined; resourceInputs["recycleBinPath"] = state ? state.recycleBinPath : undefined; resourceInputs["rescanAfterRefresh"] = state ? state.rescanAfterRefresh : undefined; resourceInputs["setPermissions"] = state ? state.setPermissions : undefined; resourceInputs["skipFreeSpaceCheck"] = state ? state.skipFreeSpaceCheck : undefined; resourceInputs["unmonitorPreviousBooks"] = state ? state.unmonitorPreviousBooks : undefined; resourceInputs["watchIbraryForChanges"] = state ? state.watchIbraryForChanges : undefined; } else { const args = argsOrState; if ((!args || args.allowFingerprinting === undefined) && !opts.urn) { throw new Error("Missing required property 'allowFingerprinting'"); } if ((!args || args.chmodFolder === undefined) && !opts.urn) { throw new Error("Missing required property 'chmodFolder'"); } if ((!args || args.chownGroup === undefined) && !opts.urn) { throw new Error("Missing required property 'chownGroup'"); } if ((!args || args.createEmptyAuthorFolders === undefined) && !opts.urn) { throw new Error("Missing required property 'createEmptyAuthorFolders'"); } if ((!args || args.deleteEmptyFolders === undefined) && !opts.urn) { throw new Error("Missing required property 'deleteEmptyFolders'"); } if ((!args || args.downloadPropersRepacks === undefined) && !opts.urn) { throw new Error("Missing required property 'downloadPropersRepacks'"); } if ((!args || args.extraFileExtensions === undefined) && !opts.urn) { throw new Error("Missing required property 'extraFileExtensions'"); } if ((!args || args.fileDate === undefined) && !opts.urn) { throw new Error("Missing required property 'fileDate'"); } if ((!args || args.hardlinksCopy === undefined) && !opts.urn) { throw new Error("Missing required property 'hardlinksCopy'"); } if ((!args || args.importExtraFiles === undefined) && !opts.urn) { throw new Error("Missing required property 'importExtraFiles'"); } if ((!args || args.minimumFreeSpace === undefined) && !opts.urn) { throw new Error("Missing required property 'minimumFreeSpace'"); } if ((!args || args.recycleBinDays === undefined) && !opts.urn) { throw new Error("Missing required property 'recycleBinDays'"); } if ((!args || args.recycleBinPath === undefined) && !opts.urn) { throw new Error("Missing required property 'recycleBinPath'"); } if ((!args || args.rescanAfterRefresh === undefined) && !opts.urn) { throw new Error("Missing required property 'rescanAfterRefresh'"); } if ((!args || args.setPermissions === undefined) && !opts.urn) { throw new Error("Missing required property 'setPermissions'"); } if ((!args || args.skipFreeSpaceCheck === undefined) && !opts.urn) { throw new Error("Missing required property 'skipFreeSpaceCheck'"); } if ((!args || args.unmonitorPreviousBooks === undefined) && !opts.urn) { throw new Error("Missing required property 'unmonitorPreviousBooks'"); } if ((!args || args.watchIbraryForChanges === undefined) && !opts.urn) { throw new Error("Missing required property 'watchIbraryForChanges'"); } resourceInputs["allowFingerprinting"] = args ? args.allowFingerprinting : undefined; resourceInputs["chmodFolder"] = args ? args.chmodFolder : undefined; resourceInputs["chownGroup"] = args ? args.chownGroup : undefined; resourceInputs["createEmptyAuthorFolders"] = args ? args.createEmptyAuthorFolders : undefined; resourceInputs["deleteEmptyFolders"] = args ? args.deleteEmptyFolders : undefined; resourceInputs["downloadPropersRepacks"] = args ? args.downloadPropersRepacks : undefined; resourceInputs["extraFileExtensions"] = args ? args.extraFileExtensions : undefined; resourceInputs["fileDate"] = args ? args.fileDate : undefined; resourceInputs["hardlinksCopy"] = args ? args.hardlinksCopy : undefined; resourceInputs["importExtraFiles"] = args ? args.importExtraFiles : undefined; resourceInputs["minimumFreeSpace"] = args ? args.minimumFreeSpace : undefined; resourceInputs["recycleBinDays"] = args ? args.recycleBinDays : undefined; resourceInputs["recycleBinPath"] = args ? args.recycleBinPath : undefined; resourceInputs["rescanAfterRefresh"] = args ? args.rescanAfterRefresh : undefined; resourceInputs["setPermissions"] = args ? args.setPermissions : undefined; resourceInputs["skipFreeSpaceCheck"] = args ? args.skipFreeSpaceCheck : undefined; resourceInputs["unmonitorPreviousBooks"] = args ? args.unmonitorPreviousBooks : undefined; resourceInputs["watchIbraryForChanges"] = args ? args.watchIbraryForChanges : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MediaManagement.__pulumiType, name, resourceInputs, opts); } } exports.MediaManagement = MediaManagement; /** @internal */ MediaManagement.__pulumiType = 'readarr:MediaManagement/mediaManagement:MediaManagement'; //# sourceMappingURL=mediaManagement.js.map