@ryanwersal/pulumi-unifi 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/config/vars.d.ts +1 -1
- package/config/vars.d.ts.map +1 -1
- package/config/vars.js +7 -6
- package/config/vars.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/network/device.d.ts +176 -0
- package/network/device.d.ts.map +1 -0
- package/network/device.js +122 -0
- package/network/device.js.map +1 -0
- package/network/dnsRecord.d.ts +103 -0
- package/network/dnsRecord.d.ts.map +1 -0
- package/network/dnsRecord.js +104 -0
- package/network/dnsRecord.js.map +1 -0
- package/network/firewallGroup.d.ts +63 -0
- package/network/firewallGroup.d.ts.map +1 -0
- package/network/firewallGroup.js +88 -0
- package/network/firewallGroup.js.map +1 -0
- package/network/firewallRule.d.ts +137 -0
- package/network/firewallRule.d.ts.map +1 -0
- package/network/firewallRule.js +109 -0
- package/network/firewallRule.js.map +1 -0
- package/network/firewallZonePolicy.d.ts +129 -0
- package/network/firewallZonePolicy.d.ts.map +1 -0
- package/network/firewallZonePolicy.js +113 -0
- package/network/firewallZonePolicy.js.map +1 -0
- package/network/index.d.ts +31 -0
- package/network/index.d.ts.map +1 -1
- package/network/index.js +46 -1
- package/network/index.js.map +1 -1
- package/network/portForward.d.ts +153 -0
- package/network/portForward.d.ts.map +1 -0
- package/network/portForward.js +107 -0
- package/network/portForward.js.map +1 -0
- package/network/portProfile.d.ts +161 -0
- package/network/portProfile.d.ts.map +1 -0
- package/network/portProfile.js +112 -0
- package/network/portProfile.js.map +1 -0
- package/network/staticRoute.d.ts +111 -0
- package/network/staticRoute.d.ts.map +1 -0
- package/network/staticRoute.js +106 -0
- package/network/staticRoute.js.map +1 -0
- package/network/user.d.ts +170 -0
- package/network/user.d.ts.map +1 -0
- package/network/user.js +120 -0
- package/network/user.js.map +1 -0
- package/network/userGroup.d.ts +62 -0
- package/network/userGroup.d.ts.map +1 -0
- package/network/userGroup.js +88 -0
- package/network/userGroup.js.map +1 -0
- package/network/vlan.d.ts +199 -9
- package/network/vlan.d.ts.map +1 -1
- package/network/vlan.js +43 -9
- package/network/vlan.js.map +1 -1
- package/network/wlan.d.ts +245 -4
- package/network/wlan.d.ts.map +1 -1
- package/network/wlan.js +53 -4
- package/network/wlan.js.map +1 -1
- package/package.json +8 -2
- package/protect/alarmAutomation.d.ts +88 -0
- package/protect/alarmAutomation.d.ts.map +1 -0
- package/protect/alarmAutomation.js +100 -0
- package/protect/alarmAutomation.js.map +1 -0
- package/protect/camera.d.ts +115 -1
- package/protect/camera.d.ts.map +1 -1
- package/protect/camera.js +21 -1
- package/protect/camera.js.map +1 -1
- package/protect/index.d.ts +3 -0
- package/protect/index.d.ts.map +1 -1
- package/protect/index.js +5 -1
- package/protect/index.js.map +1 -1
- package/provider.d.ts +3 -3
- package/provider.d.ts.map +1 -1
- package/provider.js +6 -9
- package/provider.js.map +1 -1
- package/types/enums/index.d.ts +3 -0
- package/types/enums/index.d.ts.map +1 -0
- package/types/enums/index.js +32 -0
- package/types/enums/index.js.map +1 -0
- package/types/enums/network/index.d.ts +1133 -0
- package/types/enums/network/index.d.ts.map +1 -0
- package/types/enums/network/index.js +1067 -0
- package/types/enums/network/index.js.map +1 -0
- package/types/index.d.ts +5 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +36 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +1680 -0
- package/types/input.d.ts.map +1 -0
- package/types/input.js +41 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +1679 -0
- package/types/output.d.ts.map +1 -0
- package/types/output.js +41 -0
- package/types/output.js.map +1 -0
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
A Pulumi provider for managing a Ubiquiti UniFi Dream Machine's Network and Protect applications via the local controller API.
|
package/config/vars.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const password: string | undefined;
|
|
|
13
13
|
/**
|
|
14
14
|
* UniFi site name (defaults to "default").
|
|
15
15
|
*/
|
|
16
|
-
export declare const site: string
|
|
16
|
+
export declare const site: string;
|
|
17
17
|
/**
|
|
18
18
|
* Base URL of the UniFi controller, e.g. https://192.168.1.1 (omit any /api suffix).
|
|
19
19
|
*/
|
package/config/vars.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;AAQhD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;AAQtD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;AAQlD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"vars.d.ts","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;AAQhD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;AAQtD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;AAQlD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,CAAC;AAQlC;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;AAQ7C;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC"}
|
package/config/vars.js
CHANGED
|
@@ -26,40 +26,41 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
29
|
+
const utilities = __importStar(require("../utilities"));
|
|
29
30
|
const __config = new pulumi.Config("unifi");
|
|
30
31
|
Object.defineProperty(exports, "apiKey", {
|
|
31
32
|
get() {
|
|
32
|
-
return __config.get("apiKey");
|
|
33
|
+
return __config.get("apiKey") ?? utilities.getEnv("UNIFI_API_KEY");
|
|
33
34
|
},
|
|
34
35
|
enumerable: true,
|
|
35
36
|
});
|
|
36
37
|
Object.defineProperty(exports, "insecureTls", {
|
|
37
38
|
get() {
|
|
38
|
-
return __config.getObject("insecureTls");
|
|
39
|
+
return __config.getObject("insecureTls") ?? utilities.getEnvBoolean("UNIFI_INSECURE_TLS");
|
|
39
40
|
},
|
|
40
41
|
enumerable: true,
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(exports, "password", {
|
|
43
44
|
get() {
|
|
44
|
-
return __config.get("password");
|
|
45
|
+
return __config.get("password") ?? utilities.getEnv("UNIFI_PASSWORD");
|
|
45
46
|
},
|
|
46
47
|
enumerable: true,
|
|
47
48
|
});
|
|
48
49
|
Object.defineProperty(exports, "site", {
|
|
49
50
|
get() {
|
|
50
|
-
return __config.get("site");
|
|
51
|
+
return __config.get("site") ?? (utilities.getEnv("UNIFI_SITE") || "default");
|
|
51
52
|
},
|
|
52
53
|
enumerable: true,
|
|
53
54
|
});
|
|
54
55
|
Object.defineProperty(exports, "url", {
|
|
55
56
|
get() {
|
|
56
|
-
return __config.get("url");
|
|
57
|
+
return __config.get("url") ?? utilities.getEnv("UNIFI_URL");
|
|
57
58
|
},
|
|
58
59
|
enumerable: true,
|
|
59
60
|
});
|
|
60
61
|
Object.defineProperty(exports, "username", {
|
|
61
62
|
get() {
|
|
62
|
-
return __config.get("username");
|
|
63
|
+
return __config.get("username") ?? utilities.getEnv("UNIFI_USERNAME");
|
|
63
64
|
},
|
|
64
65
|
enumerable: true,
|
|
65
66
|
});
|
package/config/vars.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;
|
|
1
|
+
{"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,wDAA0C;AAG1C,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAM5C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE;IACrC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACvE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE;IAC1C,GAAG;QACC,OAAO,QAAQ,CAAC,SAAS,CAAU,aAAa,CAAC,IAAI,SAAS,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACvG,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;IACvC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC1E,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE;IACnC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,CAAC;IACjF,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE;IAClC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAChE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;IACvC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC1E,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export declare const Provider: typeof import("./provider").Provider;
|
|
|
4
4
|
import * as config from "./config";
|
|
5
5
|
import * as network from "./network";
|
|
6
6
|
import * as protect from "./protect";
|
|
7
|
-
|
|
7
|
+
import * as types from "./types";
|
|
8
|
+
export { config, network, protect, types, };
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,MAAM,MAAM,QAAQ,GAAG,OAAO,YAAY,EAAE,QAAQ,CAAC;AACrD,eAAO,MAAM,QAAQ,EAAE,cAAc,YAAY,EAAE,QAAsB,CAAC;AAK1E,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,MAAM,MAAM,QAAQ,GAAG,OAAO,YAAY,EAAE,QAAQ,CAAC;AACrD,eAAO,MAAM,QAAQ,EAAE,cAAc,YAAY,EAAE,QAAsB,CAAC;AAK1E,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACH,MAAM,EACN,OAAO,EACP,OAAO,EACP,KAAK,GACR,CAAC"}
|
package/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
return result;
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.protect = exports.network = exports.config = exports.Provider = void 0;
|
|
28
|
+
exports.types = exports.protect = exports.network = exports.config = exports.Provider = void 0;
|
|
29
29
|
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
30
|
const utilities = __importStar(require("./utilities"));
|
|
31
31
|
exports.Provider = null;
|
|
@@ -37,6 +37,8 @@ const network = __importStar(require("./network"));
|
|
|
37
37
|
exports.network = network;
|
|
38
38
|
const protect = __importStar(require("./protect"));
|
|
39
39
|
exports.protect = protect;
|
|
40
|
+
const types = __importStar(require("./types"));
|
|
41
|
+
exports.types = types;
|
|
40
42
|
pulumi.runtime.registerResourcePackage("unifi", {
|
|
41
43
|
version: utilities.getVersion(),
|
|
42
44
|
constructProvider: (name, type, urn) => {
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAK5B,QAAA,QAAQ,GAAyC,IAAW,CAAC;AAC1E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;AAGvE,sBAAsB;AACtB,iDAAmC;
|
|
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;AAM/B,wBAAM;AALV,mDAAqC;AAMjC,0BAAO;AALX,mDAAqC;AAMjC,0BAAO;AALX,+CAAiC;AAM7B,sBAAK;AAET,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,176 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../types/input";
|
|
3
|
+
import * as outputs from "../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manage settings of an existing, already-adopted UniFi network device (gateway, switch, access point, PDU). Adoption model: binds to a device by MAC and read-modify-writes only the managed fields onto the controller's current device object; unmanaged settings and unlisted port/outlet/radio overrides are preserved. Delete is a no-op.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Device extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing Device resource's state with the given name, ID, and optional extra
|
|
10
|
+
* properties used to qualify the lookup.
|
|
11
|
+
*
|
|
12
|
+
* @param name The _unique_ name of the resulting resource.
|
|
13
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
14
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
15
|
+
*/
|
|
16
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Device;
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if the given object is an instance of Device. This is designed to work even
|
|
19
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
20
|
+
*/
|
|
21
|
+
static isInstance(obj: any): obj is Device;
|
|
22
|
+
/**
|
|
23
|
+
* Adopted indicates whether the controller has adopted the device (read-only).
|
|
24
|
+
*/
|
|
25
|
+
readonly adopted: pulumi.Output<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* DeviceId is the controller-assigned identifier (the UniFi `_id`).
|
|
28
|
+
*/
|
|
29
|
+
readonly deviceId: pulumi.Output<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Disabled administratively disables the device.
|
|
32
|
+
*/
|
|
33
|
+
readonly disabled: pulumi.Output<boolean | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Dot1x groups the switch-wide 802.1X settings.
|
|
36
|
+
*/
|
|
37
|
+
readonly dot1x: pulumi.Output<outputs.network.DeviceDot1x | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* EthernetOverrides assigns network groups to physical ethernet ports (gateways).
|
|
40
|
+
*/
|
|
41
|
+
readonly ethernetOverrides: pulumi.Output<outputs.network.DeviceEthernetOverride[] | undefined>;
|
|
42
|
+
/**
|
|
43
|
+
* Lcm groups the front LCD/touchscreen display settings.
|
|
44
|
+
*/
|
|
45
|
+
readonly lcm: pulumi.Output<outputs.network.DeviceLcm | undefined>;
|
|
46
|
+
/**
|
|
47
|
+
* Led groups the status-LED indicator settings.
|
|
48
|
+
*/
|
|
49
|
+
readonly led: pulumi.Output<outputs.network.DeviceLed | undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* Mac is the device MAC address (required). The device must already be adopted on the controller.
|
|
52
|
+
*/
|
|
53
|
+
readonly mac: pulumi.Output<string>;
|
|
54
|
+
/**
|
|
55
|
+
* MgmtNetworkId pins the device's management network (the network's `_id`).
|
|
56
|
+
*/
|
|
57
|
+
readonly mgmtNetworkId: pulumi.Output<string | undefined>;
|
|
58
|
+
/**
|
|
59
|
+
* Model is the device model code, e.g. "USPRPS" or "U6-Enterprise" (read-only).
|
|
60
|
+
*/
|
|
61
|
+
readonly model: pulumi.Output<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Name is the device's display name.
|
|
64
|
+
*/
|
|
65
|
+
readonly name: pulumi.Output<string | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* Outlet groups the PDU outlet settings.
|
|
68
|
+
*/
|
|
69
|
+
readonly outlet: pulumi.Output<outputs.network.DeviceOutlet | undefined>;
|
|
70
|
+
/**
|
|
71
|
+
* PortOverrides configures individual switch ports (the centerpiece for switches).
|
|
72
|
+
*/
|
|
73
|
+
readonly portOverrides: pulumi.Output<outputs.network.DevicePortOverride[] | undefined>;
|
|
74
|
+
/**
|
|
75
|
+
* RadioTable tunes individual access-point radios.
|
|
76
|
+
*/
|
|
77
|
+
readonly radioTable: pulumi.Output<outputs.network.DeviceRadioOverride[] | undefined>;
|
|
78
|
+
/**
|
|
79
|
+
* Snmp groups the SNMP agent strings.
|
|
80
|
+
*/
|
|
81
|
+
readonly snmp: pulumi.Output<outputs.network.DeviceSnmp | undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* State is the connection state, e.g. "Connected", "Pending" (read-only).
|
|
84
|
+
*/
|
|
85
|
+
readonly state: pulumi.Output<string>;
|
|
86
|
+
/**
|
|
87
|
+
* Stp groups the spanning-tree bridge settings.
|
|
88
|
+
*/
|
|
89
|
+
readonly stp: pulumi.Output<outputs.network.DeviceStp | undefined>;
|
|
90
|
+
/**
|
|
91
|
+
* Switching groups the switch-wide L2 settings.
|
|
92
|
+
*/
|
|
93
|
+
readonly switching: pulumi.Output<outputs.network.DeviceSwitching | undefined>;
|
|
94
|
+
/**
|
|
95
|
+
* Type is the device type, e.g. "usw", "uap", "ugw" (read-only).
|
|
96
|
+
*/
|
|
97
|
+
readonly type: pulumi.Output<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Vrrp groups the gateway VRRP high-availability settings.
|
|
100
|
+
*/
|
|
101
|
+
readonly vrrp: pulumi.Output<outputs.network.DeviceVrrp | undefined>;
|
|
102
|
+
/**
|
|
103
|
+
* Create a Device resource with the given unique name, arguments, and options.
|
|
104
|
+
*
|
|
105
|
+
* @param name The _unique_ name of the resource.
|
|
106
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
107
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
108
|
+
*/
|
|
109
|
+
constructor(name: string, args: DeviceArgs, opts?: pulumi.CustomResourceOptions);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The set of arguments for constructing a Device resource.
|
|
113
|
+
*/
|
|
114
|
+
export interface DeviceArgs {
|
|
115
|
+
/**
|
|
116
|
+
* Disabled administratively disables the device.
|
|
117
|
+
*/
|
|
118
|
+
disabled?: pulumi.Input<boolean | undefined>;
|
|
119
|
+
/**
|
|
120
|
+
* Dot1x groups the switch-wide 802.1X settings.
|
|
121
|
+
*/
|
|
122
|
+
dot1x?: pulumi.Input<inputs.network.DeviceDot1xArgs | undefined>;
|
|
123
|
+
/**
|
|
124
|
+
* EthernetOverrides assigns network groups to physical ethernet ports (gateways).
|
|
125
|
+
*/
|
|
126
|
+
ethernetOverrides?: pulumi.Input<pulumi.Input<inputs.network.DeviceEthernetOverrideArgs>[] | undefined>;
|
|
127
|
+
/**
|
|
128
|
+
* Lcm groups the front LCD/touchscreen display settings.
|
|
129
|
+
*/
|
|
130
|
+
lcm?: pulumi.Input<inputs.network.DeviceLcmArgs | undefined>;
|
|
131
|
+
/**
|
|
132
|
+
* Led groups the status-LED indicator settings.
|
|
133
|
+
*/
|
|
134
|
+
led?: pulumi.Input<inputs.network.DeviceLedArgs | undefined>;
|
|
135
|
+
/**
|
|
136
|
+
* Mac is the device MAC address (required). The device must already be adopted on the controller.
|
|
137
|
+
*/
|
|
138
|
+
mac: pulumi.Input<string>;
|
|
139
|
+
/**
|
|
140
|
+
* MgmtNetworkId pins the device's management network (the network's `_id`).
|
|
141
|
+
*/
|
|
142
|
+
mgmtNetworkId?: pulumi.Input<string | undefined>;
|
|
143
|
+
/**
|
|
144
|
+
* Name is the device's display name.
|
|
145
|
+
*/
|
|
146
|
+
name?: pulumi.Input<string | undefined>;
|
|
147
|
+
/**
|
|
148
|
+
* Outlet groups the PDU outlet settings.
|
|
149
|
+
*/
|
|
150
|
+
outlet?: pulumi.Input<inputs.network.DeviceOutletArgs | undefined>;
|
|
151
|
+
/**
|
|
152
|
+
* PortOverrides configures individual switch ports (the centerpiece for switches).
|
|
153
|
+
*/
|
|
154
|
+
portOverrides?: pulumi.Input<pulumi.Input<inputs.network.DevicePortOverrideArgs>[] | undefined>;
|
|
155
|
+
/**
|
|
156
|
+
* RadioTable tunes individual access-point radios.
|
|
157
|
+
*/
|
|
158
|
+
radioTable?: pulumi.Input<pulumi.Input<inputs.network.DeviceRadioOverrideArgs>[] | undefined>;
|
|
159
|
+
/**
|
|
160
|
+
* Snmp groups the SNMP agent strings.
|
|
161
|
+
*/
|
|
162
|
+
snmp?: pulumi.Input<inputs.network.DeviceSnmpArgs | undefined>;
|
|
163
|
+
/**
|
|
164
|
+
* Stp groups the spanning-tree bridge settings.
|
|
165
|
+
*/
|
|
166
|
+
stp?: pulumi.Input<inputs.network.DeviceStpArgs | undefined>;
|
|
167
|
+
/**
|
|
168
|
+
* Switching groups the switch-wide L2 settings.
|
|
169
|
+
*/
|
|
170
|
+
switching?: pulumi.Input<inputs.network.DeviceSwitchingArgs | undefined>;
|
|
171
|
+
/**
|
|
172
|
+
* Vrrp groups the gateway VRRP high-availability settings.
|
|
173
|
+
*/
|
|
174
|
+
vrrp?: pulumi.Input<inputs.network.DeviceVrrpArgs | undefined>;
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../network/device.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAI3C;;GAEG;AACH,qBAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;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,MAAM;IAOzG;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM;IAOjD;;OAEG;IACH,SAAgC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChE;;OAEG;IACH,SAAgC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAChE;;OAEG;IACH,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,SAAS,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C,CAAC;CAClE"}
|
|
@@ -0,0 +1,122 @@
|
|
|
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.Device = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Manage settings of an existing, already-adopted UniFi network device (gateway, switch, access point, PDU). Adoption model: binds to a device by MAC and read-modify-writes only the managed fields onto the controller's current device object; unmanaged settings and unlisted port/outlet/radio overrides are preserved. Delete is a no-op.
|
|
33
|
+
*/
|
|
34
|
+
class Device extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Device 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 Device(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'unifi:network:Device';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Device. 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'] === Device.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Device 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?.mac === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'mac'");
|
|
71
|
+
}
|
|
72
|
+
resourceInputs["disabled"] = args?.disabled;
|
|
73
|
+
resourceInputs["dot1x"] = args?.dot1x;
|
|
74
|
+
resourceInputs["ethernetOverrides"] = args?.ethernetOverrides;
|
|
75
|
+
resourceInputs["lcm"] = args?.lcm;
|
|
76
|
+
resourceInputs["led"] = args?.led;
|
|
77
|
+
resourceInputs["mac"] = args?.mac;
|
|
78
|
+
resourceInputs["mgmtNetworkId"] = args?.mgmtNetworkId;
|
|
79
|
+
resourceInputs["name"] = args?.name;
|
|
80
|
+
resourceInputs["outlet"] = args?.outlet;
|
|
81
|
+
resourceInputs["portOverrides"] = args?.portOverrides;
|
|
82
|
+
resourceInputs["radioTable"] = args?.radioTable;
|
|
83
|
+
resourceInputs["snmp"] = args?.snmp;
|
|
84
|
+
resourceInputs["stp"] = args?.stp;
|
|
85
|
+
resourceInputs["switching"] = args?.switching;
|
|
86
|
+
resourceInputs["vrrp"] = args?.vrrp;
|
|
87
|
+
resourceInputs["adopted"] = undefined /*out*/;
|
|
88
|
+
resourceInputs["deviceId"] = undefined /*out*/;
|
|
89
|
+
resourceInputs["model"] = undefined /*out*/;
|
|
90
|
+
resourceInputs["state"] = undefined /*out*/;
|
|
91
|
+
resourceInputs["type"] = undefined /*out*/;
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
resourceInputs["adopted"] = undefined /*out*/;
|
|
95
|
+
resourceInputs["deviceId"] = undefined /*out*/;
|
|
96
|
+
resourceInputs["disabled"] = undefined /*out*/;
|
|
97
|
+
resourceInputs["dot1x"] = undefined /*out*/;
|
|
98
|
+
resourceInputs["ethernetOverrides"] = undefined /*out*/;
|
|
99
|
+
resourceInputs["lcm"] = undefined /*out*/;
|
|
100
|
+
resourceInputs["led"] = undefined /*out*/;
|
|
101
|
+
resourceInputs["mac"] = undefined /*out*/;
|
|
102
|
+
resourceInputs["mgmtNetworkId"] = undefined /*out*/;
|
|
103
|
+
resourceInputs["model"] = undefined /*out*/;
|
|
104
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
105
|
+
resourceInputs["outlet"] = undefined /*out*/;
|
|
106
|
+
resourceInputs["portOverrides"] = undefined /*out*/;
|
|
107
|
+
resourceInputs["radioTable"] = undefined /*out*/;
|
|
108
|
+
resourceInputs["snmp"] = undefined /*out*/;
|
|
109
|
+
resourceInputs["state"] = undefined /*out*/;
|
|
110
|
+
resourceInputs["stp"] = undefined /*out*/;
|
|
111
|
+
resourceInputs["switching"] = undefined /*out*/;
|
|
112
|
+
resourceInputs["type"] = undefined /*out*/;
|
|
113
|
+
resourceInputs["vrrp"] = undefined /*out*/;
|
|
114
|
+
}
|
|
115
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
116
|
+
const replaceOnChanges = { replaceOnChanges: ["mac"] };
|
|
117
|
+
opts = pulumi.mergeOptions(opts, replaceOnChanges);
|
|
118
|
+
super(Device.__pulumiType, name, resourceInputs, opts);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.Device = Device;
|
|
122
|
+
//# sourceMappingURL=device.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../network/device.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAIzC,wDAA0C;AAE1C;;GAEG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;OAOG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,IAAmC;QAC5F,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,SAAgB,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,sBAAsB,CAAC;IAE7D;;;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,MAAM,CAAC,YAAY,C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S,CAAC,OAAO,CAAC;YAC3C,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC5C,cAAc,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC1C,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC3C,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,MAAM,gBAAgB,GAAG,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;QACvD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACnD,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;;AAxKL,wBAyKC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as enums from "../types/enums";
|
|
3
|
+
/**
|
|
4
|
+
* A UniFi controller-local (static) DNS record. Supported on gateways such as the UDM-SE. Maps to a controller static-dns object.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DnsRecord extends pulumi.CustomResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get an existing DnsRecord resource's state with the given name, ID, and optional extra
|
|
9
|
+
* properties used to qualify the lookup.
|
|
10
|
+
*
|
|
11
|
+
* @param name The _unique_ name of the resulting resource.
|
|
12
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
13
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
14
|
+
*/
|
|
15
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): DnsRecord;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if the given object is an instance of DnsRecord. 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 DnsRecord;
|
|
21
|
+
/**
|
|
22
|
+
* DnsRecordId is the controller-assigned identifier (the UniFi `_id`).
|
|
23
|
+
*/
|
|
24
|
+
readonly dnsRecordId: pulumi.Output<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Enabled controls whether the record is active. Defaults to true.
|
|
27
|
+
*/
|
|
28
|
+
readonly enabled: pulumi.Output<boolean | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Key is the hostname/record name the record answers for, e.g. "host.example.com".
|
|
31
|
+
*/
|
|
32
|
+
readonly key: pulumi.Output<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Port is the target port for SRV records.
|
|
35
|
+
*/
|
|
36
|
+
readonly port: pulumi.Output<number | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* Priority is the preference value for MX and SRV records.
|
|
39
|
+
*/
|
|
40
|
+
readonly priority: pulumi.Output<number | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* RecordType is the DNS record type: A | AAAA | CNAME | MX | NS | PTR | SOA | SRV | TXT.
|
|
43
|
+
*/
|
|
44
|
+
readonly recordType: pulumi.Output<enums.network.DnsRecordType>;
|
|
45
|
+
/**
|
|
46
|
+
* Ttl is the record time-to-live in seconds. 0 lets the controller pick a default.
|
|
47
|
+
*/
|
|
48
|
+
readonly ttl: pulumi.Output<number | undefined>;
|
|
49
|
+
/**
|
|
50
|
+
* Value is the record payload (e.g. an IP for A/AAAA, a hostname for CNAME/MX/NS).
|
|
51
|
+
*/
|
|
52
|
+
readonly value: pulumi.Output<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Weight is the relative weight for SRV records.
|
|
55
|
+
*/
|
|
56
|
+
readonly weight: pulumi.Output<number | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Create a DnsRecord resource with the given unique name, arguments, and options.
|
|
59
|
+
*
|
|
60
|
+
* @param name The _unique_ name of the resource.
|
|
61
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
62
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
63
|
+
*/
|
|
64
|
+
constructor(name: string, args: DnsRecordArgs, opts?: pulumi.CustomResourceOptions);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The set of arguments for constructing a DnsRecord resource.
|
|
68
|
+
*/
|
|
69
|
+
export interface DnsRecordArgs {
|
|
70
|
+
/**
|
|
71
|
+
* Enabled controls whether the record is active. Defaults to true.
|
|
72
|
+
*/
|
|
73
|
+
enabled?: pulumi.Input<boolean | undefined>;
|
|
74
|
+
/**
|
|
75
|
+
* Key is the hostname/record name the record answers for, e.g. "host.example.com".
|
|
76
|
+
*/
|
|
77
|
+
key: pulumi.Input<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Port is the target port for SRV records.
|
|
80
|
+
*/
|
|
81
|
+
port?: pulumi.Input<number | undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* Priority is the preference value for MX and SRV records.
|
|
84
|
+
*/
|
|
85
|
+
priority?: pulumi.Input<number | undefined>;
|
|
86
|
+
/**
|
|
87
|
+
* RecordType is the DNS record type: A | AAAA | CNAME | MX | NS | PTR | SOA | SRV | TXT.
|
|
88
|
+
*/
|
|
89
|
+
recordType: pulumi.Input<enums.network.DnsRecordType>;
|
|
90
|
+
/**
|
|
91
|
+
* Ttl is the record time-to-live in seconds. 0 lets the controller pick a default.
|
|
92
|
+
*/
|
|
93
|
+
ttl?: pulumi.Input<number | undefined>;
|
|
94
|
+
/**
|
|
95
|
+
* Value is the record payload (e.g. an IP for A/AAAA, a hostname for CNAME/MX/NS).
|
|
96
|
+
*/
|
|
97
|
+
value: pulumi.Input<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Weight is the relative weight for SRV records.
|
|
100
|
+
*/
|
|
101
|
+
weight?: pulumi.Input<number | undefined>;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=dnsRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dnsRecord.d.ts","sourceRoot":"","sources":["../../network/dnsRecord.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAGxC;;GAEG;AACH,qBAAa,SAAU,SAAQ,MAAM,CAAC,cAAc;IAChD;;;;;;;OAOG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,SAAS;IAO5G;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS;IAOpD;;OAEG;IACH,SAAgC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnE;;OAEG;IACH,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACpE;;OAEG;IACH,SAAwB,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnD;;OAEG;IACH,SAAwB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAChE;;OAEG;IACH,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpE;;OAEG;IACH,SAAwB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/E;;OAEG;IACH,SAAwB,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/D;;OAEG;IACH,SAAwB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrD;;OAEG;IACH,SAAwB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAElE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CAoCrF;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC5C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACtD;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC7C"}
|
|
@@ -0,0 +1,104 @@
|
|
|
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.DnsRecord = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("../utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* A UniFi controller-local (static) DNS record. Supported on gateways such as the UDM-SE. Maps to a controller static-dns object.
|
|
33
|
+
*/
|
|
34
|
+
class DnsRecord extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing DnsRecord 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 DnsRecord(name, undefined, { ...opts, id: id });
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
static __pulumiType = 'unifi:network:DnsRecord';
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of DnsRecord. 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'] === DnsRecord.__pulumiType;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a DnsRecord 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?.key === undefined && !opts.urn) {
|
|
70
|
+
throw new Error("Missing required property 'key'");
|
|
71
|
+
}
|
|
72
|
+
if (args?.recordType === undefined && !opts.urn) {
|
|
73
|
+
throw new Error("Missing required property 'recordType'");
|
|
74
|
+
}
|
|
75
|
+
if (args?.value === undefined && !opts.urn) {
|
|
76
|
+
throw new Error("Missing required property 'value'");
|
|
77
|
+
}
|
|
78
|
+
resourceInputs["enabled"] = (args?.enabled) ?? true;
|
|
79
|
+
resourceInputs["key"] = args?.key;
|
|
80
|
+
resourceInputs["port"] = args?.port;
|
|
81
|
+
resourceInputs["priority"] = args?.priority;
|
|
82
|
+
resourceInputs["recordType"] = args?.recordType;
|
|
83
|
+
resourceInputs["ttl"] = args?.ttl;
|
|
84
|
+
resourceInputs["value"] = args?.value;
|
|
85
|
+
resourceInputs["weight"] = args?.weight;
|
|
86
|
+
resourceInputs["dnsRecordId"] = undefined /*out*/;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
resourceInputs["dnsRecordId"] = undefined /*out*/;
|
|
90
|
+
resourceInputs["enabled"] = undefined /*out*/;
|
|
91
|
+
resourceInputs["key"] = undefined /*out*/;
|
|
92
|
+
resourceInputs["port"] = undefined /*out*/;
|
|
93
|
+
resourceInputs["priority"] = undefined /*out*/;
|
|
94
|
+
resourceInputs["recordType"] = undefined /*out*/;
|
|
95
|
+
resourceInputs["ttl"] = undefined /*out*/;
|
|
96
|
+
resourceInputs["value"] = undefined /*out*/;
|
|
97
|
+
resourceInputs["weight"] = undefined /*out*/;
|
|
98
|
+
}
|
|
99
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
100
|
+
super(DnsRecord.__pulumiType, name, resourceInputs, opts);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.DnsRecord = DnsRecord;
|
|
104
|
+
//# sourceMappingURL=dnsRecord.js.map
|