@maienm/pulumi-readarr
Version:
A Pulumi package for creating and managing Readarr resources. Based on terraform-provider-readarr: version v2.1.0
116 lines • 5.73 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.Host = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* <!-- subcategory:System -->Host resource.
* For more information refer to [Host](https://wiki.servarr.com/readarr/settings#general) documentation.
*
* ## Import
*
* import does not need parameters
*
* ```sh
* $ pulumi import readarr:System/host:Host example ""
* ```
*/
class Host extends pulumi.CustomResource {
/**
* Get an existing Host 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 Host(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Host. 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'] === Host.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applicationUrl"] = state ? state.applicationUrl : undefined;
resourceInputs["authentication"] = state ? state.authentication : undefined;
resourceInputs["backup"] = state ? state.backup : undefined;
resourceInputs["bindAddress"] = state ? state.bindAddress : undefined;
resourceInputs["instanceName"] = state ? state.instanceName : undefined;
resourceInputs["launchBrowser"] = state ? state.launchBrowser : undefined;
resourceInputs["logging"] = state ? state.logging : undefined;
resourceInputs["port"] = state ? state.port : undefined;
resourceInputs["proxy"] = state ? state.proxy : undefined;
resourceInputs["ssl"] = state ? state.ssl : undefined;
resourceInputs["update"] = state ? state.update : undefined;
resourceInputs["urlBase"] = state ? state.urlBase : undefined;
}
else {
const args = argsOrState;
if ((!args || args.applicationUrl === undefined) && !opts.urn) {
throw new Error("Missing required property 'applicationUrl'");
}
if ((!args || args.authentication === undefined) && !opts.urn) {
throw new Error("Missing required property 'authentication'");
}
if ((!args || args.backup === undefined) && !opts.urn) {
throw new Error("Missing required property 'backup'");
}
if ((!args || args.bindAddress === undefined) && !opts.urn) {
throw new Error("Missing required property 'bindAddress'");
}
if ((!args || args.instanceName === undefined) && !opts.urn) {
throw new Error("Missing required property 'instanceName'");
}
if ((!args || args.logging === undefined) && !opts.urn) {
throw new Error("Missing required property 'logging'");
}
if ((!args || args.port === undefined) && !opts.urn) {
throw new Error("Missing required property 'port'");
}
if ((!args || args.proxy === undefined) && !opts.urn) {
throw new Error("Missing required property 'proxy'");
}
if ((!args || args.ssl === undefined) && !opts.urn) {
throw new Error("Missing required property 'ssl'");
}
if ((!args || args.update === undefined) && !opts.urn) {
throw new Error("Missing required property 'update'");
}
if ((!args || args.urlBase === undefined) && !opts.urn) {
throw new Error("Missing required property 'urlBase'");
}
resourceInputs["applicationUrl"] = args ? args.applicationUrl : undefined;
resourceInputs["authentication"] = args ? args.authentication : undefined;
resourceInputs["backup"] = args ? args.backup : undefined;
resourceInputs["bindAddress"] = args ? args.bindAddress : undefined;
resourceInputs["instanceName"] = args ? args.instanceName : undefined;
resourceInputs["launchBrowser"] = args ? args.launchBrowser : undefined;
resourceInputs["logging"] = args ? args.logging : undefined;
resourceInputs["port"] = args ? args.port : undefined;
resourceInputs["proxy"] = args ? args.proxy : undefined;
resourceInputs["ssl"] = args ? args.ssl : undefined;
resourceInputs["update"] = args ? args.update : undefined;
resourceInputs["urlBase"] = args ? args.urlBase : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Host.__pulumiType, name, resourceInputs, opts);
}
}
exports.Host = Host;
/** @internal */
Host.__pulumiType = 'readarr:System/host:Host';
//# sourceMappingURL=host.js.map