UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

122 lines 6.07 kB
"use strict"; // *** 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.RadiusSettings = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a directory's multi-factor authentication (MFA) using a Remote Authentication Dial In User Service (RADIUS) server. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.directoryservice.RadiusSettings("example", { * directoryId: exampleAwsDirectoryServiceDirectory.id, * authenticationProtocol: "PAP", * displayLabel: "example", * radiusPort: 1812, * radiusRetries: 4, * radiusServers: ["10.0.1.5"], * radiusTimeout: 1, * sharedSecret: "12345678", * }); * ``` * * ## Import * * Using `pulumi import`, import RADIUS settings using the directory ID. For example: * * ```sh * $ pulumi import aws:directoryservice/radiusSettings:RadiusSettings example d-926724cf57 * ``` */ class RadiusSettings extends pulumi.CustomResource { /** * Get an existing RadiusSettings 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 RadiusSettings(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of RadiusSettings. 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'] === RadiusSettings.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authenticationProtocol"] = state ? state.authenticationProtocol : undefined; resourceInputs["directoryId"] = state ? state.directoryId : undefined; resourceInputs["displayLabel"] = state ? state.displayLabel : undefined; resourceInputs["radiusPort"] = state ? state.radiusPort : undefined; resourceInputs["radiusRetries"] = state ? state.radiusRetries : undefined; resourceInputs["radiusServers"] = state ? state.radiusServers : undefined; resourceInputs["radiusTimeout"] = state ? state.radiusTimeout : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["sharedSecret"] = state ? state.sharedSecret : undefined; resourceInputs["useSameUsername"] = state ? state.useSameUsername : undefined; } else { const args = argsOrState; if ((!args || args.authenticationProtocol === undefined) && !opts.urn) { throw new Error("Missing required property 'authenticationProtocol'"); } if ((!args || args.directoryId === undefined) && !opts.urn) { throw new Error("Missing required property 'directoryId'"); } if ((!args || args.displayLabel === undefined) && !opts.urn) { throw new Error("Missing required property 'displayLabel'"); } if ((!args || args.radiusPort === undefined) && !opts.urn) { throw new Error("Missing required property 'radiusPort'"); } if ((!args || args.radiusRetries === undefined) && !opts.urn) { throw new Error("Missing required property 'radiusRetries'"); } if ((!args || args.radiusServers === undefined) && !opts.urn) { throw new Error("Missing required property 'radiusServers'"); } if ((!args || args.radiusTimeout === undefined) && !opts.urn) { throw new Error("Missing required property 'radiusTimeout'"); } if ((!args || args.sharedSecret === undefined) && !opts.urn) { throw new Error("Missing required property 'sharedSecret'"); } resourceInputs["authenticationProtocol"] = args ? args.authenticationProtocol : undefined; resourceInputs["directoryId"] = args ? args.directoryId : undefined; resourceInputs["displayLabel"] = args ? args.displayLabel : undefined; resourceInputs["radiusPort"] = args ? args.radiusPort : undefined; resourceInputs["radiusRetries"] = args ? args.radiusRetries : undefined; resourceInputs["radiusServers"] = args ? args.radiusServers : undefined; resourceInputs["radiusTimeout"] = args ? args.radiusTimeout : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["sharedSecret"] = (args === null || args === void 0 ? void 0 : args.sharedSecret) ? pulumi.secret(args.sharedSecret) : undefined; resourceInputs["useSameUsername"] = args ? args.useSameUsername : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["sharedSecret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(RadiusSettings.__pulumiType, name, resourceInputs, opts); } } exports.RadiusSettings = RadiusSettings; /** @internal */ RadiusSettings.__pulumiType = 'aws:directoryservice/radiusSettings:RadiusSettings'; //# sourceMappingURL=radiusSettings.js.map