UNPKG

@maienm/pulumi-readarr

Version:

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

104 lines 4.68 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.Newznab = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Indexers -->Indexer Newznab resource. * For more information refer to [Indexer](https://wiki.servarr.com/readarr/settings#indexers) and [Newznab](https://wiki.servarr.com/readarr/supported#newznab). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as readarr from "@maienm/pulumi-readarr"; * * const example = new readarr.indexers.Newznab("example", { * apiPath: "/api", * baseUrl: "https://lolo.sickbeard.com", * categories: [ * 8000, * 5000, * ], * enableAutomaticSearch: true, * tags: [ * 1, * 2, * ], * }); * ``` * * ## Import * * import using the API/UI ID * * ```sh * $ pulumi import readarr:Indexers/newznab:Newznab example 1 * ``` */ class Newznab extends pulumi.CustomResource { /** * Get an existing Newznab 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 Newznab(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Newznab. 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'] === Newznab.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["additionalParameters"] = state ? state.additionalParameters : undefined; resourceInputs["apiKey"] = state ? state.apiKey : undefined; resourceInputs["apiPath"] = state ? state.apiPath : undefined; resourceInputs["baseUrl"] = state ? state.baseUrl : undefined; resourceInputs["categories"] = state ? state.categories : undefined; resourceInputs["earlyReleaseLimit"] = state ? state.earlyReleaseLimit : undefined; resourceInputs["enableAutomaticSearch"] = state ? state.enableAutomaticSearch : undefined; resourceInputs["enableInteractiveSearch"] = state ? state.enableInteractiveSearch : undefined; resourceInputs["enableRss"] = state ? state.enableRss : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["priority"] = state ? state.priority : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; resourceInputs["additionalParameters"] = args ? args.additionalParameters : undefined; resourceInputs["apiKey"] = args ? args.apiKey : undefined; resourceInputs["apiPath"] = args ? args.apiPath : undefined; resourceInputs["baseUrl"] = args ? args.baseUrl : undefined; resourceInputs["categories"] = args ? args.categories : undefined; resourceInputs["earlyReleaseLimit"] = args ? args.earlyReleaseLimit : undefined; resourceInputs["enableAutomaticSearch"] = args ? args.enableAutomaticSearch : undefined; resourceInputs["enableInteractiveSearch"] = args ? args.enableInteractiveSearch : undefined; resourceInputs["enableRss"] = args ? args.enableRss : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["priority"] = args ? args.priority : undefined; resourceInputs["tags"] = args ? args.tags : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Newznab.__pulumiType, name, resourceInputs, opts); } } exports.Newznab = Newznab; /** @internal */ Newznab.__pulumiType = 'readarr:Indexers/newznab:Newznab'; //# sourceMappingURL=newznab.js.map