@ryanwersal/pulumi-unifi 0.0.1
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 -0
- package/config/index.d.ts +2 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +25 -0
- package/config/vars.d.ts.map +1 -0
- package/config/vars.js +66 -0
- package/config/vars.js.map +1 -0
- package/index.d.ts +8 -0
- package/index.d.ts.map +1 -0
- package/index.js +49 -0
- package/index.js.map +1 -0
- package/network/index.d.ts +7 -0
- package/network/index.d.ts.map +1 -0
- package/network/index.js +49 -0
- package/network/index.js.map +1 -0
- package/network/vlan.d.ts +51 -0
- package/network/vlan.d.ts.map +1 -0
- package/network/vlan.js +98 -0
- package/network/vlan.js.map +1 -0
- package/network/wlan.d.ts +48 -0
- package/network/wlan.d.ts.map +1 -0
- package/network/wlan.js +100 -0
- package/network/wlan.js.map +1 -0
- package/package.json +23 -0
- package/protect/camera.d.ts +48 -0
- package/protect/camera.d.ts.map +1 -0
- package/protect/camera.js +96 -0
- package/protect/camera.js.map +1 -0
- package/protect/index.d.ts +4 -0
- package/protect/index.d.ts.map +1 -0
- package/protect/index.js +45 -0
- package/protect/index.js.map +1 -0
- package/provider.d.ts +66 -0
- package/provider.d.ts.map +1 -0
- package/provider.js +72 -0
- package/provider.js.map +1 -0
- package/utilities.d.ts +5 -0
- package/utilities.d.ts.map +1 -0
- package/utilities.js +114 -0
- package/utilities.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Manage a UniFi Dream Machine's Network and Protect applications via the local controller API.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
package/config/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
// Export members:
|
|
20
|
+
__exportStar(require("./vars"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../config/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;AAEjF,kBAAkB;AAClB,yCAAuB"}
|
package/config/vars.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UniFi OS local API key. Preferred for headless automation. Mutually exclusive with username/password.
|
|
3
|
+
*/
|
|
4
|
+
export declare const apiKey: string | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Skip TLS certificate verification (for self-signed controller certs).
|
|
7
|
+
*/
|
|
8
|
+
export declare const insecureTls: boolean | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Local admin password.
|
|
11
|
+
*/
|
|
12
|
+
export declare const password: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* UniFi site name (defaults to "default").
|
|
15
|
+
*/
|
|
16
|
+
export declare const site: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Base URL of the UniFi controller, e.g. https://192.168.1.1 (omit any /api suffix).
|
|
19
|
+
*/
|
|
20
|
+
export declare const url: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Local admin username. Use with password when not using an API key.
|
|
23
|
+
*/
|
|
24
|
+
export declare const username: string | undefined;
|
|
25
|
+
//# sourceMappingURL=vars.d.ts.map
|
|
@@ -0,0 +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;AAQ9C;;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
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
29
|
+
const __config = new pulumi.Config("unifi");
|
|
30
|
+
Object.defineProperty(exports, "apiKey", {
|
|
31
|
+
get() {
|
|
32
|
+
return __config.get("apiKey");
|
|
33
|
+
},
|
|
34
|
+
enumerable: true,
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "insecureTls", {
|
|
37
|
+
get() {
|
|
38
|
+
return __config.getObject("insecureTls");
|
|
39
|
+
},
|
|
40
|
+
enumerable: true,
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "password", {
|
|
43
|
+
get() {
|
|
44
|
+
return __config.get("password");
|
|
45
|
+
},
|
|
46
|
+
enumerable: true,
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "site", {
|
|
49
|
+
get() {
|
|
50
|
+
return __config.get("site");
|
|
51
|
+
},
|
|
52
|
+
enumerable: true,
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "url", {
|
|
55
|
+
get() {
|
|
56
|
+
return __config.get("url");
|
|
57
|
+
},
|
|
58
|
+
enumerable: true,
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "username", {
|
|
61
|
+
get() {
|
|
62
|
+
return __config.get("username");
|
|
63
|
+
},
|
|
64
|
+
enumerable: true,
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAIzC,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,CAAC;IAClC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;IAC1C,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAU,aAAa,CAAC,CAAC;IACtD,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,CAAC;IACpC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE;IACnC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,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,CAAC;IAC/B,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,CAAC;IACpC,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ProviderArgs } from "./provider";
|
|
2
|
+
export type Provider = import("./provider").Provider;
|
|
3
|
+
export declare const Provider: typeof import("./provider").Provider;
|
|
4
|
+
import * as config from "./config";
|
|
5
|
+
import * as network from "./network";
|
|
6
|
+
import * as protect from "./protect";
|
|
7
|
+
export { config, network, protect, };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +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;AAErC,OAAO,EACH,MAAM,EACN,OAAO,EACP,OAAO,GACV,CAAC"}
|
package/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
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.protect = exports.network = exports.config = exports.Provider = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
exports.Provider = null;
|
|
32
|
+
utilities.lazyLoad(exports, ["Provider"], () => require("./provider"));
|
|
33
|
+
// Export sub-modules:
|
|
34
|
+
const config = __importStar(require("./config"));
|
|
35
|
+
exports.config = config;
|
|
36
|
+
const network = __importStar(require("./network"));
|
|
37
|
+
exports.network = network;
|
|
38
|
+
const protect = __importStar(require("./protect"));
|
|
39
|
+
exports.protect = protect;
|
|
40
|
+
pulumi.runtime.registerResourcePackage("unifi", {
|
|
41
|
+
version: utilities.getVersion(),
|
|
42
|
+
constructProvider: (name, type, urn) => {
|
|
43
|
+
if (type !== "pulumi:providers:unifi") {
|
|
44
|
+
throw new Error(`unknown provider type ${type}`);
|
|
45
|
+
}
|
|
46
|
+
return new exports.Provider(name, undefined, { urn });
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +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,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;AAGvE,sBAAsB;AACtB,iDAAmC;AAK/B,wBAAM;AAJV,mDAAqC;AAKjC,0BAAO;AAJX,mDAAqC;AAKjC,0BAAO;AAEX,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,EAAE;IAC5C,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAA2B,EAAE;QACpF,IAAI,IAAI,KAAK,wBAAwB,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACpD;QACD,OAAO,IAAI,gBAAQ,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACvD,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { VlanArgs } from "./vlan";
|
|
2
|
+
export type Vlan = import("./vlan").Vlan;
|
|
3
|
+
export declare const Vlan: typeof import("./vlan").Vlan;
|
|
4
|
+
export { WlanArgs } from "./wlan";
|
|
5
|
+
export type Wlan = import("./wlan").Wlan;
|
|
6
|
+
export declare const Wlan: typeof import("./wlan").Wlan;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../network/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,MAAM,MAAM,IAAI,GAAG,OAAO,QAAQ,EAAE,IAAI,CAAC;AACzC,eAAO,MAAM,IAAI,EAAE,cAAc,QAAQ,EAAE,IAAkB,CAAC;AAG9D,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,MAAM,MAAM,IAAI,GAAG,OAAO,QAAQ,EAAE,IAAI,CAAC;AACzC,eAAO,MAAM,IAAI,EAAE,cAAc,QAAQ,EAAE,IAAkB,CAAC"}
|
package/network/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
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.Wlan = exports.Vlan = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
exports.Vlan = null;
|
|
32
|
+
utilities.lazyLoad(exports, ["Vlan"], () => require("./vlan"));
|
|
33
|
+
exports.Wlan = null;
|
|
34
|
+
utilities.lazyLoad(exports, ["Wlan"], () => require("./wlan"));
|
|
35
|
+
const _module = {
|
|
36
|
+
version: utilities.getVersion(),
|
|
37
|
+
construct: (name, type, urn) => {
|
|
38
|
+
switch (type) {
|
|
39
|
+
case "unifi:network:Vlan":
|
|
40
|
+
return new exports.Vlan(name, undefined, { urn });
|
|
41
|
+
case "unifi:network:Wlan":
|
|
42
|
+
return new exports.Wlan(name, undefined, { urn });
|
|
43
|
+
default:
|
|
44
|
+
throw new Error(`unknown resource type ${type}`);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
pulumi.runtime.registerResourceModule("unifi", "network", _module);
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../network/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAK7B,QAAA,IAAI,GAAiC,IAAW,CAAC;AAC9D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAIlD,QAAA,IAAI,GAAiC,IAAW,CAAC;AAC9D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAG/D,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,oBAAoB;gBACrB,OAAO,IAAI,YAAI,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YAClD,KAAK,oBAAoB;gBACrB,OAAO,IAAI,YAAI,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YAClD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* A UniFi Network (VLAN). Maps to a controller network configuration object.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Vlan extends pulumi.CustomResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get an existing Vlan 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): Vlan;
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if the given object is an instance of Vlan. 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 Vlan;
|
|
20
|
+
readonly dhcpEnabled: pulumi.Output<boolean | undefined>;
|
|
21
|
+
readonly dhcpStart: pulumi.Output<string | undefined>;
|
|
22
|
+
readonly dhcpStop: pulumi.Output<string | undefined>;
|
|
23
|
+
readonly enabled: pulumi.Output<boolean | undefined>;
|
|
24
|
+
readonly name: pulumi.Output<string>;
|
|
25
|
+
readonly networkId: pulumi.Output<string>;
|
|
26
|
+
readonly purpose: pulumi.Output<string | undefined>;
|
|
27
|
+
readonly subnet: pulumi.Output<string | undefined>;
|
|
28
|
+
readonly vlan: pulumi.Output<number | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a Vlan resource with the given unique name, arguments, and options.
|
|
31
|
+
*
|
|
32
|
+
* @param name The _unique_ name of the resource.
|
|
33
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
34
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
35
|
+
*/
|
|
36
|
+
constructor(name: string, args: VlanArgs, opts?: pulumi.CustomResourceOptions);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The set of arguments for constructing a Vlan resource.
|
|
40
|
+
*/
|
|
41
|
+
export interface VlanArgs {
|
|
42
|
+
dhcpEnabled?: pulumi.Input<boolean | undefined>;
|
|
43
|
+
dhcpStart?: pulumi.Input<string | undefined>;
|
|
44
|
+
dhcpStop?: pulumi.Input<string | undefined>;
|
|
45
|
+
enabled?: pulumi.Input<boolean | undefined>;
|
|
46
|
+
name: pulumi.Input<string>;
|
|
47
|
+
purpose?: pulumi.Input<string | undefined>;
|
|
48
|
+
subnet?: pulumi.Input<string | undefined>;
|
|
49
|
+
vlan?: pulumi.Input<number | undefined>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=vlan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vlan.d.ts","sourceRoot":"","sources":["../../network/vlan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;GAEG;AACH,qBAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAC3C;;;;;;;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,IAAI;IAOvG;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,IAAI;IAO/C,SAAwB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACxE,SAAwB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrE,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpE,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACpE,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD,SAAgC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjE,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACnE,SAAwB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAClE,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEhE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CA8BhF;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC3C"}
|
package/network/vlan.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
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.Vlan = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A UniFi Network (VLAN). Maps to a controller network configuration object.
|
|
33
|
+
*/
|
|
34
|
+
class Vlan extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Vlan 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 Vlan(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'unifi:network:Vlan';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Vlan. 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'] === Vlan.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Vlan 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["dhcpEnabled"] = args?.dhcpEnabled;
|
|
73
|
+
resourceInputs["dhcpStart"] = args?.dhcpStart;
|
|
74
|
+
resourceInputs["dhcpStop"] = args?.dhcpStop;
|
|
75
|
+
resourceInputs["enabled"] = args?.enabled;
|
|
76
|
+
resourceInputs["name"] = args?.name;
|
|
77
|
+
resourceInputs["purpose"] = args?.purpose;
|
|
78
|
+
resourceInputs["subnet"] = args?.subnet;
|
|
79
|
+
resourceInputs["vlan"] = args?.vlan;
|
|
80
|
+
resourceInputs["networkId"] = undefined /*out*/;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
resourceInputs["dhcpEnabled"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["dhcpStart"] = undefined /*out*/;
|
|
85
|
+
resourceInputs["dhcpStop"] = undefined /*out*/;
|
|
86
|
+
resourceInputs["enabled"] = undefined /*out*/;
|
|
87
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
88
|
+
resourceInputs["networkId"] = undefined /*out*/;
|
|
89
|
+
resourceInputs["purpose"] = undefined /*out*/;
|
|
90
|
+
resourceInputs["subnet"] = undefined /*out*/;
|
|
91
|
+
resourceInputs["vlan"] = undefined /*out*/;
|
|
92
|
+
}
|
|
93
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
94
|
+
super(Vlan.__pulumiType, name, resourceInputs, opts);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.Vlan = Vlan;
|
|
98
|
+
//# sourceMappingURL=vlan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vlan.js","sourceRoot":"","sources":["../../network/vlan.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAE1C;;GAEG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAC3C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,SAAgB,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,oBAAoB,CAAC;IAE3D;;;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,IAAI,CAAC,YAAY,CAAC;IACr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AC,OAAO,CAAC;YAChD,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9C,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC7C,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC9C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;;AAzEL,oBA0EC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export declare class Wlan extends pulumi.CustomResource {
|
|
3
|
+
/**
|
|
4
|
+
* Get an existing Wlan resource's state with the given name, ID, and optional extra
|
|
5
|
+
* properties used to qualify the lookup.
|
|
6
|
+
*
|
|
7
|
+
* @param name The _unique_ name of the resulting resource.
|
|
8
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
9
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
10
|
+
*/
|
|
11
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Wlan;
|
|
12
|
+
/**
|
|
13
|
+
* Returns true if the given object is an instance of Wlan. This is designed to work even
|
|
14
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
15
|
+
*/
|
|
16
|
+
static isInstance(obj: any): obj is Wlan;
|
|
17
|
+
readonly enabled: pulumi.Output<boolean | undefined>;
|
|
18
|
+
readonly hideSsid: pulumi.Output<boolean | undefined>;
|
|
19
|
+
readonly name: pulumi.Output<string>;
|
|
20
|
+
readonly networkId: pulumi.Output<string>;
|
|
21
|
+
readonly passphrase: pulumi.Output<string | undefined>;
|
|
22
|
+
readonly security: pulumi.Output<string | undefined>;
|
|
23
|
+
readonly wlanGroupId: pulumi.Output<string | undefined>;
|
|
24
|
+
readonly wlanId: pulumi.Output<string>;
|
|
25
|
+
readonly wpaMode: pulumi.Output<string | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a Wlan resource with the given unique name, arguments, and options.
|
|
28
|
+
*
|
|
29
|
+
* @param name The _unique_ name of the resource.
|
|
30
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
31
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
32
|
+
*/
|
|
33
|
+
constructor(name: string, args: WlanArgs, opts?: pulumi.CustomResourceOptions);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The set of arguments for constructing a Wlan resource.
|
|
37
|
+
*/
|
|
38
|
+
export interface WlanArgs {
|
|
39
|
+
enabled?: pulumi.Input<boolean | undefined>;
|
|
40
|
+
hideSsid?: pulumi.Input<boolean | undefined>;
|
|
41
|
+
name: pulumi.Input<string>;
|
|
42
|
+
networkId: pulumi.Input<string>;
|
|
43
|
+
passphrase?: pulumi.Input<string | undefined>;
|
|
44
|
+
security?: pulumi.Input<string | undefined>;
|
|
45
|
+
wlanGroupId?: pulumi.Input<string | undefined>;
|
|
46
|
+
wpaMode?: pulumi.Input<string | undefined>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=wlan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wlan.d.ts","sourceRoot":"","sources":["../../network/wlan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,qBAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAC3C;;;;;;;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,IAAI;IAOvG;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE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AC9C,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C"}
|
package/network/wlan.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
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.Wlan = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
class Wlan extends pulumi.CustomResource {
|
|
32
|
+
/**
|
|
33
|
+
* Get an existing Wlan resource's state with the given name, ID, and optional extra
|
|
34
|
+
* properties used to qualify the lookup.
|
|
35
|
+
*
|
|
36
|
+
* @param name The _unique_ name of the resulting resource.
|
|
37
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
38
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
39
|
+
*/
|
|
40
|
+
static get(name, id, opts) {
|
|
41
|
+
return new Wlan(name, undefined, { ...opts, id: id });
|
|
42
|
+
}
|
|
43
|
+
/** @internal */
|
|
44
|
+
static __pulumiType = 'unifi:network:Wlan';
|
|
45
|
+
/**
|
|
46
|
+
* Returns true if the given object is an instance of Wlan. This is designed to work even
|
|
47
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
48
|
+
*/
|
|
49
|
+
static isInstance(obj) {
|
|
50
|
+
if (obj === undefined || obj === null) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return obj['__pulumiType'] === Wlan.__pulumiType;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Create a Wlan resource with the given unique name, arguments, and options.
|
|
57
|
+
*
|
|
58
|
+
* @param name The _unique_ name of the resource.
|
|
59
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
60
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
61
|
+
*/
|
|
62
|
+
constructor(name, args, opts) {
|
|
63
|
+
let resourceInputs = {};
|
|
64
|
+
opts = opts || {};
|
|
65
|
+
if (!opts.id) {
|
|
66
|
+
if (args?.name === undefined && !opts.urn) {
|
|
67
|
+
throw new Error("Missing required property 'name'");
|
|
68
|
+
}
|
|
69
|
+
if (args?.networkId === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'networkId'");
|
|
71
|
+
}
|
|
72
|
+
resourceInputs["enabled"] = args?.enabled;
|
|
73
|
+
resourceInputs["hideSsid"] = args?.hideSsid;
|
|
74
|
+
resourceInputs["name"] = args?.name;
|
|
75
|
+
resourceInputs["networkId"] = args?.networkId;
|
|
76
|
+
resourceInputs["passphrase"] = args?.passphrase ? pulumi.secret(args.passphrase) : undefined;
|
|
77
|
+
resourceInputs["security"] = args?.security;
|
|
78
|
+
resourceInputs["wlanGroupId"] = args?.wlanGroupId;
|
|
79
|
+
resourceInputs["wpaMode"] = args?.wpaMode;
|
|
80
|
+
resourceInputs["wlanId"] = undefined /*out*/;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
resourceInputs["enabled"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["hideSsid"] = undefined /*out*/;
|
|
85
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
86
|
+
resourceInputs["networkId"] = undefined /*out*/;
|
|
87
|
+
resourceInputs["passphrase"] = undefined /*out*/;
|
|
88
|
+
resourceInputs["security"] = undefined /*out*/;
|
|
89
|
+
resourceInputs["wlanGroupId"] = undefined /*out*/;
|
|
90
|
+
resourceInputs["wlanId"] = undefined /*out*/;
|
|
91
|
+
resourceInputs["wpaMode"] = undefined /*out*/;
|
|
92
|
+
}
|
|
93
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
94
|
+
const secretOpts = { additionalSecretOutputs: ["passphrase"] };
|
|
95
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
96
|
+
super(Wlan.__pulumiType, name, resourceInputs, opts);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.Wlan = Wlan;
|
|
100
|
+
//# sourceMappingURL=wlan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wlan.js","sourceRoot":"","sources":["../../network/wlan.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;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,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;;AA9EL,oBA+EC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ryanwersal/pulumi-unifi",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"homepage": "https://github.com/ryanwersal/pulumi-unifi",
|
|
5
|
+
"repository": "https://github.com/ryanwersal/pulumi-unifi",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/node": "^20",
|
|
15
|
+
"typescript": "^4.7.0"
|
|
16
|
+
},
|
|
17
|
+
"pulumi": {
|
|
18
|
+
"resource": true,
|
|
19
|
+
"name": "unifi",
|
|
20
|
+
"version": "0.0.1",
|
|
21
|
+
"server": "github://api.github.com/ryanwersal/pulumi-unifi"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Manage settings of an existing UniFi Protect camera (adoption model; cameras are not created or deleted via the API).
|
|
4
|
+
*/
|
|
5
|
+
export declare class Camera extends pulumi.CustomResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get an existing Camera 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): Camera;
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if the given object is an instance of Camera. 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 Camera;
|
|
20
|
+
readonly cameraId: pulumi.Output<string>;
|
|
21
|
+
readonly hdrType: pulumi.Output<string | undefined>;
|
|
22
|
+
readonly ledEnabled: pulumi.Output<boolean | undefined>;
|
|
23
|
+
readonly micVolume: pulumi.Output<number | undefined>;
|
|
24
|
+
readonly name: pulumi.Output<string | undefined>;
|
|
25
|
+
readonly state: pulumi.Output<string>;
|
|
26
|
+
readonly type: pulumi.Output<string>;
|
|
27
|
+
readonly videoMode: pulumi.Output<string | undefined>;
|
|
28
|
+
/**
|
|
29
|
+
* Create a Camera resource with the given unique name, arguments, and options.
|
|
30
|
+
*
|
|
31
|
+
* @param name The _unique_ name of the resource.
|
|
32
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
33
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
34
|
+
*/
|
|
35
|
+
constructor(name: string, args: CameraArgs, opts?: pulumi.CustomResourceOptions);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The set of arguments for constructing a Camera resource.
|
|
39
|
+
*/
|
|
40
|
+
export interface CameraArgs {
|
|
41
|
+
cameraId: pulumi.Input<string>;
|
|
42
|
+
hdrType?: pulumi.Input<string | undefined>;
|
|
43
|
+
ledEnabled?: pulumi.Input<boolean | undefined>;
|
|
44
|
+
micVolume?: pulumi.Input<number | undefined>;
|
|
45
|
+
name?: pulumi.Input<string | undefined>;
|
|
46
|
+
videoMode?: pulumi.Input<string | undefined>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=camera.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../protect/camera.ts"],"names":[],"m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M,GAAG,SAAS,CAAC,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1,96 @@
|
|
|
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.Camera = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Manage settings of an existing UniFi Protect camera (adoption model; cameras are not created or deleted via the API).
|
|
33
|
+
*/
|
|
34
|
+
class Camera extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Camera 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 Camera(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'unifi:protect:Camera';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Camera. 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'] === Camera.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Camera 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?.cameraId === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'cameraId'");
|
|
71
|
+
}
|
|
72
|
+
resourceInputs["cameraId"] = args?.cameraId;
|
|
73
|
+
resourceInputs["hdrType"] = args?.hdrType;
|
|
74
|
+
resourceInputs["ledEnabled"] = args?.ledEnabled;
|
|
75
|
+
resourceInputs["micVolume"] = args?.micVolume;
|
|
76
|
+
resourceInputs["name"] = args?.name;
|
|
77
|
+
resourceInputs["videoMode"] = args?.videoMode;
|
|
78
|
+
resourceInputs["state"] = undefined /*out*/;
|
|
79
|
+
resourceInputs["type"] = undefined /*out*/;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
resourceInputs["cameraId"] = undefined /*out*/;
|
|
83
|
+
resourceInputs["hdrType"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["ledEnabled"] = undefined /*out*/;
|
|
85
|
+
resourceInputs["micVolume"] = undefined /*out*/;
|
|
86
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
87
|
+
resourceInputs["state"] = undefined /*out*/;
|
|
88
|
+
resourceInputs["type"] = undefined /*out*/;
|
|
89
|
+
resourceInputs["videoMode"] = undefined /*out*/;
|
|
90
|
+
}
|
|
91
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
92
|
+
super(Camera.__pulumiType, name, resourceInputs, opts);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.Camera = Camera;
|
|
96
|
+
//# sourceMappingURL=camera.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../protect/camera.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAE1C;;GAEG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7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AC5C,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC9C;aAAM;YACH,cAAc,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC/C,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC9C,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACjD,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC3C,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC5C,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC3C,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,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;;AAtEL,wBAuEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../protect/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,MAAM,MAAM,MAAM,GAAG,OAAO,UAAU,EAAE,MAAM,CAAC;AAC/C,eAAO,MAAM,MAAM,EAAE,cAAc,UAAU,EAAE,MAAoB,CAAC"}
|
package/protect/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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.Camera = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
exports.Camera = null;
|
|
32
|
+
utilities.lazyLoad(exports, ["Camera"], () => require("./camera"));
|
|
33
|
+
const _module = {
|
|
34
|
+
version: utilities.getVersion(),
|
|
35
|
+
construct: (name, type, urn) => {
|
|
36
|
+
switch (type) {
|
|
37
|
+
case "unifi:protect:Camera":
|
|
38
|
+
return new exports.Camera(name, undefined, { urn });
|
|
39
|
+
default:
|
|
40
|
+
throw new Error(`unknown resource type ${type}`);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
pulumi.runtime.registerResourceModule("unifi", "protect", _module);
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../protect/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAK7B,QAAA,MAAM,GAAqC,IAAW,CAAC;AACpE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AAGnE,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,sBAAsB;gBACvB,OAAO,IAAI,cAAM,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACpD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA"}
|
package/provider.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export declare class Provider extends pulumi.ProviderResource {
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
5
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
6
|
+
*/
|
|
7
|
+
static isInstance(obj: any): obj is Provider;
|
|
8
|
+
/**
|
|
9
|
+
* UniFi OS local API key. Preferred for headless automation. Mutually exclusive with username/password.
|
|
10
|
+
*/
|
|
11
|
+
readonly apiKey: pulumi.Output<string | undefined>;
|
|
12
|
+
/**
|
|
13
|
+
* Local admin password.
|
|
14
|
+
*/
|
|
15
|
+
readonly password: pulumi.Output<string | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* UniFi site name (defaults to "default").
|
|
18
|
+
*/
|
|
19
|
+
readonly site: pulumi.Output<string | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Base URL of the UniFi controller, e.g. https://192.168.1.1 (omit any /api suffix).
|
|
22
|
+
*/
|
|
23
|
+
readonly url: pulumi.Output<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Local admin username. Use with password when not using an API key.
|
|
26
|
+
*/
|
|
27
|
+
readonly username: pulumi.Output<string | undefined>;
|
|
28
|
+
/**
|
|
29
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
30
|
+
*
|
|
31
|
+
* @param name The _unique_ name of the resource.
|
|
32
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
33
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
34
|
+
*/
|
|
35
|
+
constructor(name: string, args: ProviderArgs, opts?: pulumi.ResourceOptions);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The set of arguments for constructing a Provider resource.
|
|
39
|
+
*/
|
|
40
|
+
export interface ProviderArgs {
|
|
41
|
+
/**
|
|
42
|
+
* UniFi OS local API key. Preferred for headless automation. Mutually exclusive with username/password.
|
|
43
|
+
*/
|
|
44
|
+
apiKey?: pulumi.Input<string | undefined>;
|
|
45
|
+
/**
|
|
46
|
+
* Skip TLS certificate verification (for self-signed controller certs).
|
|
47
|
+
*/
|
|
48
|
+
insecureTls?: pulumi.Input<boolean | undefined>;
|
|
49
|
+
/**
|
|
50
|
+
* Local admin password.
|
|
51
|
+
*/
|
|
52
|
+
password?: pulumi.Input<string | undefined>;
|
|
53
|
+
/**
|
|
54
|
+
* UniFi site name (defaults to "default").
|
|
55
|
+
*/
|
|
56
|
+
site?: pulumi.Input<string | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Base URL of the UniFi controller, e.g. https://192.168.1.1 (omit any /api suffix).
|
|
59
|
+
*/
|
|
60
|
+
url: pulumi.Input<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Local admin username. Use with password when not using an API key.
|
|
63
|
+
*/
|
|
64
|
+
username?: pulumi.Input<string | undefined>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,qBAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,QAAQ;IAOnD;;OAEG;IACH,SAAwB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAClE;;OAEG;IACH,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpE;;OAEG;IACH,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAChE;;OAEG;IACH,SAAwB,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnD;;OAEG;IACH,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEpE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,eAAe;CAmB9E;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC/C"}
|
package/provider.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
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.Provider = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
class Provider extends pulumi.ProviderResource {
|
|
32
|
+
/** @internal */
|
|
33
|
+
static __pulumiType = 'unifi';
|
|
34
|
+
/**
|
|
35
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
36
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
37
|
+
*/
|
|
38
|
+
static isInstance(obj) {
|
|
39
|
+
if (obj === undefined || obj === null) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Create a Provider 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, args, opts) {
|
|
52
|
+
let resourceInputs = {};
|
|
53
|
+
opts = opts || {};
|
|
54
|
+
{
|
|
55
|
+
if (args?.url === undefined && !opts.urn) {
|
|
56
|
+
throw new Error("Missing required property 'url'");
|
|
57
|
+
}
|
|
58
|
+
resourceInputs["apiKey"] = args?.apiKey ? pulumi.secret(args.apiKey) : undefined;
|
|
59
|
+
resourceInputs["insecureTls"] = pulumi.output(args?.insecureTls).apply(JSON.stringify);
|
|
60
|
+
resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
|
|
61
|
+
resourceInputs["site"] = args?.site;
|
|
62
|
+
resourceInputs["url"] = args?.url;
|
|
63
|
+
resourceInputs["username"] = args?.username;
|
|
64
|
+
}
|
|
65
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
66
|
+
const secretOpts = { additionalSecretOutputs: ["apiKey", "password"] };
|
|
67
|
+
opts = pulumi.mergeOptions(opts, secretOpts);
|
|
68
|
+
super(Provider.__pulumiType, name, resourceInputs, opts);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.Provider = Provider;
|
|
72
|
+
//# sourceMappingURL=provider.js.map
|
package/provider.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IACjD,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,OAAO,CAAC;IAE9C;;;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,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC/E,CAAC;IAuBD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAkB,EAAE,IAA6B;QACvE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB;YACI,IAAI,IAAI,EAAE,GAAG,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACtC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;aACtD;YACD,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjF,cAAc,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvF,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvF,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC;YAClC,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;SAC/C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;QACvE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;;AA7DL,4BA8DC"}
|
package/utilities.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getEnv(...vars: string[]): string | undefined;
|
|
2
|
+
export declare function getEnvBoolean(...vars: string[]): boolean | undefined;
|
|
3
|
+
export declare function getEnvNumber(...vars: string[]): number | undefined;
|
|
4
|
+
export declare function getVersion(): string;
|
|
5
|
+
//# sourceMappingURL=utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":"AAOA,wBAAgB,MAAM,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAQ5D;AAED,wBAAgB,aAAa,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAapE;AAED,wBAAgB,YAAY,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CASlE;AAED,wBAAgB,UAAU,IAAI,MAAM,CAQnC"}
|
package/utilities.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
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.callAsync = exports.lazyLoad = exports.resourceOptsDefaults = exports.getVersion = exports.getEnvNumber = exports.getEnvBoolean = exports.getEnv = void 0;
|
|
29
|
+
const runtime = __importStar(require("@pulumi/pulumi/runtime"));
|
|
30
|
+
function getEnv(...vars) {
|
|
31
|
+
for (const v of vars) {
|
|
32
|
+
const value = process.env[v];
|
|
33
|
+
if (value) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
exports.getEnv = getEnv;
|
|
40
|
+
function getEnvBoolean(...vars) {
|
|
41
|
+
const s = getEnv(...vars);
|
|
42
|
+
if (s !== undefined) {
|
|
43
|
+
// NOTE: these values are taken from https://golang.org/src/strconv/atob.go?s=351:391#L1, which is what
|
|
44
|
+
// Terraform uses internally when parsing boolean values.
|
|
45
|
+
if (["1", "t", "T", "true", "TRUE", "True"].find(v => v === s) !== undefined) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
if (["0", "f", "F", "false", "FALSE", "False"].find(v => v === s) !== undefined) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
exports.getEnvBoolean = getEnvBoolean;
|
|
55
|
+
function getEnvNumber(...vars) {
|
|
56
|
+
const s = getEnv(...vars);
|
|
57
|
+
if (s !== undefined) {
|
|
58
|
+
const f = parseFloat(s);
|
|
59
|
+
if (!isNaN(f)) {
|
|
60
|
+
return f;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
exports.getEnvNumber = getEnvNumber;
|
|
66
|
+
function getVersion() {
|
|
67
|
+
let version = require('./package.json').version;
|
|
68
|
+
// Node allows for the version to be prefixed by a "v", while semver doesn't.
|
|
69
|
+
// If there is a v, strip it off.
|
|
70
|
+
if (version.indexOf('v') === 0) {
|
|
71
|
+
version = version.slice(1);
|
|
72
|
+
}
|
|
73
|
+
return version;
|
|
74
|
+
}
|
|
75
|
+
exports.getVersion = getVersion;
|
|
76
|
+
/** @internal */
|
|
77
|
+
function resourceOptsDefaults() {
|
|
78
|
+
return { version: getVersion(), pluginDownloadURL: "github://api.github.com/ryanwersal/pulumi-unifi" };
|
|
79
|
+
}
|
|
80
|
+
exports.resourceOptsDefaults = resourceOptsDefaults;
|
|
81
|
+
/** @internal */
|
|
82
|
+
function lazyLoad(exports, props, loadModule) {
|
|
83
|
+
for (let property of props) {
|
|
84
|
+
Object.defineProperty(exports, property, {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return loadModule()[property];
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.lazyLoad = lazyLoad;
|
|
93
|
+
/** @internal */
|
|
94
|
+
async function callAsync(tok, props, res, opts) {
|
|
95
|
+
const o = runtime.call(tok, props, res);
|
|
96
|
+
const value = await o.promise(true /*withUnknowns*/);
|
|
97
|
+
const isKnown = await o.isKnown;
|
|
98
|
+
const isSecret = await o.isSecret;
|
|
99
|
+
const problem = !isKnown ? "an unknown value"
|
|
100
|
+
: isSecret ? "a secret value"
|
|
101
|
+
: undefined;
|
|
102
|
+
// Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
|
|
103
|
+
if (problem) {
|
|
104
|
+
throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
|
|
105
|
+
"This is an error in the provider, please report this to the provider developer.");
|
|
106
|
+
}
|
|
107
|
+
// Extract a single property if requested.
|
|
108
|
+
if (opts && opts.property) {
|
|
109
|
+
return value[opts.property];
|
|
110
|
+
}
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
exports.callAsync = callAsync;
|
|
114
|
+
//# sourceMappingURL=utilities.js.map
|
package/utilities.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../utilities.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAGjF,gEAAkD;AAGlD,SAAgB,MAAM,CAAC,GAAG,IAAc;IACpC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;QAClB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AARD,wBAQC;AAED,SAAgB,aAAa,CAAC,GAAG,IAAc;IAC3C,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1B,IAAI,CAAC,KAAK,SAAS,EAAE;QACjB,uGAAuG;QACvG,yDAAyD;QACzD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,EAAE;YAC1E,OAAO,IAAI,CAAC;SACf;QACD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,SAAS,EAAE;YAC7E,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAbD,sCAaC;AAED,SAAgB,YAAY,CAAC,GAAG,IAAc;IAC1C,MAAM,CAAC,GAAG,MAA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