@pulumi/ise
Version:
A Pulumi package for managing resources on a Cisco ISE (Identity Service Engine) instance.. Based on terraform-provider-ise: version v0.2.1
131 lines • 6.9 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.AuthenticationRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* This resource can manage a Device Admin Authentication Rule.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as ise from "@pulumi/ise";
*
* const example = new ise.deviceadmin.AuthenticationRule("example", {
* policySetId: "d82952cb-b901-4b09-b363-5ebf39bdbaf9",
* name: "Rule1",
* "default": false,
* rank: 0,
* state: "enabled",
* conditionType: "ConditionAttributes",
* conditionIsNegate: false,
* conditionAttributeName: "Location",
* conditionAttributeValue: "All Locations",
* conditionDictionaryName: "DEVICE",
* conditionOperator: "equals",
* identitySourceName: "Internal Endpoints",
* ifAuthFail: "REJECT",
* ifProcessFail: "DROP",
* ifUserNotFound: "REJECT",
* });
* ```
*
* ## Import
*
* The `pulumi import` command can be used, for example:
*
* ```sh
* $ pulumi import ise:deviceadmin/authenticationRule:AuthenticationRule example "76d24097-41c4-4558-a4d0-a8c07ac08470,76d24097-41c4-4558-a4d0-a8c07ac08470"
* ```
*/
class AuthenticationRule extends pulumi.CustomResource {
/**
* Get an existing AuthenticationRule 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 AuthenticationRule(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AuthenticationRule. 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'] === AuthenticationRule.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["childrens"] = state ? state.childrens : undefined;
resourceInputs["conditionAttributeName"] = state ? state.conditionAttributeName : undefined;
resourceInputs["conditionAttributeValue"] = state ? state.conditionAttributeValue : undefined;
resourceInputs["conditionDictionaryName"] = state ? state.conditionDictionaryName : undefined;
resourceInputs["conditionDictionaryValue"] = state ? state.conditionDictionaryValue : undefined;
resourceInputs["conditionId"] = state ? state.conditionId : undefined;
resourceInputs["conditionIsNegate"] = state ? state.conditionIsNegate : undefined;
resourceInputs["conditionOperator"] = state ? state.conditionOperator : undefined;
resourceInputs["conditionType"] = state ? state.conditionType : undefined;
resourceInputs["default"] = state ? state.default : undefined;
resourceInputs["identitySourceName"] = state ? state.identitySourceName : undefined;
resourceInputs["ifAuthFail"] = state ? state.ifAuthFail : undefined;
resourceInputs["ifProcessFail"] = state ? state.ifProcessFail : undefined;
resourceInputs["ifUserNotFound"] = state ? state.ifUserNotFound : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["policySetId"] = state ? state.policySetId : undefined;
resourceInputs["rank"] = state ? state.rank : undefined;
resourceInputs["state"] = state ? state.state : undefined;
}
else {
const args = argsOrState;
if ((!args || args.ifAuthFail === undefined) && !opts.urn) {
throw new Error("Missing required property 'ifAuthFail'");
}
if ((!args || args.ifProcessFail === undefined) && !opts.urn) {
throw new Error("Missing required property 'ifProcessFail'");
}
if ((!args || args.ifUserNotFound === undefined) && !opts.urn) {
throw new Error("Missing required property 'ifUserNotFound'");
}
if ((!args || args.policySetId === undefined) && !opts.urn) {
throw new Error("Missing required property 'policySetId'");
}
resourceInputs["childrens"] = args ? args.childrens : undefined;
resourceInputs["conditionAttributeName"] = args ? args.conditionAttributeName : undefined;
resourceInputs["conditionAttributeValue"] = args ? args.conditionAttributeValue : undefined;
resourceInputs["conditionDictionaryName"] = args ? args.conditionDictionaryName : undefined;
resourceInputs["conditionDictionaryValue"] = args ? args.conditionDictionaryValue : undefined;
resourceInputs["conditionId"] = args ? args.conditionId : undefined;
resourceInputs["conditionIsNegate"] = args ? args.conditionIsNegate : undefined;
resourceInputs["conditionOperator"] = args ? args.conditionOperator : undefined;
resourceInputs["conditionType"] = args ? args.conditionType : undefined;
resourceInputs["default"] = args ? args.default : undefined;
resourceInputs["identitySourceName"] = args ? args.identitySourceName : undefined;
resourceInputs["ifAuthFail"] = args ? args.ifAuthFail : undefined;
resourceInputs["ifProcessFail"] = args ? args.ifProcessFail : undefined;
resourceInputs["ifUserNotFound"] = args ? args.ifUserNotFound : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["policySetId"] = args ? args.policySetId : undefined;
resourceInputs["rank"] = args ? args.rank : undefined;
resourceInputs["state"] = args ? args.state : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AuthenticationRule.__pulumiType, name, resourceInputs, opts);
}
}
exports.AuthenticationRule = AuthenticationRule;
/** @internal */
AuthenticationRule.__pulumiType = 'ise:deviceadmin/authenticationRule:AuthenticationRule';
//# sourceMappingURL=authenticationRule.js.map