@maienm/pulumi-readarr
Version:
A Pulumi package for creating and managing Readarr resources. Based on terraform-provider-readarr: version v2.1.0
102 lines • 4.91 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.Nyaa = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* <!-- subcategory:Indexers -->Indexer Nyaa resource.
* For more information refer to [Indexer](https://wiki.servarr.com/readarr/settings#indexers) and [Nyaa](https://wiki.servarr.com/readarr/supported#nyaa).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as readarr from "@maienm/pulumi-readarr";
*
* const example = new readarr.indexers.Nyaa("example", {
* additionalParameters: "&cats=1_0&filter=1",
* baseUrl: "https://nyaa.io",
* enableAutomaticSearch: true,
* minimumSeeders: 1,
* });
* ```
*
* ## Import
*
* import using the API/UI ID
*
* ```sh
* $ pulumi import readarr:Indexers/nyaa:Nyaa example 1
* ```
*/
class Nyaa extends pulumi.CustomResource {
/**
* Get an existing Nyaa 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 Nyaa(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Nyaa. 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'] === Nyaa.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["additionalParameters"] = state ? state.additionalParameters : undefined;
resourceInputs["authorSeedTime"] = state ? state.authorSeedTime : undefined;
resourceInputs["baseUrl"] = state ? state.baseUrl : 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["minimumSeeders"] = state ? state.minimumSeeders : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["priority"] = state ? state.priority : undefined;
resourceInputs["seedRatio"] = state ? state.seedRatio : undefined;
resourceInputs["seedTime"] = state ? state.seedTime : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
}
else {
const args = argsOrState;
if ((!args || args.baseUrl === undefined) && !opts.urn) {
throw new Error("Missing required property 'baseUrl'");
}
resourceInputs["additionalParameters"] = args ? args.additionalParameters : undefined;
resourceInputs["authorSeedTime"] = args ? args.authorSeedTime : undefined;
resourceInputs["baseUrl"] = args ? args.baseUrl : 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["minimumSeeders"] = args ? args.minimumSeeders : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["priority"] = args ? args.priority : undefined;
resourceInputs["seedRatio"] = args ? args.seedRatio : undefined;
resourceInputs["seedTime"] = args ? args.seedTime : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Nyaa.__pulumiType, name, resourceInputs, opts);
}
}
exports.Nyaa = Nyaa;
/** @internal */
Nyaa.__pulumiType = 'readarr:Indexers/nyaa:Nyaa';
//# sourceMappingURL=nyaa.js.map