@pulumiverse/unifi 0.0.1-alpha.1664258586

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.
Files changed (102) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +56 -0
  3. package/config/index.d.ts +1 -0
  4. package/config/index.js +21 -0
  5. package/config/index.js.map +1 -0
  6. package/config/vars.d.ts +24 -0
  7. package/config/vars.js +43 -0
  8. package/config/vars.js.map +1 -0
  9. package/device.d.ts +128 -0
  10. package/device.js +91 -0
  11. package/device.js.map +1 -0
  12. package/dynamicDNS.d.ts +138 -0
  13. package/dynamicDNS.js +85 -0
  14. package/dynamicDNS.js.map +1 -0
  15. package/firewall/group.d.ts +101 -0
  16. package/firewall/group.js +78 -0
  17. package/firewall/group.js.map +1 -0
  18. package/firewall/index.d.ts +6 -0
  19. package/firewall/index.js +27 -0
  20. package/firewall/index.js.map +1 -0
  21. package/firewall/rule.d.ts +340 -0
  22. package/firewall/rule.js +133 -0
  23. package/firewall/rule.js.map +1 -0
  24. package/getApGroup.d.ts +58 -0
  25. package/getApGroup.js +36 -0
  26. package/getApGroup.js.map +1 -0
  27. package/getNetwork.d.ts +186 -0
  28. package/getNetwork.js +45 -0
  29. package/getNetwork.js.map +1 -0
  30. package/getRadiusProfile.d.ts +49 -0
  31. package/getRadiusProfile.js +27 -0
  32. package/getRadiusProfile.js.map +1 -0
  33. package/iam/getGroup.d.ts +51 -0
  34. package/iam/getGroup.js +27 -0
  35. package/iam/getGroup.js.map +1 -0
  36. package/iam/getUser.d.ts +96 -0
  37. package/iam/getUser.js +37 -0
  38. package/iam/getUser.js.map +1 -0
  39. package/iam/group.d.ts +107 -0
  40. package/iam/group.js +78 -0
  41. package/iam/group.js.map +1 -0
  42. package/iam/index.d.ts +12 -0
  43. package/iam/index.js +33 -0
  44. package/iam/index.js.map +1 -0
  45. package/iam/user.d.ts +203 -0
  46. package/iam/user.js +95 -0
  47. package/iam/user.js.map +1 -0
  48. package/index.d.ts +37 -0
  49. package/index.js +80 -0
  50. package/index.js.map +1 -0
  51. package/network.d.ts +458 -0
  52. package/network.js +162 -0
  53. package/network.js.map +1 -0
  54. package/package.json +30 -0
  55. package/package.json.bak +30 -0
  56. package/package.json.dev +30 -0
  57. package/port/forward.d.ts +165 -0
  58. package/port/forward.js +70 -0
  59. package/port/forward.js.map +1 -0
  60. package/port/getProfile.d.ts +58 -0
  61. package/port/getProfile.js +36 -0
  62. package/port/getProfile.js.map +1 -0
  63. package/port/index.d.ts +9 -0
  64. package/port/index.js +30 -0
  65. package/port/index.js.map +1 -0
  66. package/port/profile.d.ts +481 -0
  67. package/port/profile.js +142 -0
  68. package/port/profile.js.map +1 -0
  69. package/provider.d.ts +70 -0
  70. package/provider.js +50 -0
  71. package/provider.js.map +1 -0
  72. package/scripts/install-pulumi-plugin.js +21 -0
  73. package/setting/index.d.ts +6 -0
  74. package/setting/index.js +27 -0
  75. package/setting/index.js.map +1 -0
  76. package/setting/mgmt.d.ts +102 -0
  77. package/setting/mgmt.js +71 -0
  78. package/setting/mgmt.js.map +1 -0
  79. package/setting/usg.d.ts +111 -0
  80. package/setting/usg.js +62 -0
  81. package/setting/usg.js.map +1 -0
  82. package/site.d.ts +84 -0
  83. package/site.js +82 -0
  84. package/site.js.map +1 -0
  85. package/staticRoute.d.ts +148 -0
  86. package/staticRoute.js +98 -0
  87. package/staticRoute.js.map +1 -0
  88. package/types/index.d.ts +3 -0
  89. package/types/index.js +11 -0
  90. package/types/index.js.map +1 -0
  91. package/types/input.d.ts +49 -0
  92. package/types/input.js +5 -0
  93. package/types/input.js.map +1 -0
  94. package/types/output.d.ts +48 -0
  95. package/types/output.js +5 -0
  96. package/types/output.js.map +1 -0
  97. package/utilities.d.ts +4 -0
  98. package/utilities.js +69 -0
  99. package/utilities.js.map +1 -0
  100. package/wlan.d.ts +374 -0
  101. package/wlan.js +149 -0
  102. package/wlan.js.map +1 -0
package/provider.d.ts ADDED
@@ -0,0 +1,70 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * The provider type for the unifi package. By default, resources use package-wide configuration
4
+ * settings, however an explicit `Provider` instance may be created and passed during resource
5
+ * construction to achieve fine-grained programmatic control over provider settings. See the
6
+ * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
7
+ */
8
+ export declare class Provider extends pulumi.ProviderResource {
9
+ /**
10
+ * Returns true if the given object is an instance of Provider. This is designed to work even
11
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
12
+ */
13
+ static isInstance(obj: any): obj is Provider;
14
+ /**
15
+ * URL of the controller API. Can be specified with the `UNIFI_API` environment variable. You should **NOT** supply the
16
+ * path (`/api`), the SDK will discover the appropriate paths. This is to support UDM Pro style API paths as well as more
17
+ * standard controller paths.
18
+ */
19
+ readonly apiUrl: pulumi.Output<string | undefined>;
20
+ /**
21
+ * Password for the user accessing the API. Can be specified with the `UNIFI_PASSWORD` environment variable.
22
+ */
23
+ readonly password: pulumi.Output<string | undefined>;
24
+ /**
25
+ * The site in the Unifi controller this provider will manage. Can be specified with the `UNIFI_SITE` environment variable.
26
+ * Default: `default`
27
+ */
28
+ readonly site: pulumi.Output<string | undefined>;
29
+ /**
30
+ * Local user name for the Unifi controller API. Can be specified with the `UNIFI_USERNAME` environment variable.
31
+ */
32
+ readonly username: pulumi.Output<string | undefined>;
33
+ /**
34
+ * Create a Provider resource with the given unique name, arguments, and options.
35
+ *
36
+ * @param name The _unique_ name of the resource.
37
+ * @param args The arguments to use to populate this resource's properties.
38
+ * @param opts A bag of options that control this resource's behavior.
39
+ */
40
+ constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions);
41
+ }
42
+ /**
43
+ * The set of arguments for constructing a Provider resource.
44
+ */
45
+ export interface ProviderArgs {
46
+ /**
47
+ * Skip verification of TLS certificates of API requests. You may need to set this to `true` if you are using your local
48
+ * API without setting up a signed certificate. Can be specified with the `UNIFI_INSECURE` environment variable.
49
+ */
50
+ allowInsecure?: pulumi.Input<boolean>;
51
+ /**
52
+ * URL of the controller API. Can be specified with the `UNIFI_API` environment variable. You should **NOT** supply the
53
+ * path (`/api`), the SDK will discover the appropriate paths. This is to support UDM Pro style API paths as well as more
54
+ * standard controller paths.
55
+ */
56
+ apiUrl?: pulumi.Input<string>;
57
+ /**
58
+ * Password for the user accessing the API. Can be specified with the `UNIFI_PASSWORD` environment variable.
59
+ */
60
+ password?: pulumi.Input<string>;
61
+ /**
62
+ * The site in the Unifi controller this provider will manage. Can be specified with the `UNIFI_SITE` environment variable.
63
+ * Default: `default`
64
+ */
65
+ site?: pulumi.Input<string>;
66
+ /**
67
+ * Local user name for the Unifi controller API. Can be specified with the `UNIFI_USERNAME` environment variable.
68
+ */
69
+ username?: pulumi.Input<string>;
70
+ }
package/provider.js ADDED
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Provider = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * The provider type for the unifi package. By default, resources use package-wide configuration
10
+ * settings, however an explicit `Provider` instance may be created and passed during resource
11
+ * construction to achieve fine-grained programmatic control over provider settings. See the
12
+ * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
13
+ */
14
+ class Provider extends pulumi.ProviderResource {
15
+ /**
16
+ * Create a Provider resource with the given unique name, arguments, and options.
17
+ *
18
+ * @param name The _unique_ name of the resource.
19
+ * @param args The arguments to use to populate this resource's properties.
20
+ * @param opts A bag of options that control this resource's behavior.
21
+ */
22
+ constructor(name, args, opts) {
23
+ var _a, _b, _c, _d, _e;
24
+ let resourceInputs = {};
25
+ opts = opts || {};
26
+ {
27
+ resourceInputs["allowInsecure"] = pulumi.output((_a = (args ? args.allowInsecure : undefined)) !== null && _a !== void 0 ? _a : utilities.getEnvBoolean("UNIFI_INSECURE")).apply(JSON.stringify);
28
+ resourceInputs["apiUrl"] = (_b = (args ? args.apiUrl : undefined)) !== null && _b !== void 0 ? _b : utilities.getEnv("UNIFI_API");
29
+ resourceInputs["password"] = (_c = (args ? args.password : undefined)) !== null && _c !== void 0 ? _c : utilities.getEnv("UNIFI_PASSWORD");
30
+ resourceInputs["site"] = (_d = (args ? args.site : undefined)) !== null && _d !== void 0 ? _d : utilities.getEnv("UNIFI_SITE");
31
+ resourceInputs["username"] = (_e = (args ? args.username : undefined)) !== null && _e !== void 0 ? _e : utilities.getEnv("UNIFI_USERNAME");
32
+ }
33
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
34
+ super(Provider.__pulumiType, name, resourceInputs, opts);
35
+ }
36
+ /**
37
+ * Returns true if the given object is an instance of Provider. This is designed to work even
38
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
39
+ */
40
+ static isInstance(obj) {
41
+ if (obj === undefined || obj === null) {
42
+ return false;
43
+ }
44
+ return obj['__pulumiType'] === Provider.__pulumiType;
45
+ }
46
+ }
47
+ exports.Provider = Provider;
48
+ /** @internal */
49
+ Provider.__pulumiType = 'unifi';
50
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;GAKG;AACH,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAmCjD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAmB,EAAE,IAA6B;;QACxE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB;YACI,cAAc,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAA,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa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,CAAC;;AAbL,4BAuDC;AAtDG,gBAAgB;AACO,qBAAY,GAAG,OAAO,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var childProcess = require("child_process");
3
+
4
+ var args = process.argv.slice(2);
5
+ var res = childProcess.spawnSync("pulumi", ["plugin", "install"].concat(args), {
6
+ stdio: ["ignore", "inherit", "inherit"]
7
+ });
8
+
9
+ if (res.error && res.error.code === "ENOENT") {
10
+ console.error("\nThere was an error installing the resource provider plugin. " +
11
+ "It looks like `pulumi` is not installed on your system. " +
12
+ "Please visit https://pulumi.com/ to install the Pulumi CLI.\n" +
13
+ "You may try manually installing the plugin by running " +
14
+ "`pulumi plugin install " + args.join(" ") + "`");
15
+ } else if (res.error || res.status !== 0) {
16
+ console.error("\nThere was an error installing the resource provider plugin. " +
17
+ "You may try to manually installing the plugin by running " +
18
+ "`pulumi plugin install " + args.join(" ") + "`");
19
+ }
20
+
21
+ process.exit(0);
@@ -0,0 +1,6 @@
1
+ export { MgmtArgs, MgmtState } from "./mgmt";
2
+ export declare type Mgmt = import("./mgmt").Mgmt;
3
+ export declare const Mgmt: typeof import("./mgmt").Mgmt;
4
+ export { USGArgs, USGState } from "./usg";
5
+ export declare type USG = import("./usg").USG;
6
+ export declare const USG: typeof import("./usg").USG;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.USG = exports.Mgmt = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ exports.Mgmt = null;
9
+ exports.USG = null;
10
+ utilities.lazyLoad(exports, ["Mgmt"], () => require("./mgmt"));
11
+ utilities.lazyLoad(exports, ["USG"], () => require("./usg"));
12
+ const _module = {
13
+ version: utilities.getVersion(),
14
+ construct: (name, type, urn) => {
15
+ switch (type) {
16
+ case "unifi:setting/mgmt:Mgmt":
17
+ return new exports.Mgmt(name, undefined, { urn });
18
+ case "unifi:setting/uSG:USG":
19
+ return new exports.USG(name, undefined, { urn });
20
+ default:
21
+ throw new Error(`unknown resource type ${type}`);
22
+ }
23
+ },
24
+ };
25
+ pulumi.runtime.registerResourceModule("unifi", "setting/mgmt", _module);
26
+ pulumi.runtime.registerResourceModule("unifi", "setting/uSG", _module);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../setting/index.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAK7B,QAAA,IAAI,GAAiC,IAAW,CAAC;AAIjD,QAAA,GAAG,GAA+B,IAAW,CAAC;AAE3D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC/D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAE7D,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,yBAAyB;gBAC1B,OAAO,IAAI,YAAI,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YAClD,KAAK,uBAAuB;gBACxB,OAAO,IAAI,WAAG,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACjD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;AACvE,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAA"}
@@ -0,0 +1,102 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ /**
5
+ * `unifi.setting.Mgmt` manages settings for a unifi site.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as unifi from "@pulumiverse/unifi";
12
+ *
13
+ * const exampleSite = new unifi.Site("exampleSite", {description: "example"});
14
+ * const exampleMgmt = new unifi.setting.Mgmt("exampleMgmt", {
15
+ * site: exampleSite.name,
16
+ * autoUpgrade: true,
17
+ * });
18
+ * ```
19
+ */
20
+ export declare class Mgmt extends pulumi.CustomResource {
21
+ /**
22
+ * Get an existing Mgmt resource's state with the given name, ID, and optional extra
23
+ * properties used to qualify the lookup.
24
+ *
25
+ * @param name The _unique_ name of the resulting resource.
26
+ * @param id The _unique_ provider ID of the resource to lookup.
27
+ * @param state Any extra arguments used during the lookup.
28
+ * @param opts Optional settings to control the behavior of the CustomResource.
29
+ */
30
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MgmtState, opts?: pulumi.CustomResourceOptions): Mgmt;
31
+ /**
32
+ * Returns true if the given object is an instance of Mgmt. This is designed to work even
33
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
34
+ */
35
+ static isInstance(obj: any): obj is Mgmt;
36
+ /**
37
+ * Automatically upgrade device firmware.
38
+ */
39
+ readonly autoUpgrade: pulumi.Output<boolean | undefined>;
40
+ /**
41
+ * The name of the site to associate the settings with.
42
+ */
43
+ readonly site: pulumi.Output<string>;
44
+ /**
45
+ * Enable SSH authentication.
46
+ */
47
+ readonly sshEnabled: pulumi.Output<boolean | undefined>;
48
+ /**
49
+ * SSH key.
50
+ */
51
+ readonly sshKeys: pulumi.Output<outputs.setting.MgmtSshKey[] | undefined>;
52
+ /**
53
+ * Create a Mgmt resource with the given unique name, arguments, and options.
54
+ *
55
+ * @param name The _unique_ name of the resource.
56
+ * @param args The arguments to use to populate this resource's properties.
57
+ * @param opts A bag of options that control this resource's behavior.
58
+ */
59
+ constructor(name: string, args?: MgmtArgs, opts?: pulumi.CustomResourceOptions);
60
+ }
61
+ /**
62
+ * Input properties used for looking up and filtering Mgmt resources.
63
+ */
64
+ export interface MgmtState {
65
+ /**
66
+ * Automatically upgrade device firmware.
67
+ */
68
+ autoUpgrade?: pulumi.Input<boolean>;
69
+ /**
70
+ * The name of the site to associate the settings with.
71
+ */
72
+ site?: pulumi.Input<string>;
73
+ /**
74
+ * Enable SSH authentication.
75
+ */
76
+ sshEnabled?: pulumi.Input<boolean>;
77
+ /**
78
+ * SSH key.
79
+ */
80
+ sshKeys?: pulumi.Input<pulumi.Input<inputs.setting.MgmtSshKey>[]>;
81
+ }
82
+ /**
83
+ * The set of arguments for constructing a Mgmt resource.
84
+ */
85
+ export interface MgmtArgs {
86
+ /**
87
+ * Automatically upgrade device firmware.
88
+ */
89
+ autoUpgrade?: pulumi.Input<boolean>;
90
+ /**
91
+ * The name of the site to associate the settings with.
92
+ */
93
+ site?: pulumi.Input<string>;
94
+ /**
95
+ * Enable SSH authentication.
96
+ */
97
+ sshEnabled?: pulumi.Input<boolean>;
98
+ /**
99
+ * SSH key.
100
+ */
101
+ sshKeys?: pulumi.Input<pulumi.Input<inputs.setting.MgmtSshKey>[]>;
102
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Mgmt = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * `unifi.setting.Mgmt` manages settings for a unifi site.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as unifi from "@pulumiverse/unifi";
16
+ *
17
+ * const exampleSite = new unifi.Site("exampleSite", {description: "example"});
18
+ * const exampleMgmt = new unifi.setting.Mgmt("exampleMgmt", {
19
+ * site: exampleSite.name,
20
+ * autoUpgrade: true,
21
+ * });
22
+ * ```
23
+ */
24
+ class Mgmt extends pulumi.CustomResource {
25
+ constructor(name, argsOrState, opts) {
26
+ let resourceInputs = {};
27
+ opts = opts || {};
28
+ if (opts.id) {
29
+ const state = argsOrState;
30
+ resourceInputs["autoUpgrade"] = state ? state.autoUpgrade : undefined;
31
+ resourceInputs["site"] = state ? state.site : undefined;
32
+ resourceInputs["sshEnabled"] = state ? state.sshEnabled : undefined;
33
+ resourceInputs["sshKeys"] = state ? state.sshKeys : undefined;
34
+ }
35
+ else {
36
+ const args = argsOrState;
37
+ resourceInputs["autoUpgrade"] = args ? args.autoUpgrade : undefined;
38
+ resourceInputs["site"] = args ? args.site : undefined;
39
+ resourceInputs["sshEnabled"] = args ? args.sshEnabled : undefined;
40
+ resourceInputs["sshKeys"] = args ? args.sshKeys : undefined;
41
+ }
42
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
43
+ super(Mgmt.__pulumiType, name, resourceInputs, opts);
44
+ }
45
+ /**
46
+ * Get an existing Mgmt resource's state with the given name, ID, and optional extra
47
+ * properties used to qualify the lookup.
48
+ *
49
+ * @param name The _unique_ name of the resulting resource.
50
+ * @param id The _unique_ provider ID of the resource to lookup.
51
+ * @param state Any extra arguments used during the lookup.
52
+ * @param opts Optional settings to control the behavior of the CustomResource.
53
+ */
54
+ static get(name, id, state, opts) {
55
+ return new Mgmt(name, state, Object.assign(Object.assign({}, opts), { id: id }));
56
+ }
57
+ /**
58
+ * Returns true if the given object is an instance of Mgmt. This is designed to work even
59
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
60
+ */
61
+ static isInstance(obj) {
62
+ if (obj === undefined || obj === null) {
63
+ return false;
64
+ }
65
+ return obj['__pulumiType'] === Mgmt.__pulumiType;
66
+ }
67
+ }
68
+ exports.Mgmt = Mgmt;
69
+ /** @internal */
70
+ Mgmt.__pulumiType = 'unifi:setting/mgmt:Mgmt';
71
+ //# sourceMappingURL=mgmt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mgmt.js","sourceRoot":"","sources":["../../setting/mgmt.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAqD3C,YAAY,IAAY,EAAE,WAAkC,EAAE,IAAmC;QAC7F,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAoC,CAAC;YACnD,cAAc,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACtE,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,cAAc,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;SACjE;aAAM;YACH,MAAM,IAAI,GAAG,WAAmC,CAAC;YACjD,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;SAC/D;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;IAtED;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAiB,EAAE,IAAmC;QAC/G,OAAO,IAAI,IAAI,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC3D,CAAC;IAKD;;;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;IACrD,CAAC;;AA1BL,oBAwEC;AA1DG,gBAAgB;AACO,iBAAY,GAAG,yBAAyB,CAAC"}
@@ -0,0 +1,111 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * `unifi.setting.USG` manages settings for a Unifi Security Gateway.
4
+ */
5
+ export declare class USG extends pulumi.CustomResource {
6
+ /**
7
+ * Get an existing USG 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 state Any extra arguments used during the lookup.
13
+ * @param opts Optional settings to control the behavior of the CustomResource.
14
+ */
15
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: USGState, opts?: pulumi.CustomResourceOptions): USG;
16
+ /**
17
+ * Returns true if the given object is an instance of USG. 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 USG;
21
+ /**
22
+ * The DHCP relay servers.
23
+ */
24
+ readonly dhcpRelayServers: pulumi.Output<string[]>;
25
+ /**
26
+ * Whether the guest firewall log is enabled.
27
+ */
28
+ readonly firewallGuestDefaultLog: pulumi.Output<boolean>;
29
+ /**
30
+ * Whether the LAN firewall log is enabled.
31
+ */
32
+ readonly firewallLanDefaultLog: pulumi.Output<boolean>;
33
+ /**
34
+ * Whether the WAN firewall log is enabled.
35
+ */
36
+ readonly firewallWanDefaultLog: pulumi.Output<boolean>;
37
+ /**
38
+ * Whether multicast DNS is enabled.
39
+ */
40
+ readonly multicastDnsEnabled: pulumi.Output<boolean>;
41
+ /**
42
+ * The name of the site to associate the settings with.
43
+ */
44
+ readonly site: pulumi.Output<string>;
45
+ /**
46
+ * Create a USG resource with the given unique name, arguments, and options.
47
+ *
48
+ * @param name The _unique_ name of the resource.
49
+ * @param args The arguments to use to populate this resource's properties.
50
+ * @param opts A bag of options that control this resource's behavior.
51
+ */
52
+ constructor(name: string, args?: USGArgs, opts?: pulumi.CustomResourceOptions);
53
+ }
54
+ /**
55
+ * Input properties used for looking up and filtering USG resources.
56
+ */
57
+ export interface USGState {
58
+ /**
59
+ * The DHCP relay servers.
60
+ */
61
+ dhcpRelayServers?: pulumi.Input<pulumi.Input<string>[]>;
62
+ /**
63
+ * Whether the guest firewall log is enabled.
64
+ */
65
+ firewallGuestDefaultLog?: pulumi.Input<boolean>;
66
+ /**
67
+ * Whether the LAN firewall log is enabled.
68
+ */
69
+ firewallLanDefaultLog?: pulumi.Input<boolean>;
70
+ /**
71
+ * Whether the WAN firewall log is enabled.
72
+ */
73
+ firewallWanDefaultLog?: pulumi.Input<boolean>;
74
+ /**
75
+ * Whether multicast DNS is enabled.
76
+ */
77
+ multicastDnsEnabled?: pulumi.Input<boolean>;
78
+ /**
79
+ * The name of the site to associate the settings with.
80
+ */
81
+ site?: pulumi.Input<string>;
82
+ }
83
+ /**
84
+ * The set of arguments for constructing a USG resource.
85
+ */
86
+ export interface USGArgs {
87
+ /**
88
+ * The DHCP relay servers.
89
+ */
90
+ dhcpRelayServers?: pulumi.Input<pulumi.Input<string>[]>;
91
+ /**
92
+ * Whether the guest firewall log is enabled.
93
+ */
94
+ firewallGuestDefaultLog?: pulumi.Input<boolean>;
95
+ /**
96
+ * Whether the LAN firewall log is enabled.
97
+ */
98
+ firewallLanDefaultLog?: pulumi.Input<boolean>;
99
+ /**
100
+ * Whether the WAN firewall log is enabled.
101
+ */
102
+ firewallWanDefaultLog?: pulumi.Input<boolean>;
103
+ /**
104
+ * Whether multicast DNS is enabled.
105
+ */
106
+ multicastDnsEnabled?: pulumi.Input<boolean>;
107
+ /**
108
+ * The name of the site to associate the settings with.
109
+ */
110
+ site?: pulumi.Input<string>;
111
+ }
package/setting/usg.js ADDED
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.USG = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * `unifi.setting.USG` manages settings for a Unifi Security Gateway.
10
+ */
11
+ class USG extends pulumi.CustomResource {
12
+ constructor(name, argsOrState, opts) {
13
+ let resourceInputs = {};
14
+ opts = opts || {};
15
+ if (opts.id) {
16
+ const state = argsOrState;
17
+ resourceInputs["dhcpRelayServers"] = state ? state.dhcpRelayServers : undefined;
18
+ resourceInputs["firewallGuestDefaultLog"] = state ? state.firewallGuestDefaultLog : undefined;
19
+ resourceInputs["firewallLanDefaultLog"] = state ? state.firewallLanDefaultLog : undefined;
20
+ resourceInputs["firewallWanDefaultLog"] = state ? state.firewallWanDefaultLog : undefined;
21
+ resourceInputs["multicastDnsEnabled"] = state ? state.multicastDnsEnabled : undefined;
22
+ resourceInputs["site"] = state ? state.site : undefined;
23
+ }
24
+ else {
25
+ const args = argsOrState;
26
+ resourceInputs["dhcpRelayServers"] = args ? args.dhcpRelayServers : undefined;
27
+ resourceInputs["firewallGuestDefaultLog"] = args ? args.firewallGuestDefaultLog : undefined;
28
+ resourceInputs["firewallLanDefaultLog"] = args ? args.firewallLanDefaultLog : undefined;
29
+ resourceInputs["firewallWanDefaultLog"] = args ? args.firewallWanDefaultLog : undefined;
30
+ resourceInputs["multicastDnsEnabled"] = args ? args.multicastDnsEnabled : undefined;
31
+ resourceInputs["site"] = args ? args.site : undefined;
32
+ }
33
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
34
+ super(USG.__pulumiType, name, resourceInputs, opts);
35
+ }
36
+ /**
37
+ * Get an existing USG resource's state with the given name, ID, and optional extra
38
+ * properties used to qualify the lookup.
39
+ *
40
+ * @param name The _unique_ name of the resulting resource.
41
+ * @param id The _unique_ provider ID of the resource to lookup.
42
+ * @param state Any extra arguments used during the lookup.
43
+ * @param opts Optional settings to control the behavior of the CustomResource.
44
+ */
45
+ static get(name, id, state, opts) {
46
+ return new USG(name, state, Object.assign(Object.assign({}, opts), { id: id }));
47
+ }
48
+ /**
49
+ * Returns true if the given object is an instance of USG. 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'] === USG.__pulumiType;
57
+ }
58
+ }
59
+ exports.USG = USG;
60
+ /** @internal */
61
+ USG.__pulumiType = 'unifi:setting/uSG:USG';
62
+ //# sourceMappingURL=usg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usg.js","sourceRoot":"","sources":["../../setting/usg.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C;;GAEG;AACH,MAAa,GAAI,SAAQ,MAAM,CAAC,cAAc;IA6D1C,YAAY,IAAY,EAAE,WAAgC,EAAE,IAAmC;QAC3F,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAmC,CAAC;YAClD,cAAc,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;YAChF,cAAc,CAAC,yBAAyB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9F,cAAc,CAAC,uBAAuB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1F,cAAc,CAAC,uBAAuB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1F,cAAc,CAAC,qBAAqB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;YACtF,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;SAC3D;aAAM;YACH,MAAM,IAAI,GAAG,WAAkC,CAAC;YAChD,cAAc,CAAC,kBAAkB,CAA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AAG,CAAC,YAAY,CAAC;IACpD,CAAC;;AA1BL,kBAoFC;AAtEG,gBAAgB;AACO,gBAAY,GAAG,uBAAuB,CAAC"}
package/site.d.ts ADDED
@@ -0,0 +1,84 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * `unifi.Site` manages Unifi sites
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as unifi from "@pulumi/unifi";
10
+ *
11
+ * const mysite = new unifi.Site("mysite", {
12
+ * description: "mysite",
13
+ * });
14
+ * ```
15
+ *
16
+ * ## Import
17
+ *
18
+ * # import using the API/UI ID
19
+ *
20
+ * ```sh
21
+ * $ pulumi import unifi:index/site:Site mysite 5fe6261995fe130013456a36
22
+ * ```
23
+ *
24
+ * # import using the name (short ID)
25
+ *
26
+ * ```sh
27
+ * $ pulumi import unifi:index/site:Site mysite vq98kwez
28
+ * ```
29
+ */
30
+ export declare class Site extends pulumi.CustomResource {
31
+ /**
32
+ * Get an existing Site resource's state with the given name, ID, and optional extra
33
+ * properties used to qualify the lookup.
34
+ *
35
+ * @param name The _unique_ name of the resulting resource.
36
+ * @param id The _unique_ provider ID of the resource to lookup.
37
+ * @param state Any extra arguments used during the lookup.
38
+ * @param opts Optional settings to control the behavior of the CustomResource.
39
+ */
40
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SiteState, opts?: pulumi.CustomResourceOptions): Site;
41
+ /**
42
+ * Returns true if the given object is an instance of Site. This is designed to work even
43
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
44
+ */
45
+ static isInstance(obj: any): obj is Site;
46
+ /**
47
+ * The description of the site.
48
+ */
49
+ readonly description: pulumi.Output<string>;
50
+ /**
51
+ * The name of the site.
52
+ */
53
+ readonly name: pulumi.Output<string>;
54
+ /**
55
+ * Create a Site resource with the given unique name, arguments, and options.
56
+ *
57
+ * @param name The _unique_ name of the resource.
58
+ * @param args The arguments to use to populate this resource's properties.
59
+ * @param opts A bag of options that control this resource's behavior.
60
+ */
61
+ constructor(name: string, args: SiteArgs, opts?: pulumi.CustomResourceOptions);
62
+ }
63
+ /**
64
+ * Input properties used for looking up and filtering Site resources.
65
+ */
66
+ export interface SiteState {
67
+ /**
68
+ * The description of the site.
69
+ */
70
+ description?: pulumi.Input<string>;
71
+ /**
72
+ * The name of the site.
73
+ */
74
+ name?: pulumi.Input<string>;
75
+ }
76
+ /**
77
+ * The set of arguments for constructing a Site resource.
78
+ */
79
+ export interface SiteArgs {
80
+ /**
81
+ * The description of the site.
82
+ */
83
+ description: pulumi.Input<string>;
84
+ }