UNPKG

@pulumi/aws

Version:

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

122 lines 5.56 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, { ...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?.authenticationProtocol; resourceInputs["directoryId"] = state?.directoryId; resourceInputs["displayLabel"] = state?.displayLabel; resourceInputs["radiusPort"] = state?.radiusPort; resourceInputs["radiusRetries"] = state?.radiusRetries; resourceInputs["radiusServers"] = state?.radiusServers; resourceInputs["radiusTimeout"] = state?.radiusTimeout; resourceInputs["region"] = state?.region; resourceInputs["sharedSecret"] = state?.sharedSecret; resourceInputs["useSameUsername"] = state?.useSameUsername; } else { const args = argsOrState; if (args?.authenticationProtocol === undefined && !opts.urn) { throw new Error("Missing required property 'authenticationProtocol'"); } if (args?.directoryId === undefined && !opts.urn) { throw new Error("Missing required property 'directoryId'"); } if (args?.displayLabel === undefined && !opts.urn) { throw new Error("Missing required property 'displayLabel'"); } if (args?.radiusPort === undefined && !opts.urn) { throw new Error("Missing required property 'radiusPort'"); } if (args?.radiusRetries === undefined && !opts.urn) { throw new Error("Missing required property 'radiusRetries'"); } if (args?.radiusServers === undefined && !opts.urn) { throw new Error("Missing required property 'radiusServers'"); } if (args?.radiusTimeout === undefined && !opts.urn) { throw new Error("Missing required property 'radiusTimeout'"); } if (args?.sharedSecret === undefined && !opts.urn) { throw new Error("Missing required property 'sharedSecret'"); } resourceInputs["authenticationProtocol"] = args?.authenticationProtocol; resourceInputs["directoryId"] = args?.directoryId; resourceInputs["displayLabel"] = args?.displayLabel; resourceInputs["radiusPort"] = args?.radiusPort; resourceInputs["radiusRetries"] = args?.radiusRetries; resourceInputs["radiusServers"] = args?.radiusServers; resourceInputs["radiusTimeout"] = args?.radiusTimeout; resourceInputs["region"] = args?.region; resourceInputs["sharedSecret"] = args?.sharedSecret ? pulumi.secret(args.sharedSecret) : undefined; resourceInputs["useSameUsername"] = args?.useSameUsername; } 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