UNPKG

@maienm/pulumi-readarr

Version:

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

81 lines 3.23 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.Exclusion = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Import Lists -->Import List Exclusion resource. * For more information refer to [ImportListExclusions](https://wiki.servarr.com/readarr/settings#list-exclusions) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as readarr from "@maienm/pulumi-readarr"; * * const example = new readarr.importlists.Exclusion("example", { * authorName: "Agatha Christie", * foreignId: "46a098f3-272d-4bec-9746-67e8ab48ed40", * }); * ``` * * ## Import * * import using the API/UI ID * * ```sh * $ pulumi import readarr:ImportLists/exclusion:Exclusion example 10 * ``` */ class Exclusion extends pulumi.CustomResource { /** * Get an existing Exclusion 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 Exclusion(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Exclusion. 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'] === Exclusion.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authorName"] = state ? state.authorName : undefined; resourceInputs["foreignId"] = state ? state.foreignId : undefined; } else { const args = argsOrState; if ((!args || args.authorName === undefined) && !opts.urn) { throw new Error("Missing required property 'authorName'"); } if ((!args || args.foreignId === undefined) && !opts.urn) { throw new Error("Missing required property 'foreignId'"); } resourceInputs["authorName"] = args ? args.authorName : undefined; resourceInputs["foreignId"] = args ? args.foreignId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Exclusion.__pulumiType, name, resourceInputs, opts); } } exports.Exclusion = Exclusion; /** @internal */ Exclusion.__pulumiType = 'readarr:ImportLists/exclusion:Exclusion'; //# sourceMappingURL=exclusion.js.map