UNPKG

@maienm/pulumi-readarr

Version:

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

269 lines 17.5 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.Notification = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Notifications -->Notification resource. * For more information refer to [Notification](https://wiki.servarr.com/readarr/settings#connect). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as readarr from "@maienm/pulumi-readarr"; * * const example = new readarr.notifications.Notification("example", { * configContract: "CustomScriptSettings", * implementation: "CustomScript", * includeHealthWarnings: false, * onAuthorDelete: false, * onBookDelete: false, * onBookFileDelete: false, * onBookFileDeleteForUpgrade: true, * onBookRetag: false, * onDownloadFailure: true, * onGrab: false, * onHealthIssue: false, * onImportFailure: false, * onReleaseImport: false, * onRename: false, * onUpgrade: false, * path: "/scripts/readarr.sh", * }); * ``` * * ## Import * * import using the API/UI ID * * ```sh * $ pulumi import readarr:Notifications/notification:Notification example 1 * ``` */ class Notification extends pulumi.CustomResource { /** * Get an existing Notification 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 Notification(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Notification. 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'] === Notification.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessToken"] = state ? state.accessToken : undefined; resourceInputs["accessTokenSecret"] = state ? state.accessTokenSecret : undefined; resourceInputs["addIds"] = state ? state.addIds : undefined; resourceInputs["apiKey"] = state ? state.apiKey : undefined; resourceInputs["appToken"] = state ? state.appToken : undefined; resourceInputs["arguments"] = state ? state.arguments : undefined; resourceInputs["attachFiles"] = state ? state.attachFiles : undefined; resourceInputs["authUser"] = state ? state.authUser : undefined; resourceInputs["author"] = state ? state.author : undefined; resourceInputs["avatar"] = state ? state.avatar : undefined; resourceInputs["bccs"] = state ? state.bccs : undefined; resourceInputs["botToken"] = state ? state.botToken : undefined; resourceInputs["ccs"] = state ? state.ccs : undefined; resourceInputs["channel"] = state ? state.channel : undefined; resourceInputs["channelTags"] = state ? state.channelTags : undefined; resourceInputs["chatId"] = state ? state.chatId : undefined; resourceInputs["clickUrl"] = state ? state.clickUrl : undefined; resourceInputs["condition"] = state ? state.condition : undefined; resourceInputs["configContract"] = state ? state.configContract : undefined; resourceInputs["consumerKey"] = state ? state.consumerKey : undefined; resourceInputs["consumerSecret"] = state ? state.consumerSecret : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["deviceIds"] = state ? state.deviceIds : undefined; resourceInputs["deviceNames"] = state ? state.deviceNames : undefined; resourceInputs["devices"] = state ? state.devices : undefined; resourceInputs["directMessage"] = state ? state.directMessage : undefined; resourceInputs["event"] = state ? state.event : undefined; resourceInputs["expire"] = state ? state.expire : undefined; resourceInputs["fieldTags"] = state ? state.fieldTags : undefined; resourceInputs["from"] = state ? state.from : undefined; resourceInputs["grabFields"] = state ? state.grabFields : undefined; resourceInputs["host"] = state ? state.host : undefined; resourceInputs["icon"] = state ? state.icon : undefined; resourceInputs["implementation"] = state ? state.implementation : undefined; resourceInputs["importFields"] = state ? state.importFields : undefined; resourceInputs["includeHealthWarnings"] = state ? state.includeHealthWarnings : undefined; resourceInputs["instanceName"] = state ? state.instanceName : undefined; resourceInputs["key"] = state ? state.key : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["mapFrom"] = state ? state.mapFrom : undefined; resourceInputs["mapTo"] = state ? state.mapTo : undefined; resourceInputs["mention"] = state ? state.mention : undefined; resourceInputs["method"] = state ? state.method : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["notify"] = state ? state.notify : undefined; resourceInputs["onApplicationUpdate"] = state ? state.onApplicationUpdate : undefined; resourceInputs["onAuthorDelete"] = state ? state.onAuthorDelete : undefined; resourceInputs["onBookDelete"] = state ? state.onBookDelete : undefined; resourceInputs["onBookFileDelete"] = state ? state.onBookFileDelete : undefined; resourceInputs["onBookFileDeleteForUpgrade"] = state ? state.onBookFileDeleteForUpgrade : undefined; resourceInputs["onBookRetag"] = state ? state.onBookRetag : undefined; resourceInputs["onDownloadFailure"] = state ? state.onDownloadFailure : undefined; resourceInputs["onGrab"] = state ? state.onGrab : undefined; resourceInputs["onHealthIssue"] = state ? state.onHealthIssue : undefined; resourceInputs["onImportFailure"] = state ? state.onImportFailure : undefined; resourceInputs["onReleaseImport"] = state ? state.onReleaseImport : undefined; resourceInputs["onRename"] = state ? state.onRename : undefined; resourceInputs["onUpgrade"] = state ? state.onUpgrade : undefined; resourceInputs["password"] = state ? state.password : undefined; resourceInputs["path"] = state ? state.path : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["priority"] = state ? state.priority : undefined; resourceInputs["recipients"] = state ? state.recipients : undefined; resourceInputs["refreshToken"] = state ? state.refreshToken : undefined; resourceInputs["removeIds"] = state ? state.removeIds : undefined; resourceInputs["requestTokenSecret"] = state ? state.requestTokenSecret : undefined; resourceInputs["requireEncryption"] = state ? state.requireEncryption : undefined; resourceInputs["retry"] = state ? state.retry : undefined; resourceInputs["sendSilently"] = state ? state.sendSilently : undefined; resourceInputs["senderDomain"] = state ? state.senderDomain : undefined; resourceInputs["senderId"] = state ? state.senderId : undefined; resourceInputs["server"] = state ? state.server : undefined; resourceInputs["serverUrl"] = state ? state.serverUrl : undefined; resourceInputs["signIn"] = state ? state.signIn : undefined; resourceInputs["sound"] = state ? state.sound : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["token"] = state ? state.token : undefined; resourceInputs["topics"] = state ? state.topics : undefined; resourceInputs["tos"] = state ? state.tos : undefined; resourceInputs["updateLibrary"] = state ? state.updateLibrary : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["urlBase"] = state ? state.urlBase : undefined; resourceInputs["useEuEndpoint"] = state ? state.useEuEndpoint : undefined; resourceInputs["useSsl"] = state ? state.useSsl : undefined; resourceInputs["userId"] = state ? state.userId : undefined; resourceInputs["userKey"] = state ? state.userKey : undefined; resourceInputs["username"] = state ? state.username : undefined; resourceInputs["webHookUrl"] = state ? state.webHookUrl : undefined; } else { const args = argsOrState; if ((!args || args.configContract === undefined) && !opts.urn) { throw new Error("Missing required property 'configContract'"); } if ((!args || args.implementation === undefined) && !opts.urn) { throw new Error("Missing required property 'implementation'"); } resourceInputs["accessToken"] = args ? args.accessToken : undefined; resourceInputs["accessTokenSecret"] = args ? args.accessTokenSecret : undefined; resourceInputs["addIds"] = args ? args.addIds : undefined; resourceInputs["apiKey"] = args ? args.apiKey : undefined; resourceInputs["appToken"] = args ? args.appToken : undefined; resourceInputs["arguments"] = args ? args.arguments : undefined; resourceInputs["attachFiles"] = args ? args.attachFiles : undefined; resourceInputs["authUser"] = args ? args.authUser : undefined; resourceInputs["author"] = args ? args.author : undefined; resourceInputs["avatar"] = args ? args.avatar : undefined; resourceInputs["bccs"] = args ? args.bccs : undefined; resourceInputs["botToken"] = args ? args.botToken : undefined; resourceInputs["ccs"] = args ? args.ccs : undefined; resourceInputs["channel"] = args ? args.channel : undefined; resourceInputs["channelTags"] = args ? args.channelTags : undefined; resourceInputs["chatId"] = args ? args.chatId : undefined; resourceInputs["clickUrl"] = args ? args.clickUrl : undefined; resourceInputs["condition"] = args ? args.condition : undefined; resourceInputs["configContract"] = args ? args.configContract : undefined; resourceInputs["consumerKey"] = args ? args.consumerKey : undefined; resourceInputs["consumerSecret"] = args ? args.consumerSecret : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["deviceIds"] = args ? args.deviceIds : undefined; resourceInputs["deviceNames"] = args ? args.deviceNames : undefined; resourceInputs["devices"] = args ? args.devices : undefined; resourceInputs["directMessage"] = args ? args.directMessage : undefined; resourceInputs["event"] = args ? args.event : undefined; resourceInputs["expire"] = args ? args.expire : undefined; resourceInputs["fieldTags"] = args ? args.fieldTags : undefined; resourceInputs["from"] = args ? args.from : undefined; resourceInputs["grabFields"] = args ? args.grabFields : undefined; resourceInputs["host"] = args ? args.host : undefined; resourceInputs["icon"] = args ? args.icon : undefined; resourceInputs["implementation"] = args ? args.implementation : undefined; resourceInputs["importFields"] = args ? args.importFields : undefined; resourceInputs["includeHealthWarnings"] = args ? args.includeHealthWarnings : undefined; resourceInputs["instanceName"] = args ? args.instanceName : undefined; resourceInputs["key"] = args ? args.key : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["mapFrom"] = args ? args.mapFrom : undefined; resourceInputs["mapTo"] = args ? args.mapTo : undefined; resourceInputs["mention"] = args ? args.mention : undefined; resourceInputs["method"] = args ? args.method : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["notify"] = args ? args.notify : undefined; resourceInputs["onApplicationUpdate"] = args ? args.onApplicationUpdate : undefined; resourceInputs["onAuthorDelete"] = args ? args.onAuthorDelete : undefined; resourceInputs["onBookDelete"] = args ? args.onBookDelete : undefined; resourceInputs["onBookFileDelete"] = args ? args.onBookFileDelete : undefined; resourceInputs["onBookFileDeleteForUpgrade"] = args ? args.onBookFileDeleteForUpgrade : undefined; resourceInputs["onBookRetag"] = args ? args.onBookRetag : undefined; resourceInputs["onDownloadFailure"] = args ? args.onDownloadFailure : undefined; resourceInputs["onGrab"] = args ? args.onGrab : undefined; resourceInputs["onHealthIssue"] = args ? args.onHealthIssue : undefined; resourceInputs["onImportFailure"] = args ? args.onImportFailure : undefined; resourceInputs["onReleaseImport"] = args ? args.onReleaseImport : undefined; resourceInputs["onRename"] = args ? args.onRename : undefined; resourceInputs["onUpgrade"] = args ? args.onUpgrade : undefined; resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined; resourceInputs["path"] = args ? args.path : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["priority"] = args ? args.priority : undefined; resourceInputs["recipients"] = args ? args.recipients : undefined; resourceInputs["refreshToken"] = args ? args.refreshToken : undefined; resourceInputs["removeIds"] = args ? args.removeIds : undefined; resourceInputs["requestTokenSecret"] = (args === null || args === void 0 ? void 0 : args.requestTokenSecret) ? pulumi.secret(args.requestTokenSecret) : undefined; resourceInputs["requireEncryption"] = args ? args.requireEncryption : undefined; resourceInputs["retry"] = args ? args.retry : undefined; resourceInputs["sendSilently"] = args ? args.sendSilently : undefined; resourceInputs["senderDomain"] = args ? args.senderDomain : undefined; resourceInputs["senderId"] = args ? args.senderId : undefined; resourceInputs["server"] = args ? args.server : undefined; resourceInputs["serverUrl"] = args ? args.serverUrl : undefined; resourceInputs["signIn"] = args ? args.signIn : undefined; resourceInputs["sound"] = args ? args.sound : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["token"] = (args === null || args === void 0 ? void 0 : args.token) ? pulumi.secret(args.token) : undefined; resourceInputs["topics"] = args ? args.topics : undefined; resourceInputs["tos"] = args ? args.tos : undefined; resourceInputs["updateLibrary"] = args ? args.updateLibrary : undefined; resourceInputs["url"] = args ? args.url : undefined; resourceInputs["urlBase"] = args ? args.urlBase : undefined; resourceInputs["useEuEndpoint"] = args ? args.useEuEndpoint : undefined; resourceInputs["useSsl"] = args ? args.useSsl : undefined; resourceInputs["userId"] = args ? args.userId : undefined; resourceInputs["userKey"] = args ? args.userKey : undefined; resourceInputs["username"] = args ? args.username : undefined; resourceInputs["webHookUrl"] = args ? args.webHookUrl : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password", "requestTokenSecret", "token"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Notification.__pulumiType, name, resourceInputs, opts); } } exports.Notification = Notification; /** @internal */ Notification.__pulumiType = 'readarr:Notifications/notification:Notification'; //# sourceMappingURL=notification.js.map