@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
124 lines • 5 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.VpcDhcpOptions = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a VPC DHCP Options resource.
*
* ## Example Usage
*
* Basic usage:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const dnsResolver = new aws.ec2.VpcDhcpOptions("dns_resolver", {domainNameServers: [
* "8.8.8.8",
* "8.8.4.4",
* ]});
* ```
*
* Full usage:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = new aws.ec2.VpcDhcpOptions("foo", {
* domainName: "service.consul",
* domainNameServers: [
* "127.0.0.1",
* "10.0.0.2",
* ],
* ipv6AddressPreferredLeaseTime: "1440",
* ntpServers: ["127.0.0.1"],
* netbiosNameServers: ["127.0.0.1"],
* netbiosNodeType: "2",
* tags: {
* Name: "foo-name",
* },
* });
* ```
*
* ## Remarks
*
* * Notice that all arguments are optional but you have to specify at least one argument.
* * `domainNameServers`, `netbiosNameServers`, `ntpServers` are limited by AWS to maximum four servers only.
* * To actually use the DHCP Options Set you need to associate it to a VPC using `aws.ec2.VpcDhcpOptionsAssociation`.
* * If you delete a DHCP Options Set, all VPCs using it will be associated to AWS's `default` DHCP Option Set.
* * In most cases unless you're configuring your own DNS you'll want to set `domainNameServers` to `AmazonProvidedDNS`.
*
* ## Import
*
* Using `pulumi import`, import VPC DHCP Options using the DHCP Options `id`. For example:
*
* ```sh
* $ pulumi import aws:ec2/vpcDhcpOptions:VpcDhcpOptions my_options dopt-d9070ebb
* ```
*/
class VpcDhcpOptions extends pulumi.CustomResource {
/**
* Get an existing VpcDhcpOptions 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 VpcDhcpOptions(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VpcDhcpOptions. 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'] === VpcDhcpOptions.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["domainName"] = state?.domainName;
resourceInputs["domainNameServers"] = state?.domainNameServers;
resourceInputs["ipv6AddressPreferredLeaseTime"] = state?.ipv6AddressPreferredLeaseTime;
resourceInputs["netbiosNameServers"] = state?.netbiosNameServers;
resourceInputs["netbiosNodeType"] = state?.netbiosNodeType;
resourceInputs["ntpServers"] = state?.ntpServers;
resourceInputs["ownerId"] = state?.ownerId;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
resourceInputs["domainName"] = args?.domainName;
resourceInputs["domainNameServers"] = args?.domainNameServers;
resourceInputs["ipv6AddressPreferredLeaseTime"] = args?.ipv6AddressPreferredLeaseTime;
resourceInputs["netbiosNameServers"] = args?.netbiosNameServers;
resourceInputs["netbiosNodeType"] = args?.netbiosNodeType;
resourceInputs["ntpServers"] = args?.ntpServers;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["ownerId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcDhcpOptions.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcDhcpOptions = VpcDhcpOptions;
/** @internal */
VpcDhcpOptions.__pulumiType = 'aws:ec2/vpcDhcpOptions:VpcDhcpOptions';
//# sourceMappingURL=vpcDhcpOptions.js.map