@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
138 lines • 6.29 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Service = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* This resource manages WAN Assurance Services (Applications).
*
* A Service is used to define a Custom Application that can be used in the `servicePolicies`. These Services can be referenced by their name in
* * the Service Policies (`mist_org_servicepolicy.services`)
* * the Gateway configuration (`mist_device_gateway.service_policies.services`)
* * the Gateway Templates (`mist_org_gatewaytemplate.service_policies.services`)
* * the HUB Profiles (`mist_org_deviceprofile_gateway.service_policies.services`)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as junipermist from "@pulumi/juniper-mist";
*
* const serviceOne = new junipermist.org.Service("service_one", {
* orgId: terraformTest.id,
* name: "service_one",
* addresses: [
* "10.3.0.0/24",
* "10.4.0.0/24",
* ],
* type: "custom",
* specs: [{
* protocol: "tcp",
* portRange: "443",
* }],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `mist_org_service` with:
*
* Org Service can be imported by specifying the org_id and the service_id
*
* ```sh
* $ pulumi import junipermist:org/service:Service service_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309
* ```
*/
class Service extends pulumi.CustomResource {
/**
* Get an existing Service resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new Service(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Service. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Service.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addresses"] = state?.addresses;
resourceInputs["appCategories"] = state?.appCategories;
resourceInputs["appSubcategories"] = state?.appSubcategories;
resourceInputs["apps"] = state?.apps;
resourceInputs["clientLimitDown"] = state?.clientLimitDown;
resourceInputs["clientLimitUp"] = state?.clientLimitUp;
resourceInputs["description"] = state?.description;
resourceInputs["dscp"] = state?.dscp;
resourceInputs["failoverPolicy"] = state?.failoverPolicy;
resourceInputs["hostnames"] = state?.hostnames;
resourceInputs["maxJitter"] = state?.maxJitter;
resourceInputs["maxLatency"] = state?.maxLatency;
resourceInputs["maxLoss"] = state?.maxLoss;
resourceInputs["name"] = state?.name;
resourceInputs["orgId"] = state?.orgId;
resourceInputs["serviceLimitDown"] = state?.serviceLimitDown;
resourceInputs["serviceLimitUp"] = state?.serviceLimitUp;
resourceInputs["sleEnabled"] = state?.sleEnabled;
resourceInputs["specs"] = state?.specs;
resourceInputs["ssrRelaxedTcpStateEnforcement"] = state?.ssrRelaxedTcpStateEnforcement;
resourceInputs["trafficClass"] = state?.trafficClass;
resourceInputs["trafficType"] = state?.trafficType;
resourceInputs["type"] = state?.type;
resourceInputs["urls"] = state?.urls;
}
else {
const args = argsOrState;
if (args?.orgId === undefined && !opts.urn) {
throw new Error("Missing required property 'orgId'");
}
resourceInputs["addresses"] = args?.addresses;
resourceInputs["appCategories"] = args?.appCategories;
resourceInputs["appSubcategories"] = args?.appSubcategories;
resourceInputs["apps"] = args?.apps;
resourceInputs["clientLimitDown"] = args?.clientLimitDown;
resourceInputs["clientLimitUp"] = args?.clientLimitUp;
resourceInputs["description"] = args?.description;
resourceInputs["dscp"] = args?.dscp;
resourceInputs["failoverPolicy"] = args?.failoverPolicy;
resourceInputs["hostnames"] = args?.hostnames;
resourceInputs["maxJitter"] = args?.maxJitter;
resourceInputs["maxLatency"] = args?.maxLatency;
resourceInputs["maxLoss"] = args?.maxLoss;
resourceInputs["name"] = args?.name;
resourceInputs["orgId"] = args?.orgId;
resourceInputs["serviceLimitDown"] = args?.serviceLimitDown;
resourceInputs["serviceLimitUp"] = args?.serviceLimitUp;
resourceInputs["sleEnabled"] = args?.sleEnabled;
resourceInputs["specs"] = args?.specs;
resourceInputs["ssrRelaxedTcpStateEnforcement"] = args?.ssrRelaxedTcpStateEnforcement;
resourceInputs["trafficClass"] = args?.trafficClass;
resourceInputs["trafficType"] = args?.trafficType;
resourceInputs["type"] = args?.type;
resourceInputs["urls"] = args?.urls;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Service.__pulumiType, name, resourceInputs, opts);
}
}
exports.Service = Service;
/** @internal */
Service.__pulumiType = 'junipermist:org/service:Service';
//# sourceMappingURL=service.js.map