@ryanwersal/pulumi-unifi 0.0.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/config/vars.d.ts +22 -2
- package/config/vars.d.ts.map +1 -1
- package/config/vars.js +37 -6
- package/config/vars.js.map +1 -1
- package/drive/index.d.ts +8 -0
- package/drive/index.d.ts.map +1 -0
- package/drive/index.js +54 -0
- package/drive/index.js.map +1 -0
- package/drive/nfsExport.d.ts +63 -0
- package/drive/nfsExport.d.ts.map +1 -0
- package/drive/nfsExport.js +93 -0
- package/drive/nfsExport.js.map +1 -0
- package/drive/share.d.ts +70 -0
- package/drive/share.d.ts.map +1 -0
- package/drive/share.js +94 -0
- package/drive/share.js.map +1 -0
- package/index.d.ts +4 -1
- package/index.d.ts.map +1 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/network/device.d.ts +176 -0
- package/network/device.d.ts.map +1 -0
- package/network/device.js +122 -0
- package/network/device.js.map +1 -0
- package/network/dnsRecord.d.ts +103 -0
- package/network/dnsRecord.d.ts.map +1 -0
- package/network/dnsRecord.js +104 -0
- package/network/dnsRecord.js.map +1 -0
- package/network/firewallGroup.d.ts +63 -0
- package/network/firewallGroup.d.ts.map +1 -0
- package/network/firewallGroup.js +88 -0
- package/network/firewallGroup.js.map +1 -0
- package/network/firewallRule.d.ts +137 -0
- package/network/firewallRule.d.ts.map +1 -0
- package/network/firewallRule.js +109 -0
- package/network/firewallRule.js.map +1 -0
- package/network/firewallZonePolicy.d.ts +129 -0
- package/network/firewallZonePolicy.d.ts.map +1 -0
- package/network/firewallZonePolicy.js +113 -0
- package/network/firewallZonePolicy.js.map +1 -0
- package/network/index.d.ts +31 -0
- package/network/index.d.ts.map +1 -1
- package/network/index.js +46 -1
- package/network/index.js.map +1 -1
- package/network/portForward.d.ts +153 -0
- package/network/portForward.d.ts.map +1 -0
- package/network/portForward.js +107 -0
- package/network/portForward.js.map +1 -0
- package/network/portProfile.d.ts +161 -0
- package/network/portProfile.d.ts.map +1 -0
- package/network/portProfile.js +112 -0
- package/network/portProfile.js.map +1 -0
- package/network/staticRoute.d.ts +111 -0
- package/network/staticRoute.d.ts.map +1 -0
- package/network/staticRoute.js +106 -0
- package/network/staticRoute.js.map +1 -0
- package/network/user.d.ts +170 -0
- package/network/user.d.ts.map +1 -0
- package/network/user.js +120 -0
- package/network/user.js.map +1 -0
- package/network/userGroup.d.ts +62 -0
- package/network/userGroup.d.ts.map +1 -0
- package/network/userGroup.js +88 -0
- package/network/userGroup.js.map +1 -0
- package/network/vlan.d.ts +199 -9
- package/network/vlan.d.ts.map +1 -1
- package/network/vlan.js +43 -9
- package/network/vlan.js.map +1 -1
- package/network/wlan.d.ts +245 -4
- package/network/wlan.d.ts.map +1 -1
- package/network/wlan.js +53 -4
- package/network/wlan.js.map +1 -1
- package/os/apikey.d.ts +66 -0
- package/os/apikey.d.ts.map +1 -0
- package/os/apikey.js +100 -0
- package/os/apikey.js.map +1 -0
- package/os/customRole.d.ts +78 -0
- package/os/customRole.d.ts.map +1 -0
- package/os/customRole.js +92 -0
- package/os/customRole.js.map +1 -0
- package/os/index.d.ts +10 -0
- package/os/index.d.ts.map +1 -0
- package/os/index.js +53 -0
- package/os/index.js.map +1 -0
- package/os/localAdmin.d.ts +86 -0
- package/os/localAdmin.d.ts.map +1 -0
- package/os/localAdmin.js +113 -0
- package/os/localAdmin.js.map +1 -0
- package/package.json +8 -2
- package/protect/alarmAutomation.d.ts +88 -0
- package/protect/alarmAutomation.d.ts.map +1 -0
- package/protect/alarmAutomation.js +100 -0
- package/protect/alarmAutomation.js.map +1 -0
- package/protect/camera.d.ts +115 -1
- package/protect/camera.d.ts.map +1 -1
- package/protect/camera.js +21 -1
- package/protect/camera.js.map +1 -1
- package/protect/index.d.ts +3 -0
- package/protect/index.d.ts.map +1 -1
- package/protect/index.js +5 -1
- package/protect/index.js.map +1 -1
- package/provider.d.ts +44 -4
- package/provider.d.ts.map +1 -1
- package/provider.js +12 -10
- package/provider.js.map +1 -1
- package/types/enums/drive/index.d.ts +12 -0
- package/types/enums/drive/index.d.ts.map +1 -0
- package/types/enums/drive/index.js +16 -0
- package/types/enums/drive/index.js.map +1 -0
- package/types/enums/index.d.ts +4 -0
- package/types/enums/index.d.ts.map +1 -0
- package/types/enums/index.js +34 -0
- package/types/enums/index.js.map +1 -0
- package/types/enums/network/index.d.ts +1133 -0
- package/types/enums/network/index.d.ts.map +1 -0
- package/types/enums/network/index.js +1067 -0
- package/types/enums/network/index.js.map +1 -0
- package/types/index.d.ts +5 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +36 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +1684 -0
- package/types/input.d.ts.map +1 -0
- package/types/input.js +41 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +1683 -0
- package/types/output.d.ts.map +1 -0
- package/types/output.js +41 -0
- package/types/output.js.map +1 -0
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
A Pulumi provider for managing a Ubiquiti UniFi deployment — the Network and Protect applications on a Dream Machine, and UniFi Drive on a UNAS appliance — via the local UniFi OS APIs.
|
package/config/vars.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const apiKey: string | undefined;
|
|
5
5
|
/**
|
|
6
|
-
* Skip TLS certificate verification (for self-signed controller certs).
|
|
6
|
+
* Skip TLS certificate verification (for self-signed controller and UNAS certs).
|
|
7
7
|
*/
|
|
8
8
|
export declare const insecureTls: boolean | undefined;
|
|
9
9
|
/**
|
|
@@ -13,7 +13,27 @@ export declare const password: string | undefined;
|
|
|
13
13
|
/**
|
|
14
14
|
* UniFi site name (defaults to "default").
|
|
15
15
|
*/
|
|
16
|
-
export declare const site: string
|
|
16
|
+
export declare const site: string;
|
|
17
|
+
/**
|
|
18
|
+
* Password for unasUsername.
|
|
19
|
+
*/
|
|
20
|
+
export declare const unasPassword: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Base URL of the UNAS appliance hosting UniFi Drive, e.g. https://192.168.1.20. A SEPARATE host from `url`; required to manage `unifi:drive:*` resources.
|
|
23
|
+
*/
|
|
24
|
+
export declare const unasUrl: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Local UniFi OS admin username on the UNAS appliance (UniFi Drive has no API-key auth).
|
|
27
|
+
*/
|
|
28
|
+
export declare const unasUsername: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Password for uosUsername.
|
|
31
|
+
*/
|
|
32
|
+
export declare const uosPassword: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Local UniFi OS administrator username used to manage console roles and local accounts.
|
|
35
|
+
*/
|
|
36
|
+
export declare const uosUsername: string | undefined;
|
|
17
37
|
/**
|
|
18
38
|
* Base URL of the UniFi controller, e.g. https://192.168.1.1 (omit any /api suffix).
|
|
19
39
|
*/
|
package/config/vars.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;AAQhD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;AAQtD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;AAQlD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;AAQhD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;AAQtD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;AAQlD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,CAAC;AAQlC;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;AAQtD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;AAQjD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;AAQtD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;AAQrD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;AAQrD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;AAQ7C;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC"}
|
package/config/vars.js
CHANGED
|
@@ -26,40 +26,71 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
29
|
+
const utilities = __importStar(require("../utilities"));
|
|
29
30
|
const __config = new pulumi.Config("unifi");
|
|
30
31
|
Object.defineProperty(exports, "apiKey", {
|
|
31
32
|
get() {
|
|
32
|
-
return __config.get("apiKey");
|
|
33
|
+
return __config.get("apiKey") ?? utilities.getEnv("UNIFI_API_KEY");
|
|
33
34
|
},
|
|
34
35
|
enumerable: true,
|
|
35
36
|
});
|
|
36
37
|
Object.defineProperty(exports, "insecureTls", {
|
|
37
38
|
get() {
|
|
38
|
-
return __config.getObject("insecureTls");
|
|
39
|
+
return __config.getObject("insecureTls") ?? utilities.getEnvBoolean("UNIFI_INSECURE_TLS");
|
|
39
40
|
},
|
|
40
41
|
enumerable: true,
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(exports, "password", {
|
|
43
44
|
get() {
|
|
44
|
-
return __config.get("password");
|
|
45
|
+
return __config.get("password") ?? utilities.getEnv("UNIFI_PASSWORD");
|
|
45
46
|
},
|
|
46
47
|
enumerable: true,
|
|
47
48
|
});
|
|
48
49
|
Object.defineProperty(exports, "site", {
|
|
49
50
|
get() {
|
|
50
|
-
return __config.get("site");
|
|
51
|
+
return __config.get("site") ?? (utilities.getEnv("UNIFI_SITE") || "default");
|
|
52
|
+
},
|
|
53
|
+
enumerable: true,
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "unasPassword", {
|
|
56
|
+
get() {
|
|
57
|
+
return __config.get("unasPassword") ?? utilities.getEnv("UNIFI_UNAS_PASSWORD");
|
|
58
|
+
},
|
|
59
|
+
enumerable: true,
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "unasUrl", {
|
|
62
|
+
get() {
|
|
63
|
+
return __config.get("unasUrl") ?? utilities.getEnv("UNIFI_UNAS_URL");
|
|
64
|
+
},
|
|
65
|
+
enumerable: true,
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "unasUsername", {
|
|
68
|
+
get() {
|
|
69
|
+
return __config.get("unasUsername") ?? utilities.getEnv("UNIFI_UNAS_USERNAME");
|
|
70
|
+
},
|
|
71
|
+
enumerable: true,
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "uosPassword", {
|
|
74
|
+
get() {
|
|
75
|
+
return __config.get("uosPassword") ?? utilities.getEnv("UNIFI_UOS_PASSWORD");
|
|
76
|
+
},
|
|
77
|
+
enumerable: true,
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "uosUsername", {
|
|
80
|
+
get() {
|
|
81
|
+
return __config.get("uosUsername") ?? utilities.getEnv("UNIFI_UOS_USERNAME");
|
|
51
82
|
},
|
|
52
83
|
enumerable: true,
|
|
53
84
|
});
|
|
54
85
|
Object.defineProperty(exports, "url", {
|
|
55
86
|
get() {
|
|
56
|
-
return __config.get("url");
|
|
87
|
+
return __config.get("url") ?? utilities.getEnv("UNIFI_URL");
|
|
57
88
|
},
|
|
58
89
|
enumerable: true,
|
|
59
90
|
});
|
|
60
91
|
Object.defineProperty(exports, "username", {
|
|
61
92
|
get() {
|
|
62
|
-
return __config.get("username");
|
|
93
|
+
return __config.get("username") ?? utilities.getEnv("UNIFI_USERNAME");
|
|
63
94
|
},
|
|
64
95
|
enumerable: true,
|
|
65
96
|
});
|
package/config/vars.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;
|
|
1
|
+
{"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAG1C,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAM5C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE;IACrC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACvE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;IAC1C,GAAG;QACC,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AAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;IAC1C,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACjF,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;IAC1C,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACjF,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE;IAClC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAChE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;IACvC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC1E,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
|
package/drive/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { NfsExportArgs } from "./nfsExport";
|
|
2
|
+
export type NfsExport = import("./nfsExport").NfsExport;
|
|
3
|
+
export declare const NfsExport: typeof import("./nfsExport").NfsExport;
|
|
4
|
+
export { ShareArgs } from "./share";
|
|
5
|
+
export type Share = import("./share").Share;
|
|
6
|
+
export declare const Share: typeof import("./share").Share;
|
|
7
|
+
export * from "../types/enums/drive";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../drive/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,MAAM,MAAM,SAAS,GAAG,OAAO,aAAa,EAAE,SAAS,CAAC;AACxD,eAAO,MAAM,SAAS,EAAE,cAAc,aAAa,EAAE,SAAuB,CAAC;AAG7E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,MAAM,MAAM,KAAK,GAAG,OAAO,SAAS,EAAE,KAAK,CAAC;AAC5C,eAAO,MAAM,KAAK,EAAE,cAAc,SAAS,EAAE,KAAmB,CAAC;AAKjE,cAAc,sBAAsB,CAAC"}
|
package/drive/index.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.Share = exports.NfsExport = void 0;
|
|
32
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
33
|
+
const utilities = __importStar(require("../utilities"));
|
|
34
|
+
exports.NfsExport = null;
|
|
35
|
+
utilities.lazyLoad(exports, ["NfsExport"], () => require("./nfsExport"));
|
|
36
|
+
exports.Share = null;
|
|
37
|
+
utilities.lazyLoad(exports, ["Share"], () => require("./share"));
|
|
38
|
+
// Export enums:
|
|
39
|
+
__exportStar(require("../types/enums/drive"), exports);
|
|
40
|
+
const _module = {
|
|
41
|
+
version: utilities.getVersion(),
|
|
42
|
+
construct: (name, type, urn) => {
|
|
43
|
+
switch (type) {
|
|
44
|
+
case "unifi:drive:NfsExport":
|
|
45
|
+
return new exports.NfsExport(name, undefined, { urn });
|
|
46
|
+
case "unifi:drive:Share":
|
|
47
|
+
return new exports.Share(name, undefined, { urn });
|
|
48
|
+
default:
|
|
49
|
+
throw new Error(`unknown resource type ${type}`);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
pulumi.runtime.registerResourceModule("unifi", "drive", _module);
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../drive/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAK7B,QAAA,SAAS,GAA2C,IAAW,CAAC;AAC7E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;AAI5D,QAAA,KAAK,GAAmC,IAAW,CAAC;AACjE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AAGjE,gBAAgB;AAChB,uDAAqC;AAErC,MAAM,OAAO,GAAG;IACZ,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,SAAS,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAAmB,EAAE;QACpE,QAAQ,IAAI,EAAE;YACV,KAAK,uBAAuB;gBACxB,OAAO,IAAI,iBAAS,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACvD,KAAK,mBAAmB;gBACpB,OAAO,IAAI,aAAK,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACnD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as enums from "../types/enums";
|
|
3
|
+
/**
|
|
4
|
+
* An NFS export grant giving one client access to a UniFi Drive shared drive. Owns a single (share, client) entry in the appliance's global NFS export list; writes are read-modify-writes serialised within the provider process. Requires the global NFS service to be enabled on the appliance.
|
|
5
|
+
*/
|
|
6
|
+
export declare class NfsExport extends pulumi.CustomResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get an existing NfsExport resource's state with the given name, ID, and optional extra
|
|
9
|
+
* properties used to qualify the lookup.
|
|
10
|
+
*
|
|
11
|
+
* @param name The _unique_ name of the resulting resource.
|
|
12
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
13
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
14
|
+
*/
|
|
15
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): NfsExport;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if the given object is an instance of NfsExport. This is designed to work even
|
|
18
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
19
|
+
*/
|
|
20
|
+
static isInstance(obj: any): obj is NfsExport;
|
|
21
|
+
/**
|
|
22
|
+
* Client is the NFS client IP or CIDR allowed to mount the drive.
|
|
23
|
+
*/
|
|
24
|
+
readonly client: pulumi.Output<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Permission is the access level: "rw" (default) or "ro".
|
|
27
|
+
*/
|
|
28
|
+
readonly permission: pulumi.Output<enums.drive.NfsPermission | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* ShareId is the drive to export (the shareId of a unifi:drive:Share).
|
|
31
|
+
*/
|
|
32
|
+
readonly shareId: pulumi.Output<string>;
|
|
33
|
+
/**
|
|
34
|
+
* ShareName is the exported drive's name (resolved from ShareId).
|
|
35
|
+
*/
|
|
36
|
+
readonly shareName: pulumi.Output<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a NfsExport resource with the given unique name, arguments, and options.
|
|
39
|
+
*
|
|
40
|
+
* @param name The _unique_ name of the resource.
|
|
41
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
42
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
43
|
+
*/
|
|
44
|
+
constructor(name: string, args: NfsExportArgs, opts?: pulumi.CustomResourceOptions);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The set of arguments for constructing a NfsExport resource.
|
|
48
|
+
*/
|
|
49
|
+
export interface NfsExportArgs {
|
|
50
|
+
/**
|
|
51
|
+
* Client is the NFS client IP or CIDR allowed to mount the drive.
|
|
52
|
+
*/
|
|
53
|
+
client: pulumi.Input<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Permission is the access level: "rw" (default) or "ro".
|
|
56
|
+
*/
|
|
57
|
+
permission?: pulumi.Input<enums.drive.NfsPermission | undefined>;
|
|
58
|
+
/**
|
|
59
|
+
* ShareId is the drive to export (the shareId of a unifi:drive:Share).
|
|
60
|
+
*/
|
|
61
|
+
shareId: pulumi.Input<string>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=nfsExport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nfsExport.d.ts","sourceRoot":"","sources":["../../drive/nfsExport.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAGxC;;GAEG;AACH,qBAAa,SAAU,SAAQ,MAAM,CAAC,cAAc;IAChD;;;;;;;OAOG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,SAAS;IAO5G;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS;IAOpD;;OAEG;IACH,SAAwB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtD;;OAEG;IACH,SAAwB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IACzF;;OAEG;IACH,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvD;;OAEG;IACH,SAAgC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAEjE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CAyBrF;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IACjE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CACjC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.NfsExport = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* An NFS export grant giving one client access to a UniFi Drive shared drive. Owns a single (share, client) entry in the appliance's global NFS export list; writes are read-modify-writes serialised within the provider process. Requires the global NFS service to be enabled on the appliance.
|
|
33
|
+
*/
|
|
34
|
+
class NfsExport extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing NfsExport resource's state with the given name, ID, and optional extra
|
|
37
|
+
* properties used to qualify the lookup.
|
|
38
|
+
*
|
|
39
|
+
* @param name The _unique_ name of the resulting resource.
|
|
40
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
41
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
42
|
+
*/
|
|
43
|
+
static get(name, id, opts) {
|
|
44
|
+
return new NfsExport(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'unifi:drive:NfsExport';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of NfsExport. This is designed to work even
|
|
50
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
|
+
*/
|
|
52
|
+
static isInstance(obj) {
|
|
53
|
+
if (obj === undefined || obj === null) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return obj['__pulumiType'] === NfsExport.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a NfsExport resource with the given unique name, arguments, and options.
|
|
60
|
+
*
|
|
61
|
+
* @param name The _unique_ name of the resource.
|
|
62
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
63
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
64
|
+
*/
|
|
65
|
+
constructor(name, args, opts) {
|
|
66
|
+
let resourceInputs = {};
|
|
67
|
+
opts = opts || {};
|
|
68
|
+
if (!opts.id) {
|
|
69
|
+
if (args?.client === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'client'");
|
|
71
|
+
}
|
|
72
|
+
if (args?.shareId === undefined && !opts.urn) {
|
|
73
|
+
throw new Error("Missing required property 'shareId'");
|
|
74
|
+
}
|
|
75
|
+
resourceInputs["client"] = args?.client;
|
|
76
|
+
resourceInputs["permission"] = (args?.permission) ?? "rw";
|
|
77
|
+
resourceInputs["shareId"] = args?.shareId;
|
|
78
|
+
resourceInputs["shareName"] = undefined /*out*/;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
resourceInputs["client"] = undefined /*out*/;
|
|
82
|
+
resourceInputs["permission"] = undefined /*out*/;
|
|
83
|
+
resourceInputs["shareId"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["shareName"] = undefined /*out*/;
|
|
85
|
+
}
|
|
86
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
87
|
+
const replaceOnChanges = { replaceOnChanges: ["client", "shareId"] };
|
|
88
|
+
opts = pulumi.mergeOptions(opts, replaceOnChanges);
|
|
89
|
+
super(NfsExport.__pulumiType, name, resourceInputs, opts);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.NfsExport = NfsExport;
|
|
93
|
+
//# sourceMappingURL=nfsExport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nfsExport.js","sourceRoot":"","sources":["../../drive/nfsExport.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACt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AAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACnD;aAAM;YACH,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACjD,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9C,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACnD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,gBAAgB,GAAG,EAAE,gBAAgB,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;QACrE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACnD,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;;AA3EL,8BA4EC"}
|
package/drive/share.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* A UniFi Drive shared drive on a UNAS appliance. Managed via UniFi Drive's PRIVATE /proxy/drive API (the UNAS is a separate host — configure `unasUrl`/`unasUsername`/`unasPassword`). The API supports only create and delete, so every input is replace-only: changing name, pool, or quota REPLACES the drive and DELETES its data. Use `pulumi.protect(true)` to guard important drives.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Share extends pulumi.CustomResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get an existing Share resource's state with the given name, ID, and optional extra
|
|
8
|
+
* properties used to qualify the lookup.
|
|
9
|
+
*
|
|
10
|
+
* @param name The _unique_ name of the resulting resource.
|
|
11
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
12
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
13
|
+
*/
|
|
14
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Share;
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if the given object is an instance of Share. This is designed to work even
|
|
17
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
18
|
+
*/
|
|
19
|
+
static isInstance(obj: any): obj is Share;
|
|
20
|
+
/**
|
|
21
|
+
* ExportPath is the documented NFS export path for the drive, e.g. /var/nfs/shared/<name>.
|
|
22
|
+
*/
|
|
23
|
+
readonly exportPath: pulumi.Output<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Name is the shared drive's name. Must be unique on the appliance. Changing it replaces (and deletes) the drive.
|
|
26
|
+
*/
|
|
27
|
+
readonly name: pulumi.Output<string>;
|
|
28
|
+
/**
|
|
29
|
+
* PoolId is the storage pool the drive actually lives in (resolved when StoragePoolId is omitted).
|
|
30
|
+
*/
|
|
31
|
+
readonly poolId: pulumi.Output<string>;
|
|
32
|
+
/**
|
|
33
|
+
* QuotaGib is the size limit in gibibytes. Omit (or <= 0) for no quota.
|
|
34
|
+
*/
|
|
35
|
+
readonly quotaGib: pulumi.Output<number | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* ShareId is the appliance-assigned drive identifier.
|
|
38
|
+
*/
|
|
39
|
+
readonly shareId: pulumi.Output<string>;
|
|
40
|
+
/**
|
|
41
|
+
* StoragePoolId pins the storage pool. Omit to use the appliance's first pool.
|
|
42
|
+
*/
|
|
43
|
+
readonly storagePoolId: pulumi.Output<string | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* Create a Share resource with the given unique name, arguments, and options.
|
|
46
|
+
*
|
|
47
|
+
* @param name The _unique_ name of the resource.
|
|
48
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
49
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
50
|
+
*/
|
|
51
|
+
constructor(name: string, args: ShareArgs, opts?: pulumi.CustomResourceOptions);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The set of arguments for constructing a Share resource.
|
|
55
|
+
*/
|
|
56
|
+
export interface ShareArgs {
|
|
57
|
+
/**
|
|
58
|
+
* Name is the shared drive's name. Must be unique on the appliance. Changing it replaces (and deletes) the drive.
|
|
59
|
+
*/
|
|
60
|
+
name: pulumi.Input<string>;
|
|
61
|
+
/**
|
|
62
|
+
* QuotaGib is the size limit in gibibytes. Omit (or <= 0) for no quota.
|
|
63
|
+
*/
|
|
64
|
+
quotaGib?: pulumi.Input<number | undefined>;
|
|
65
|
+
/**
|
|
66
|
+
* StoragePoolId pins the storage pool. Omit to use the appliance's first pool.
|
|
67
|
+
*/
|
|
68
|
+
storagePoolId?: pulumi.Input<string | undefined>;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=share.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../drive/share.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;GAEG;AACH,qBAAa,KAAM,SAAQ,MAAM,CAAC,cAAc;IAC5C;;;;;;;OAOG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,KAAK;IAOxG;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,KAAK;IAOhD;;OAEG;IACH,SAAgC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClE;;OAEG;IACH,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD;;OAEG;IACH,SAAgC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9D;;OAEG;IACH,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpE;;OAEG;IACH,SAAgC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/D;;OAEG;IACH,SAAwB,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEzE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CA0BjF;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACpD"}
|
package/drive/share.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Share = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A UniFi Drive shared drive on a UNAS appliance. Managed via UniFi Drive's PRIVATE /proxy/drive API (the UNAS is a separate host — configure `unasUrl`/`unasUsername`/`unasPassword`). The API supports only create and delete, so every input is replace-only: changing name, pool, or quota REPLACES the drive and DELETES its data. Use `pulumi.protect(true)` to guard important drives.
|
|
33
|
+
*/
|
|
34
|
+
class Share extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Share resource's state with the given name, ID, and optional extra
|
|
37
|
+
* properties used to qualify the lookup.
|
|
38
|
+
*
|
|
39
|
+
* @param name The _unique_ name of the resulting resource.
|
|
40
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
41
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
42
|
+
*/
|
|
43
|
+
static get(name, id, opts) {
|
|
44
|
+
return new Share(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'unifi:drive:Share';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Share. This is designed to work even
|
|
50
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
|
+
*/
|
|
52
|
+
static isInstance(obj) {
|
|
53
|
+
if (obj === undefined || obj === null) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return obj['__pulumiType'] === Share.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Share resource with the given unique name, arguments, and options.
|
|
60
|
+
*
|
|
61
|
+
* @param name The _unique_ name of the resource.
|
|
62
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
63
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
64
|
+
*/
|
|
65
|
+
constructor(name, args, opts) {
|
|
66
|
+
let resourceInputs = {};
|
|
67
|
+
opts = opts || {};
|
|
68
|
+
if (!opts.id) {
|
|
69
|
+
if (args?.name === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'name'");
|
|
71
|
+
}
|
|
72
|
+
resourceInputs["name"] = args?.name;
|
|
73
|
+
resourceInputs["quotaGib"] = args?.quotaGib;
|
|
74
|
+
resourceInputs["storagePoolId"] = args?.storagePoolId;
|
|
75
|
+
resourceInputs["exportPath"] = undefined /*out*/;
|
|
76
|
+
resourceInputs["poolId"] = undefined /*out*/;
|
|
77
|
+
resourceInputs["shareId"] = undefined /*out*/;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
resourceInputs["exportPath"] = undefined /*out*/;
|
|
81
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
82
|
+
resourceInputs["poolId"] = undefined /*out*/;
|
|
83
|
+
resourceInputs["quotaGib"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["shareId"] = undefined /*out*/;
|
|
85
|
+
resourceInputs["storagePoolId"] = undefined /*out*/;
|
|
86
|
+
}
|
|
87
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
88
|
+
const replaceOnChanges = { replaceOnChanges: ["name", "quotaGib", "storagePoolId"] };
|
|
89
|
+
opts = pulumi.mergeOptions(opts, replaceOnChanges);
|
|
90
|
+
super(Share.__pulumiType, name, resourceInputs, opts);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Share = Share;
|
|
94
|
+
//# sourceMappingURL=share.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.js","sourceRoot":"","sources":["../../drive/share.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAE1C;;GAEG;AACH,MAAa,KAAM,SAAQ,MAAM,CAAC,cAAc;IAC5C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAgB,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,mBAAmB,CAAC;IAE1D;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;IACtD,CAAC;IA2BD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAe,EAAE,IAAmC;QAC1E,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACV,IAAI,IAAI,EAAE,IAAI,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvC,MAAM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"./provider";
|
|
|
2
2
|
export type Provider = import("./provider").Provider;
|
|
3
3
|
export declare const Provider: typeof import("./provider").Provider;
|
|
4
4
|
import * as config from "./config";
|
|
5
|
+
import * as drive from "./drive";
|
|
5
6
|
import * as network from "./network";
|
|
7
|
+
import * as os from "./os";
|
|
6
8
|
import * as protect from "./protect";
|
|
7
|
-
|
|
9
|
+
import * as types from "./types";
|
|
10
|
+
export { config, drive, network, os, protect, types, };
|
|
8
11
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,MAAM,MAAM,QAAQ,GAAG,OAAO,YAAY,EAAE,QAAQ,CAAC;AACrD,eAAO,MAAM,QAAQ,EAAE,cAAc,YAAY,EAAE,QAAsB,CAAC;AAK1E,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,MAAM,MAAM,QAAQ,GAAG,OAAO,YAAY,EAAE,QAAQ,CAAC;AACrD,eAAO,MAAM,QAAQ,EAAE,cAAc,YAAY,EAAE,QAAsB,CAAC;AAK1E,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACH,MAAM,EACN,KAAK,EACL,OAAO,EACP,EAAE,EACF,OAAO,EACP,KAAK,GACR,CAAC"}
|
package/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
return result;
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.protect = exports.network = exports.config = exports.Provider = void 0;
|
|
28
|
+
exports.types = exports.protect = exports.os = exports.network = exports.drive = exports.config = exports.Provider = void 0;
|
|
29
29
|
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
30
|
const utilities = __importStar(require("./utilities"));
|
|
31
31
|
exports.Provider = null;
|
|
@@ -33,10 +33,16 @@ utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
|
|
|
33
33
|
// Export sub-modules:
|
|
34
34
|
const config = __importStar(require("./config"));
|
|
35
35
|
exports.config = config;
|
|
36
|
+
const drive = __importStar(require("./drive"));
|
|
37
|
+
exports.drive = drive;
|
|
36
38
|
const network = __importStar(require("./network"));
|
|
37
39
|
exports.network = network;
|
|
40
|
+
const os = __importStar(require("./os"));
|
|
41
|
+
exports.os = os;
|
|
38
42
|
const protect = __importStar(require("./protect"));
|
|
39
43
|
exports.protect = protect;
|
|
44
|
+
const types = __importStar(require("./types"));
|
|
45
|
+
exports.types = types;
|
|
40
46
|
pulumi.runtime.registerResourcePackage("unifi", {
|
|
41
47
|
version: utilities.getVersion(),
|
|
42
48
|
constructProvider: (name, type, urn) => {
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAK5B,QAAA,QAAQ,GAAyC,IAAW,CAAC;AAC1E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC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