@bdzscaler/pulumi-zpa
Version:
A Pulumi package for creating and managing Zscaler Private Access (ZPA) cloud resources.
179 lines • 6.87 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.PRAApproval = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* * [Official documentation](https://help.zscaler.com/zpa/about-privileged-approvals)
* * [API documentation](https://help.zscaler.com/zpa/configuring-privileged-approvals-using-api)
*
* The **zpa_pra_approval_controller** resource creates a privileged remote access approval in the Zscaler Private Access cloud. This resource allows third-party users and contractors to be able to log in to a Privileged Remote Access (PRA) portal.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as zpa from "@bdzscaler/pulumi-zpa";
*
* // ZPA Segment Group resource
* const thisSegmentGroup = new zpa.SegmentGroup("thisSegmentGroup", {
* description: "Example",
* enabled: true,
* });
* // ZPA App Connector Group resource
* const thisConnectorGroup = new zpa.ConnectorGroup("thisConnectorGroup", {
* description: "Example",
* enabled: true,
* cityCountry: "San Jose, CA",
* countryCode: "US",
* latitude: "37.338",
* longitude: "-121.8863",
* location: "San Jose, CA, US",
* upgradeDay: "SUNDAY",
* upgradeTimeInSecs: "66600",
* overrideVersionProfile: true,
* versionProfileId: "0",
* dnsQueryType: "IPV4",
* });
* // ZPA Server Group resource
* const thisServerGroup = new zpa.ServerGroup("thisServerGroup", {
* description: "Example",
* enabled: true,
* dynamicDiscovery: false,
* appConnectorGroups: [{
* ids: [thisConnectorGroup.id],
* }],
* }, {
* dependsOn: [thisConnectorGroup],
* });
* // ZPA Application Segment resource
* const thisApplicationSegment = new zpa.ApplicationSegment("thisApplicationSegment", {
* description: "Example",
* enabled: true,
* healthReporting: "ON_ACCESS",
* bypassType: "NEVER",
* isCnameEnabled: true,
* tcpPortRanges: [
* "8080",
* "8080",
* ],
* domainNames: ["server.acme.com"],
* segmentGroupId: thisSegmentGroup.id,
* serverGroups: [{
* ids: [thisServerGroup.id],
* }],
* }, {
* dependsOn: [
* thisServerGroup,
* thisSegmentGroup,
* ],
* });
* // Create PRA Approval Controller
* const thisPRAApproval = new zpa.PRAApproval("thisPRAApproval", {
* emailIds: ["jdoe@acme.com"],
* startTime: "Tue, 07 Mar 2024 11:05:30 PST",
* endTime: "Tue, 07 Jun 2024 11:05:30 PST",
* status: "FUTURE",
* applications: [{
* ids: [thisApplicationSegment.id],
* }],
* workingHours: [{
* days: [
* "FRI",
* "MON",
* "SAT",
* "SUN",
* "THU",
* "TUE",
* "WED",
* ],
* startTime: "00:10",
* startTimeCron: "0 0 8 ? * MON,TUE,WED,THU,FRI,SAT",
* endTime: "09:15",
* endTimeCron: "0 15 17 ? * MON,TUE,WED,THU,FRI,SAT",
* timezone: "America/Vancouver",
* }],
* });
* ```
*
* ## Import
*
* Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language.
*
* Visit
*
* **zpa_pra_approval_controller** can be imported by using `<APPROVAL ID>` or `<APPROVAL NAME>` as the import ID.
*
* For example:
*
* ```sh
* $ pulumi import zpa:index/pRAApproval:PRAApproval this <approval_id>
* ```
*
* or
*
* ```sh
* $ pulumi import zpa:index/pRAApproval:PRAApproval this <approval_name>
* ```
*/
class PRAApproval extends pulumi.CustomResource {
/**
* Get an existing PRAApproval 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 PRAApproval(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PRAApproval. 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'] === PRAApproval.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applications"] = state ? state.applications : undefined;
resourceInputs["emailIds"] = state ? state.emailIds : undefined;
resourceInputs["endTime"] = state ? state.endTime : undefined;
resourceInputs["microtenantId"] = state ? state.microtenantId : undefined;
resourceInputs["startTime"] = state ? state.startTime : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["workingHours"] = state ? state.workingHours : undefined;
}
else {
const args = argsOrState;
if ((!args || args.applications === undefined) && !opts.urn) {
throw new Error("Missing required property 'applications'");
}
resourceInputs["applications"] = args ? args.applications : undefined;
resourceInputs["emailIds"] = args ? args.emailIds : undefined;
resourceInputs["endTime"] = args ? args.endTime : undefined;
resourceInputs["microtenantId"] = args ? args.microtenantId : undefined;
resourceInputs["startTime"] = args ? args.startTime : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["workingHours"] = args ? args.workingHours : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "zpa:index/praApprovalController:PraApprovalController" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(PRAApproval.__pulumiType, name, resourceInputs, opts);
}
}
exports.PRAApproval = PRAApproval;
/** @internal */
PRAApproval.__pulumiType = 'zpa:index/pRAApproval:PRAApproval';
//# sourceMappingURL=praapproval.js.map