@pulumi/juniper-mist
Version:
A Pulumi package for creating and managing Juniper Mist resources.
115 lines • 4.88 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.Servicepolicy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* This resource manages WAN Assurance Service Policies (Application Policies).
*
* The Service Policies can be used in the `servicePolicies` object by referencing the Service Policy ID as the `servicepolicyId` in:
* * the Gateway configuration (`mist_device_gateway.service_policies`)
* * the Gateway Templates (`mist_org_gatewaytemplate.service_policies`)
* * the HUB Profiles (`mist_org_deviceprofile_gateway.service_policies`)
* They can be used to manage common policies between multiples configurations
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as junipermist from "@pulumi/juniper-mist";
*
* const servicepolicyOne = new junipermist.org.Servicepolicy("servicepolicy_one", {
* orgId: terraformTest.id,
* tenants: ["guest"],
* services: ["guest-internet"],
* action: "allow",
* idp: {
* enabled: true,
* profile: "standard",
* alertOnly: true,
* },
* name: "Guest-IDP",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `mist_org_servicepolicy` with:
*
* Org Service Policy can be imported by specifying the org_id and the servicepolicy_id
*
* ```sh
* $ pulumi import junipermist:org/servicepolicy:Servicepolicy servicepolicy_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309
* ```
*/
class Servicepolicy extends pulumi.CustomResource {
/**
* Get an existing Servicepolicy 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 Servicepolicy(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Servicepolicy. 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'] === Servicepolicy.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aamw"] = state?.aamw;
resourceInputs["action"] = state?.action;
resourceInputs["antivirus"] = state?.antivirus;
resourceInputs["appqoe"] = state?.appqoe;
resourceInputs["ewfs"] = state?.ewfs;
resourceInputs["idp"] = state?.idp;
resourceInputs["localRouting"] = state?.localRouting;
resourceInputs["name"] = state?.name;
resourceInputs["orgId"] = state?.orgId;
resourceInputs["pathPreference"] = state?.pathPreference;
resourceInputs["services"] = state?.services;
resourceInputs["sslProxy"] = state?.sslProxy;
resourceInputs["tenants"] = state?.tenants;
}
else {
const args = argsOrState;
if (args?.orgId === undefined && !opts.urn) {
throw new Error("Missing required property 'orgId'");
}
resourceInputs["aamw"] = args?.aamw;
resourceInputs["action"] = args?.action;
resourceInputs["antivirus"] = args?.antivirus;
resourceInputs["appqoe"] = args?.appqoe;
resourceInputs["ewfs"] = args?.ewfs;
resourceInputs["idp"] = args?.idp;
resourceInputs["localRouting"] = args?.localRouting;
resourceInputs["name"] = args?.name;
resourceInputs["orgId"] = args?.orgId;
resourceInputs["pathPreference"] = args?.pathPreference;
resourceInputs["services"] = args?.services;
resourceInputs["sslProxy"] = args?.sslProxy;
resourceInputs["tenants"] = args?.tenants;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Servicepolicy.__pulumiType, name, resourceInputs, opts);
}
}
exports.Servicepolicy = Servicepolicy;
/** @internal */
Servicepolicy.__pulumiType = 'junipermist:org/servicepolicy:Servicepolicy';
//# sourceMappingURL=servicepolicy.js.map