UNPKG

@pulumi/aws

Version:

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

93 lines 3.86 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.ConditionalForwarder = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a conditional forwarder for managed Microsoft AD in AWS Directory Service. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.directoryservice.ConditionalForwarder("example", { * directoryId: ad.id, * remoteDomainName: "example.com", * dnsIps: [ * "8.8.8.8", * "8.8.4.4", * ], * }); * ``` * * ## Import * * Using `pulumi import`, import conditional forwarders using the directory id and remote_domain_name. For example: * * ```sh * $ pulumi import aws:directoryservice/conditionalForwarder:ConditionalForwarder example d-1234567890:example.com * ``` */ class ConditionalForwarder extends pulumi.CustomResource { /** * Get an existing ConditionalForwarder 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 ConditionalForwarder(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ConditionalForwarder. 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'] === ConditionalForwarder.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["directoryId"] = state?.directoryId; resourceInputs["dnsIps"] = state?.dnsIps; resourceInputs["region"] = state?.region; resourceInputs["remoteDomainName"] = state?.remoteDomainName; } else { const args = argsOrState; if (args?.directoryId === undefined && !opts.urn) { throw new Error("Missing required property 'directoryId'"); } if (args?.dnsIps === undefined && !opts.urn) { throw new Error("Missing required property 'dnsIps'"); } if (args?.remoteDomainName === undefined && !opts.urn) { throw new Error("Missing required property 'remoteDomainName'"); } resourceInputs["directoryId"] = args?.directoryId; resourceInputs["dnsIps"] = args?.dnsIps; resourceInputs["region"] = args?.region; resourceInputs["remoteDomainName"] = args?.remoteDomainName; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "aws:directoryservice/conditionalForwader:ConditionalForwader" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(ConditionalForwarder.__pulumiType, name, resourceInputs, opts); } } exports.ConditionalForwarder = ConditionalForwarder; /** @internal */ ConditionalForwarder.__pulumiType = 'aws:directoryservice/conditionalForwarder:ConditionalForwarder'; //# sourceMappingURL=conditionalForwarder.js.map