@maienm/pulumi-lidarr
Version:
A Pulumi package for creating and managing Lidarr resources. Based on terraform-provider-lidarr: version v1.11.0
106 lines • 4.81 kB
JavaScript
;
// *** 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.RootFolder = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* <!-- subcategory:Media Management -->Root Folder resource.
* For more information refer to [Root Folders](https://wiki.servarr.com/lidarr/settings#root-folders) documentation.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as lidarr from "@maienm/pulumi-lidarr";
*
* const example = new lidarr.mediamanagement.RootFolder("example", {
* metadataProfileId: 1,
* monitorOption: "future",
* newItemMonitorOption: "all",
* path: "/music",
* qualityProfileId: 1,
* tags: [1],
* });
* ```
*
* ## Import
*
* import using the API/UI ID
*
* ```sh
* $ pulumi import lidarr:MediaManagement/rootFolder:RootFolder example 10
* ```
*/
class RootFolder extends pulumi.CustomResource {
/**
* Get an existing RootFolder 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 RootFolder(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of RootFolder. 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'] === RootFolder.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessible"] = state ? state.accessible : undefined;
resourceInputs["metadataProfileId"] = state ? state.metadataProfileId : undefined;
resourceInputs["monitorOption"] = state ? state.monitorOption : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["newItemMonitorOption"] = state ? state.newItemMonitorOption : undefined;
resourceInputs["path"] = state ? state.path : undefined;
resourceInputs["qualityProfileId"] = state ? state.qualityProfileId : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
}
else {
const args = argsOrState;
if ((!args || args.metadataProfileId === undefined) && !opts.urn) {
throw new Error("Missing required property 'metadataProfileId'");
}
if ((!args || args.monitorOption === undefined) && !opts.urn) {
throw new Error("Missing required property 'monitorOption'");
}
if ((!args || args.newItemMonitorOption === undefined) && !opts.urn) {
throw new Error("Missing required property 'newItemMonitorOption'");
}
if ((!args || args.path === undefined) && !opts.urn) {
throw new Error("Missing required property 'path'");
}
if ((!args || args.qualityProfileId === undefined) && !opts.urn) {
throw new Error("Missing required property 'qualityProfileId'");
}
resourceInputs["metadataProfileId"] = args ? args.metadataProfileId : undefined;
resourceInputs["monitorOption"] = args ? args.monitorOption : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["newItemMonitorOption"] = args ? args.newItemMonitorOption : undefined;
resourceInputs["path"] = args ? args.path : undefined;
resourceInputs["qualityProfileId"] = args ? args.qualityProfileId : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["accessible"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RootFolder.__pulumiType, name, resourceInputs, opts);
}
}
exports.RootFolder = RootFolder;
/** @internal */
RootFolder.__pulumiType = 'lidarr:MediaManagement/rootFolder:RootFolder';
//# sourceMappingURL=rootFolder.js.map