1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. DefaultVpcDhcpOptions
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ec2.DefaultVpcDhcpOptions

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a resource to manage the default AWS DHCP Options Set in the current region.

    Each AWS region comes with a default set of DHCP options. This is an advanced resource, and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.

    The aws.ec2.DefaultVpcDhcpOptions behaves differently from normal resources, in that this provider does not create this resource, but instead “adopts” it into management.

    Example Usage

    Basic usage with tags:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const _default = new aws.ec2.DefaultVpcDhcpOptions("default", {tags: {
        Name: "Default DHCP Option Set",
    }});
    
    import pulumi
    import pulumi_aws as aws
    
    default = aws.ec2.DefaultVpcDhcpOptions("default", tags={
        "Name": "Default DHCP Option Set",
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewDefaultVpcDhcpOptions(ctx, "default", &ec2.DefaultVpcDhcpOptionsArgs{
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("Default DHCP Option Set"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Aws.Ec2.DefaultVpcDhcpOptions("default", new()
        {
            Tags = 
            {
                { "Name", "Default DHCP Option Set" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.DefaultVpcDhcpOptions;
    import com.pulumi.aws.ec2.DefaultVpcDhcpOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    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 default_ = new DefaultVpcDhcpOptions("default", DefaultVpcDhcpOptionsArgs.builder()
                .tags(Map.of("Name", "Default DHCP Option Set"))
                .build());
    
        }
    }
    
    resources:
      default:
        type: aws:ec2:DefaultVpcDhcpOptions
        properties:
          tags:
            Name: Default DHCP Option Set
    

    Create DefaultVpcDhcpOptions Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DefaultVpcDhcpOptions(name: string, args?: DefaultVpcDhcpOptionsArgs, opts?: CustomResourceOptions);
    @overload
    def DefaultVpcDhcpOptions(resource_name: str,
                              args: Optional[DefaultVpcDhcpOptionsArgs] = None,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def DefaultVpcDhcpOptions(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              owner_id: Optional[str] = None,
                              tags: Optional[Mapping[str, str]] = None)
    func NewDefaultVpcDhcpOptions(ctx *Context, name string, args *DefaultVpcDhcpOptionsArgs, opts ...ResourceOption) (*DefaultVpcDhcpOptions, error)
    public DefaultVpcDhcpOptions(string name, DefaultVpcDhcpOptionsArgs? args = null, CustomResourceOptions? opts = null)
    public DefaultVpcDhcpOptions(String name, DefaultVpcDhcpOptionsArgs args)
    public DefaultVpcDhcpOptions(String name, DefaultVpcDhcpOptionsArgs args, CustomResourceOptions options)
    
    type: aws:ec2:DefaultVpcDhcpOptions
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DefaultVpcDhcpOptionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DefaultVpcDhcpOptionsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DefaultVpcDhcpOptionsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DefaultVpcDhcpOptionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DefaultVpcDhcpOptionsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var defaultVpcDhcpOptionsResource = new Aws.Ec2.DefaultVpcDhcpOptions("defaultVpcDhcpOptionsResource", new()
    {
        OwnerId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ec2.NewDefaultVpcDhcpOptions(ctx, "defaultVpcDhcpOptionsResource", &ec2.DefaultVpcDhcpOptionsArgs{
    	OwnerId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var defaultVpcDhcpOptionsResource = new DefaultVpcDhcpOptions("defaultVpcDhcpOptionsResource", DefaultVpcDhcpOptionsArgs.builder()
        .ownerId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    default_vpc_dhcp_options_resource = aws.ec2.DefaultVpcDhcpOptions("defaultVpcDhcpOptionsResource",
        owner_id="string",
        tags={
            "string": "string",
        })
    
    const defaultVpcDhcpOptionsResource = new aws.ec2.DefaultVpcDhcpOptions("defaultVpcDhcpOptionsResource", {
        ownerId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:ec2:DefaultVpcDhcpOptions
    properties:
        ownerId: string
        tags:
            string: string
    

    DefaultVpcDhcpOptions Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DefaultVpcDhcpOptions resource accepts the following input properties:

    OwnerId string
    The ID of the AWS account that owns the DHCP options set.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource.
    OwnerId string
    The ID of the AWS account that owns the DHCP options set.
    Tags map[string]string
    A map of tags to assign to the resource.
    ownerId String
    The ID of the AWS account that owns the DHCP options set.
    tags Map<String,String>
    A map of tags to assign to the resource.
    ownerId string
    The ID of the AWS account that owns the DHCP options set.
    tags {[key: string]: string}
    A map of tags to assign to the resource.
    owner_id str
    The ID of the AWS account that owns the DHCP options set.
    tags Mapping[str, str]
    A map of tags to assign to the resource.
    ownerId String
    The ID of the AWS account that owns the DHCP options set.
    tags Map<String>
    A map of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DefaultVpcDhcpOptions resource produces the following output properties:

    Arn string
    The ARN of the DHCP Options Set.
    DomainName string
    DomainNameServers string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6AddressPreferredLeaseTime string
    NetbiosNameServers string
    List of NETBIOS name servers.
    NetbiosNodeType string
    The 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.
    NtpServers string
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the DHCP Options Set.
    DomainName string
    DomainNameServers string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6AddressPreferredLeaseTime string
    NetbiosNameServers string
    List of NETBIOS name servers.
    NetbiosNodeType string
    The 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.
    NtpServers string
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    The ARN of the DHCP Options Set.
    domainName String
    domainNameServers String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6AddressPreferredLeaseTime String
    netbiosNameServers String
    List of NETBIOS name servers.
    netbiosNodeType String
    The 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.
    ntpServers String
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    The ARN of the DHCP Options Set.
    domainName string
    domainNameServers string
    id string
    The provider-assigned unique ID for this managed resource.
    ipv6AddressPreferredLeaseTime string
    netbiosNameServers string
    List of NETBIOS name servers.
    netbiosNodeType string
    The 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.
    ntpServers string
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    The ARN of the DHCP Options Set.
    domain_name str
    domain_name_servers str
    id str
    The provider-assigned unique ID for this managed resource.
    ipv6_address_preferred_lease_time str
    netbios_name_servers str
    List of NETBIOS name servers.
    netbios_node_type str
    The 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.
    ntp_servers str
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    The ARN of the DHCP Options Set.
    domainName String
    domainNameServers String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6AddressPreferredLeaseTime String
    netbiosNameServers String
    List of NETBIOS name servers.
    netbiosNodeType String
    The 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.
    ntpServers String
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Look up Existing DefaultVpcDhcpOptions Resource

    Get an existing DefaultVpcDhcpOptions resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DefaultVpcDhcpOptionsState, opts?: CustomResourceOptions): DefaultVpcDhcpOptions
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            domain_name: Optional[str] = None,
            domain_name_servers: Optional[str] = None,
            ipv6_address_preferred_lease_time: Optional[str] = None,
            netbios_name_servers: Optional[str] = None,
            netbios_node_type: Optional[str] = None,
            ntp_servers: Optional[str] = None,
            owner_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> DefaultVpcDhcpOptions
    func GetDefaultVpcDhcpOptions(ctx *Context, name string, id IDInput, state *DefaultVpcDhcpOptionsState, opts ...ResourceOption) (*DefaultVpcDhcpOptions, error)
    public static DefaultVpcDhcpOptions Get(string name, Input<string> id, DefaultVpcDhcpOptionsState? state, CustomResourceOptions? opts = null)
    public static DefaultVpcDhcpOptions get(String name, Output<String> id, DefaultVpcDhcpOptionsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The ARN of the DHCP Options Set.
    DomainName string
    DomainNameServers string
    Ipv6AddressPreferredLeaseTime string
    NetbiosNameServers string
    List of NETBIOS name servers.
    NetbiosNodeType string
    The 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.
    NtpServers string
    OwnerId string
    The ID of the AWS account that owns the DHCP options set.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the DHCP Options Set.
    DomainName string
    DomainNameServers string
    Ipv6AddressPreferredLeaseTime string
    NetbiosNameServers string
    List of NETBIOS name servers.
    NetbiosNodeType string
    The 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.
    NtpServers string
    OwnerId string
    The ID of the AWS account that owns the DHCP options set.
    Tags map[string]string
    A map of tags to assign to the resource.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    The ARN of the DHCP Options Set.
    domainName String
    domainNameServers String
    ipv6AddressPreferredLeaseTime String
    netbiosNameServers String
    List of NETBIOS name servers.
    netbiosNodeType String
    The 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.
    ntpServers String
    ownerId String
    The ID of the AWS account that owns the DHCP options set.
    tags Map<String,String>
    A map of tags to assign to the resource.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    The ARN of the DHCP Options Set.
    domainName string
    domainNameServers string
    ipv6AddressPreferredLeaseTime string
    netbiosNameServers string
    List of NETBIOS name servers.
    netbiosNodeType string
    The 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.
    ntpServers string
    ownerId string
    The ID of the AWS account that owns the DHCP options set.
    tags {[key: string]: string}
    A map of tags to assign to the resource.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    The ARN of the DHCP Options Set.
    domain_name str
    domain_name_servers str
    ipv6_address_preferred_lease_time str
    netbios_name_servers str
    List of NETBIOS name servers.
    netbios_node_type str
    The 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.
    ntp_servers str
    owner_id str
    The ID of the AWS account that owns the DHCP options set.
    tags Mapping[str, str]
    A map of tags to assign to the resource.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    The ARN of the DHCP Options Set.
    domainName String
    domainNameServers String
    ipv6AddressPreferredLeaseTime String
    netbiosNameServers String
    List of NETBIOS name servers.
    netbiosNodeType String
    The 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.
    ntpServers String
    ownerId String
    The ID of the AWS account that owns the DHCP options set.
    tags Map<String>
    A map of tags to assign to the resource.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import VPC DHCP Options using the DHCP Options id. For example:

    $ pulumi import aws:ec2/defaultVpcDhcpOptions:DefaultVpcDhcpOptions default_options dopt-d9070ebb
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi