GetVpcDhcpOptions

Retrieve information about an EC2 DHCP Options configuration.

Example Usage

Lookup by DHCP Options ID

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2.GetVpcDhcpOptions.InvokeAsync(new Aws.Ec2.GetVpcDhcpOptionsArgs
        {
            DhcpOptionsId = "dopts-12345678",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "dopts-12345678"
        _, err := ec2.LookupVpcDhcpOptions(ctx, &ec2.LookupVpcDhcpOptionsArgs{
            DhcpOptionsId: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_vpc_dhcp_options(dhcp_options_id="dopts-12345678")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2.getVpcDhcpOptions({
    dhcpOptionsId: "dopts-12345678",
}, { async: true }));

Lookup by Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2.GetVpcDhcpOptions.InvokeAsync(new Aws.Ec2.GetVpcDhcpOptionsArgs
        {
            Filters = 
            {
                new Aws.Ec2.Inputs.GetVpcDhcpOptionsFilterArgs
                {
                    Name = "key",
                    Values = 
                    {
                        "domain-name",
                    },
                },
                new Aws.Ec2.Inputs.GetVpcDhcpOptionsFilterArgs
                {
                    Name = "value",
                    Values = 
                    {
                        "example.com",
                    },
                },
            },
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ec2.LookupVpcDhcpOptions(ctx, &ec2.LookupVpcDhcpOptionsArgs{
            Filters: []ec2.GetVpcDhcpOptionsFilter{
                ec2.GetVpcDhcpOptionsFilter{
                    Name: "key",
                    Values: []string{
                        "domain-name",
                    },
                },
                ec2.GetVpcDhcpOptionsFilter{
                    Name: "value",
                    Values: []string{
                        "example.com",
                    },
                },
            },
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.get_vpc_dhcp_options(filters=[
    {
        "name": "key",
        "values": ["domain-name"],
    },
    {
        "name": "value",
        "values": ["example.com"],
    },
])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2.getVpcDhcpOptions({
    filters: [
        {
            name: "key",
            values: ["domain-name"],
        },
        {
            name: "value",
            values: ["example.com"],
        },
    ],
}, { async: true }));

Using GetVpcDhcpOptions

function getVpcDhcpOptions(args: GetVpcDhcpOptionsArgs, opts?: InvokeOptions): Promise<GetVpcDhcpOptionsResult>
function  get_vpc_dhcp_options(dhcp_options_id=None, filters=None, tags=None, opts=None)
func LookupVpcDhcpOptions(ctx *Context, args *LookupVpcDhcpOptionsArgs, opts ...InvokeOption) (*LookupVpcDhcpOptionsResult, error)

Note: This function is named LookupVpcDhcpOptions in the Go SDK.

public static class GetVpcDhcpOptions {
    public static Task<GetVpcDhcpOptionsResult> InvokeAsync(GetVpcDhcpOptionsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DhcpOptionsId string

The EC2 DHCP Options ID.

Filters List<GetVpcDhcpOptionsFilterArgs>

List of custom filters as described below.

Tags Dictionary<string, string>

A map of tags assigned to the resource.

DhcpOptionsId string

The EC2 DHCP Options ID.

Filters []GetVpcDhcpOptionsFilter

List of custom filters as described below.

Tags map[string]string

A map of tags assigned to the resource.

dhcpOptionsId string

The EC2 DHCP Options ID.

filters GetVpcDhcpOptionsFilter[]

List of custom filters as described below.

tags {[key: string]: string}

A map of tags assigned to the resource.

dhcp_options_id str

The EC2 DHCP Options ID.

filters List[GetVpcDhcpOptionsFilter]

List of custom filters as described below.

tags Dict[str, str]

A map of tags assigned to the resource.

GetVpcDhcpOptions Result

The following output properties are available:

Arn string

The ARN of the DHCP Options Set.

DhcpOptionsId string

EC2 DHCP Options ID

DomainName string

The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the search value in the /etc/resolv.conf file.

DomainNameServers List<string>

List of name servers.

Id string

The provider-assigned unique ID for this managed resource.

NetbiosNameServers List<string>

List of NETBIOS name servers.

NetbiosNodeType string

The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.

NtpServers List<string>

List of NTP servers.

OwnerId string

The ID of the AWS account that owns the DHCP options set.

Tags Dictionary<string, string>

A map of tags assigned to the resource.

Filters List<GetVpcDhcpOptionsFilter>
Arn string

The ARN of the DHCP Options Set.

DhcpOptionsId string

EC2 DHCP Options ID

DomainName string

The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the search value in the /etc/resolv.conf file.

DomainNameServers []string

List of name servers.

Id string

The provider-assigned unique ID for this managed resource.

NetbiosNameServers []string

List of NETBIOS name servers.

NetbiosNodeType string

The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.

NtpServers []string

List of NTP servers.

OwnerId string

The ID of the AWS account that owns the DHCP options set.

Tags map[string]string

A map of tags assigned to the resource.

Filters []GetVpcDhcpOptionsFilter
arn string

The ARN of the DHCP Options Set.

dhcpOptionsId string

EC2 DHCP Options ID

domainName string

The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the search value in the /etc/resolv.conf file.

domainNameServers string[]

List of name servers.

id string

The provider-assigned unique ID for this managed resource.

netbiosNameServers string[]

List of NETBIOS name servers.

netbiosNodeType string

The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.

ntpServers string[]

List of NTP servers.

ownerId string

The ID of the AWS account that owns the DHCP options set.

tags {[key: string]: string}

A map of tags assigned to the resource.

filters GetVpcDhcpOptionsFilter[]
arn str

The ARN of the DHCP Options Set.

dhcp_options_id str

EC2 DHCP Options ID

domain_name str

The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the search value in the /etc/resolv.conf file.

domain_name_servers List[str]

List of name servers.

id str

The provider-assigned unique ID for this managed resource.

netbios_name_servers List[str]

List of NETBIOS name servers.

netbios_node_type str

The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.

ntp_servers List[str]

List of NTP servers.

owner_id str

The ID of the AWS account that owns the DHCP options set.

tags Dict[str, str]

A map of tags assigned to the resource.

filters List[GetVpcDhcpOptionsFilter]

Supporting Types

GetVpcDhcpOptionsFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the field to filter.

Values List<string>

Set of values for filtering.

Name string

The name of the field to filter.

Values []string

Set of values for filtering.

name string

The name of the field to filter.

values string[]

Set of values for filtering.

name str

The name of the field to filter.

values List[str]

Set of values for filtering.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.