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