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
LookupVpcDhcpOptionsin the Go SDK.
public static class GetVpcDhcpOptions {
public static Task<GetVpcDhcpOptionsResult> InvokeAsync(GetVpcDhcpOptionsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Dhcp
Options stringId The EC2 DHCP Options ID.
- Filters
List<Get
Vpc Dhcp Options Filter Args> List of custom filters as described below.
- Dictionary<string, string>
A map of tags assigned to the resource.
- Dhcp
Options stringId The EC2 DHCP Options ID.
- Filters
[]Get
Vpc Dhcp Options Filter List of custom filters as described below.
- map[string]string
A map of tags assigned to the resource.
- dhcp
Options stringId The EC2 DHCP Options ID.
- filters
Get
Vpc Dhcp Options Filter[] List of custom filters as described below.
- {[key: string]: string}
A map of tags assigned to the resource.
- dhcp_
options_ strid The EC2 DHCP Options ID.
- filters
List[Get
Vpc Dhcp Options Filter] List of custom filters as described below.
- 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.
- Dhcp
Options stringId EC2 DHCP Options ID
- Domain
Name string The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the
searchvalue in the/etc/resolv.conffile.- Domain
Name List<string>Servers List of name servers.
- Id string
The provider-assigned unique ID for this managed resource.
- Netbios
Name List<string>Servers List of NETBIOS name servers.
- Netbios
Node stringType The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.
- Ntp
Servers List<string> List of NTP servers.
- Owner
Id string The ID of the AWS account that owns the DHCP options set.
- Dictionary<string, string>
A map of tags assigned to the resource.
- Filters
List<Get
Vpc Dhcp Options Filter>
- Arn string
The ARN of the DHCP Options Set.
- Dhcp
Options stringId EC2 DHCP Options ID
- Domain
Name string The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the
searchvalue in the/etc/resolv.conffile.- Domain
Name []stringServers List of name servers.
- Id string
The provider-assigned unique ID for this managed resource.
- Netbios
Name []stringServers List of NETBIOS name servers.
- Netbios
Node stringType The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.
- Ntp
Servers []string List of NTP servers.
- Owner
Id string The ID of the AWS account that owns the DHCP options set.
- map[string]string
A map of tags assigned to the resource.
- Filters
[]Get
Vpc Dhcp Options Filter
- arn string
The ARN of the DHCP Options Set.
- dhcp
Options stringId EC2 DHCP Options ID
- domain
Name string The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the
searchvalue in the/etc/resolv.conffile.- domain
Name string[]Servers List of name servers.
- id string
The provider-assigned unique ID for this managed resource.
- netbios
Name string[]Servers List of NETBIOS name servers.
- netbios
Node stringType The NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.
- ntp
Servers string[] List of NTP servers.
- owner
Id string The ID of the AWS account that owns the DHCP options set.
- {[key: string]: string}
A map of tags assigned to the resource.
- filters
Get
Vpc Dhcp Options Filter[]
- arn str
The ARN of the DHCP Options Set.
- dhcp_
options_ strid EC2 DHCP Options ID
- domain_
name str The suffix domain name to used when resolving non Fully Qualified Domain Names. e.g. the
searchvalue in the/etc/resolv.conffile.- domain_
name_ List[str]servers List of name servers.
- id str
The provider-assigned unique ID for this managed resource.
- netbios_
name_ List[str]servers List of NETBIOS name servers.
- netbios_
node_ strtype 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.
- Dict[str, str]
A map of tags assigned to the resource.
- filters
List[Get
Vpc Dhcp Options Filter]
Supporting Types
GetVpcDhcpOptionsFilter
- Name string
The name of the field to filter.
- Values List<string>
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
awsTerraform Provider.