Class VpcDhcpOptions


  • public class VpcDhcpOptions
    extends com.pulumi.resources.CustomResource
    Provides a VPC DHCP Options resource. You can find more technical documentation about DHCP Options Set in the official [AWS User Guide](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html). ## Example Usage Basic usage:
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2.VpcDhcpOptions;
     import com.pulumi.aws.ec2.VpcDhcpOptionsArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var dnsResolver = new VpcDhcpOptions("dnsResolver", VpcDhcpOptionsArgs.builder()
                 .domainNameServers(            
                     "8.8.8.8",
                     "8.8.4.4")
                 .build());
     
         }
     }
     
     
    Full usage:
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2.VpcDhcpOptions;
     import com.pulumi.aws.ec2.VpcDhcpOptionsArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var foo = new VpcDhcpOptions("foo", VpcDhcpOptionsArgs.builder()
                 .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(Map.of("Name", "foo-name"))
                 .build());
     
         }
     }
     
     
    ## 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 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> domainName()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> domainNameServers()  
      static VpcDhcpOptions get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VpcDhcpOptionsState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> ipv6AddressPreferredLeaseTime()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> netbiosNameServers()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> netbiosNodeType()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> ntpServers()  
      com.pulumi.core.Output<java.lang.String> ownerId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VpcDhcpOptions

        public VpcDhcpOptions​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • VpcDhcpOptions

        public VpcDhcpOptions​(java.lang.String name,
                              @Nullable
                              VpcDhcpOptionsArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • VpcDhcpOptions

        public VpcDhcpOptions​(java.lang.String name,
                              @Nullable
                              VpcDhcpOptionsArgs args,
                              @Nullable
                              com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the DHCP Options Set.
      • domainName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> domainName()
        Returns:
        the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the `search` value in the `/etc/resolv.conf` file.
      • domainNameServers

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> domainNameServers()
        Returns:
        List of name servers to configure in `/etc/resolv.conf`. If you want to use the default AWS nameservers you should set this to `AmazonProvidedDNS`.
      • ipv6AddressPreferredLeaseTime

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ipv6AddressPreferredLeaseTime()
        Returns:
        How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal. Acceptable values are between 140 and 2147483647 (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.
      • netbiosNameServers

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> netbiosNameServers()
        Returns:
        List of NETBIOS name servers.
      • netbiosNodeType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> netbiosNodeType()
        Returns:
        NetBIOS node type (1, 2, 4, or 8). AWS recommends to specify 2 since broadcast and multicast are not supported in their network. For more information about these node types, see [RFC 2132](http://www.ietf.org/rfc/rfc2132.txt).
      • ntpServers

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> ntpServers()
        Returns:
        List of NTP servers to configure.
      • ownerId

        public com.pulumi.core.Output<java.lang.String> ownerId()
        Returns:
        ID of the AWS account that owns the DHCP options set.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. > **Note:** All arguments are optional but at least one must be specified. `domainNameServers`, `netbiosNameServers`, and `ntpServers` are limited to four servers each. To use the DHCP Options Set you must 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, set `domainNameServers` to `AmazonProvidedDNS` unless configuring your own DNS.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • get

        public static VpcDhcpOptions get​(java.lang.String name,
                                         com.pulumi.core.Output<java.lang.String> id,
                                         @Nullable
                                         VpcDhcpOptionsState state,
                                         @Nullable
                                         com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.