Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.ec2.getVpcDhcpOptions
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
Retrieve information about an EC2 DHCP Options configuration.
Example Usage
Lookup by DHCP Options ID
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getVpcDhcpOptions({
dhcpOptionsId: "dopts-12345678",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_vpc_dhcp_options(dhcp_options_id="dopts-12345678")
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.LookupVpcDhcpOptions(ctx, &ec2.LookupVpcDhcpOptionsArgs{
DhcpOptionsId: pulumi.StringRef("dopts-12345678"),
}, nil)
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 example = Aws.Ec2.GetVpcDhcpOptions.Invoke(new()
{
DhcpOptionsId = "dopts-12345678",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetVpcDhcpOptionsArgs;
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) {
final var example = Ec2Functions.getVpcDhcpOptions(GetVpcDhcpOptionsArgs.builder()
.dhcpOptionsId("dopts-12345678")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2:getVpcDhcpOptions
Arguments:
dhcpOptionsId: dopts-12345678
Lookup by Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getVpcDhcpOptions({
filters: [
{
name: "key",
values: ["domain-name"],
},
{
name: "value",
values: ["example.com"],
},
],
});
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"],
},
])
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.LookupVpcDhcpOptions(ctx, &ec2.LookupVpcDhcpOptionsArgs{
Filters: []ec2.GetVpcDhcpOptionsFilter{
{
Name: "key",
Values: []string{
"domain-name",
},
},
{
Name: "value",
Values: []string{
"example.com",
},
},
},
}, nil)
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 example = Aws.Ec2.GetVpcDhcpOptions.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetVpcDhcpOptionsFilterInputArgs
{
Name = "key",
Values = new[]
{
"domain-name",
},
},
new Aws.Ec2.Inputs.GetVpcDhcpOptionsFilterInputArgs
{
Name = "value",
Values = new[]
{
"example.com",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetVpcDhcpOptionsArgs;
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) {
final var example = Ec2Functions.getVpcDhcpOptions(GetVpcDhcpOptionsArgs.builder()
.filters(
GetVpcDhcpOptionsFilterArgs.builder()
.name("key")
.values("domain-name")
.build(),
GetVpcDhcpOptionsFilterArgs.builder()
.name("value")
.values("example.com")
.build())
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2:getVpcDhcpOptions
Arguments:
filters:
- name: key
values:
- domain-name
- name: value
values:
- example.com
Using getVpcDhcpOptions
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVpcDhcpOptions(args: GetVpcDhcpOptionsArgs, opts?: InvokeOptions): Promise<GetVpcDhcpOptionsResult>
function getVpcDhcpOptionsOutput(args: GetVpcDhcpOptionsOutputArgs, opts?: InvokeOptions): Output<GetVpcDhcpOptionsResult>
def get_vpc_dhcp_options(dhcp_options_id: Optional[str] = None,
filters: Optional[Sequence[GetVpcDhcpOptionsFilter]] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcDhcpOptionsResult
def get_vpc_dhcp_options_output(dhcp_options_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVpcDhcpOptionsFilterArgs]]]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcDhcpOptionsResult]
func LookupVpcDhcpOptions(ctx *Context, args *LookupVpcDhcpOptionsArgs, opts ...InvokeOption) (*LookupVpcDhcpOptionsResult, error)
func LookupVpcDhcpOptionsOutput(ctx *Context, args *LookupVpcDhcpOptionsOutputArgs, opts ...InvokeOption) LookupVpcDhcpOptionsResultOutput
> Note: This function is named LookupVpcDhcpOptions
in the Go SDK.
public static class GetVpcDhcpOptions
{
public static Task<GetVpcDhcpOptionsResult> InvokeAsync(GetVpcDhcpOptionsArgs args, InvokeOptions? opts = null)
public static Output<GetVpcDhcpOptionsResult> Invoke(GetVpcDhcpOptionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcDhcpOptionsResult> getVpcDhcpOptions(GetVpcDhcpOptionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2/getVpcDhcpOptions:getVpcDhcpOptions
arguments:
# arguments dictionary
The following arguments are supported:
- Dhcp
Options stringId - EC2 DHCP Options ID.
- Filters
List<Get
Vpc Dhcp Options Filter> - List of custom filters as described below.
- Dictionary<string, string>
- Map of tags assigned to the resource.
- Dhcp
Options stringId - EC2 DHCP Options ID.
- Filters
[]Get
Vpc Dhcp Options Filter - List of custom filters as described below.
- map[string]string
- Map of tags assigned to the resource.
- dhcp
Options StringId - EC2 DHCP Options ID.
- filters
List<Get
Vpc Dhcp Options Filter> - List of custom filters as described below.
- Map<String,String>
- Map of tags assigned to the resource.
- dhcp
Options stringId - EC2 DHCP Options ID.
- filters
Get
Vpc Dhcp Options Filter[] - List of custom filters as described below.
- {[key: string]: string}
- Map of tags assigned to the resource.
- dhcp_
options_ strid - EC2 DHCP Options ID.
- filters
Sequence[Get
Vpc Dhcp Options Filter] - List of custom filters as described below.
- Mapping[str, str]
- Map of tags assigned to the resource.
- dhcp
Options StringId - EC2 DHCP Options ID.
- filters List<Property Map>
- List of custom filters as described below.
- Map<String>
- Map of tags assigned to the resource.
getVpcDhcpOptions Result
The following output properties are available:
- Arn string
- ARN of the DHCP Options Set.
- Dhcp
Options stringId - EC2 DHCP Options ID
- Domain
Name string - Suffix domain name to used when resolving non Fully Qualified Domain NamesE.g., the
search
value in the/etc/resolv.conf
file. - Domain
Name List<string>Servers - List of name servers.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Address
Preferred stringLease Time - How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
- Netbios
Name List<string>Servers - List of NETBIOS name servers.
- Netbios
Node stringType - 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 - ID of the AWS account that owns the DHCP options set.
- Dictionary<string, string>
- Map of tags assigned to the resource.
- Filters
List<Get
Vpc Dhcp Options Filter>
- Arn string
- ARN of the DHCP Options Set.
- Dhcp
Options stringId - EC2 DHCP Options ID
- Domain
Name string - Suffix domain name to used when resolving non Fully Qualified Domain NamesE.g., the
search
value in the/etc/resolv.conf
file. - Domain
Name []stringServers - List of name servers.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Address
Preferred stringLease Time - How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
- Netbios
Name []stringServers - List of NETBIOS name servers.
- Netbios
Node stringType - 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 - ID of the AWS account that owns the DHCP options set.
- map[string]string
- Map of tags assigned to the resource.
- Filters
[]Get
Vpc Dhcp Options Filter
- arn String
- ARN of the DHCP Options Set.
- dhcp
Options StringId - EC2 DHCP Options ID
- domain
Name String - Suffix domain name to used when resolving non Fully Qualified Domain NamesE.g., the
search
value in the/etc/resolv.conf
file. - domain
Name List<String>Servers - List of name servers.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Address
Preferred StringLease Time - How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
- netbios
Name List<String>Servers - List of NETBIOS name servers.
- netbios
Node StringType - 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 - ID of the AWS account that owns the DHCP options set.
- Map<String,String>
- Map of tags assigned to the resource.
- filters
List<Get
Vpc Dhcp Options Filter>
- arn string
- ARN of the DHCP Options Set.
- dhcp
Options stringId - EC2 DHCP Options ID
- domain
Name string - Suffix domain name to used when resolving non Fully Qualified Domain NamesE.g., the
search
value in the/etc/resolv.conf
file. - domain
Name string[]Servers - List of name servers.
- id string
- The provider-assigned unique ID for this managed resource.
- ipv6Address
Preferred stringLease Time - How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
- netbios
Name string[]Servers - List of NETBIOS name servers.
- netbios
Node stringType - 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 - ID of the AWS account that owns the DHCP options set.
- {[key: string]: string}
- Map of tags assigned to the resource.
- filters
Get
Vpc Dhcp Options Filter[]
- arn str
- ARN of the DHCP Options Set.
- dhcp_
options_ strid - EC2 DHCP Options ID
- domain_
name str - Suffix domain name to used when resolving non Fully Qualified Domain NamesE.g., the
search
value in the/etc/resolv.conf
file. - domain_
name_ Sequence[str]servers - List of name servers.
- id str
- The provider-assigned unique ID for this managed resource.
- ipv6_
address_ strpreferred_ lease_ time - How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
- netbios_
name_ Sequence[str]servers - List of NETBIOS name servers.
- netbios_
node_ strtype - NetBIOS node type (1, 2, 4, or 8). For more information about these node types, see RFC 2132.
- ntp_
servers Sequence[str] - List of NTP servers.
- owner_
id str - ID of the AWS account that owns the DHCP options set.
- Mapping[str, str]
- Map of tags assigned to the resource.
- filters
Sequence[Get
Vpc Dhcp Options Filter]
- arn String
- ARN of the DHCP Options Set.
- dhcp
Options StringId - EC2 DHCP Options ID
- domain
Name String - Suffix domain name to used when resolving non Fully Qualified Domain NamesE.g., the
search
value in the/etc/resolv.conf
file. - domain
Name List<String>Servers - List of name servers.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Address
Preferred StringLease Time - How frequently, in seconds, a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
- netbios
Name List<String>Servers - List of NETBIOS name servers.
- netbios
Node StringType - 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 - ID of the AWS account that owns the DHCP options set.
- Map<String>
- Map of tags assigned to the resource.
- filters List<Property Map>
Supporting Types
GetVpcDhcpOptionsFilter
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi