oci.Core.getDhcpOptions
Explore with Pulumi AI
This data source provides the list of Dhcp Options in Oracle Cloud Infrastructure Core service.
Lists the sets of DHCP options in the specified VCN and specified compartment. If the VCN ID is not provided, then the list includes the sets of DHCP options from all VCNs in the specified compartment. The response includes the default set of options that automatically comes with each VCN, plus any other sets you’ve created.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDhcpOptions = oci.Core.getDhcpOptions({
compartmentId: compartmentId,
displayName: dhcpOptionsDisplayName,
state: dhcpOptionsState,
vcnId: testVcn.id,
});
import pulumi
import pulumi_oci as oci
test_dhcp_options = oci.Core.get_dhcp_options(compartment_id=compartment_id,
display_name=dhcp_options_display_name,
state=dhcp_options_state,
vcn_id=test_vcn["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Core.GetDhcpOptions(ctx, &core.GetDhcpOptionsArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(dhcpOptionsDisplayName),
State: pulumi.StringRef(dhcpOptionsState),
VcnId: pulumi.StringRef(testVcn.Id),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testDhcpOptions = Oci.Core.GetDhcpOptions.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = dhcpOptionsDisplayName,
State = dhcpOptionsState,
VcnId = testVcn.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetDhcpOptionsArgs;
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 testDhcpOptions = CoreFunctions.getDhcpOptions(GetDhcpOptionsArgs.builder()
.compartmentId(compartmentId)
.displayName(dhcpOptionsDisplayName)
.state(dhcpOptionsState)
.vcnId(testVcn.id())
.build());
}
}
variables:
testDhcpOptions:
fn::invoke:
Function: oci:Core:getDhcpOptions
Arguments:
compartmentId: ${compartmentId}
displayName: ${dhcpOptionsDisplayName}
state: ${dhcpOptionsState}
vcnId: ${testVcn.id}
Using getDhcpOptions
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 getDhcpOptions(args: GetDhcpOptionsArgs, opts?: InvokeOptions): Promise<GetDhcpOptionsResult>
function getDhcpOptionsOutput(args: GetDhcpOptionsOutputArgs, opts?: InvokeOptions): Output<GetDhcpOptionsResult>
def get_dhcp_options(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_core.GetDhcpOptionsFilter]] = None,
state: Optional[str] = None,
vcn_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDhcpOptionsResult
def get_dhcp_options_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetDhcpOptionsFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
vcn_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDhcpOptionsResult]
func GetDhcpOptions(ctx *Context, args *GetDhcpOptionsArgs, opts ...InvokeOption) (*GetDhcpOptionsResult, error)
func GetDhcpOptionsOutput(ctx *Context, args *GetDhcpOptionsOutputArgs, opts ...InvokeOption) GetDhcpOptionsResultOutput
> Note: This function is named GetDhcpOptions
in the Go SDK.
public static class GetDhcpOptions
{
public static Task<GetDhcpOptionsResult> InvokeAsync(GetDhcpOptionsArgs args, InvokeOptions? opts = null)
public static Output<GetDhcpOptionsResult> Invoke(GetDhcpOptionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDhcpOptionsResult> getDhcpOptions(GetDhcpOptionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getDhcpOptions:getDhcpOptions
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
List<Get
Dhcp Options Filter> - State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Vcn
Id string - The OCID of the VCN.
- Compartment
Id string - The OCID of the compartment.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
[]Get
Dhcp Options Filter - State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Vcn
Id string - The OCID of the VCN.
- compartment
Id String - The OCID of the compartment.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters
List<Get
Dhcp Options Filter> - state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id String - The OCID of the VCN.
- compartment
Id string - The OCID of the compartment.
- display
Name string - A filter to return only resources that match the given display name exactly.
- filters
Get
Dhcp Options Filter[] - state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id string - The OCID of the VCN.
- compartment_
id str - The OCID of the compartment.
- display_
name str - A filter to return only resources that match the given display name exactly.
- filters
Sequence[core.
Get Dhcp Options Filter] - state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn_
id str - The OCID of the VCN.
- compartment
Id String - The OCID of the compartment.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters List<Property Map>
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id String - The OCID of the VCN.
getDhcpOptions Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment containing the set of DHCP options.
- Id string
- The provider-assigned unique ID for this managed resource.
- Options
List<Get
Dhcp Options Option> - The collection of individual DHCP options.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
List<Get
Dhcp Options Filter> - State string
- The current state of the set of DHCP options.
- Vcn
Id string - The OCID of the VCN the set of DHCP options belongs to.
- Compartment
Id string - The OCID of the compartment containing the set of DHCP options.
- Id string
- The provider-assigned unique ID for this managed resource.
- Options
[]Get
Dhcp Options Option - The collection of individual DHCP options.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Filters
[]Get
Dhcp Options Filter - State string
- The current state of the set of DHCP options.
- Vcn
Id string - The OCID of the VCN the set of DHCP options belongs to.
- compartment
Id String - The OCID of the compartment containing the set of DHCP options.
- id String
- The provider-assigned unique ID for this managed resource.
- options
List<Get
Dhcp Options Option> - The collection of individual DHCP options.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
List<Get
Dhcp Options Filter> - state String
- The current state of the set of DHCP options.
- vcn
Id String - The OCID of the VCN the set of DHCP options belongs to.
- compartment
Id string - The OCID of the compartment containing the set of DHCP options.
- id string
- The provider-assigned unique ID for this managed resource.
- options
Get
Dhcp Options Option[] - The collection of individual DHCP options.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
Get
Dhcp Options Filter[] - state string
- The current state of the set of DHCP options.
- vcn
Id string - The OCID of the VCN the set of DHCP options belongs to.
- compartment_
id str - The OCID of the compartment containing the set of DHCP options.
- id str
- The provider-assigned unique ID for this managed resource.
- options
Sequence[core.
Get Dhcp Options Option] - The collection of individual DHCP options.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters
Sequence[core.
Get Dhcp Options Filter] - state str
- The current state of the set of DHCP options.
- vcn_
id str - The OCID of the VCN the set of DHCP options belongs to.
- compartment
Id String - The OCID of the compartment containing the set of DHCP options.
- id String
- The provider-assigned unique ID for this managed resource.
- options List<Property Map>
- The collection of individual DHCP options.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- filters List<Property Map>
- state String
- The current state of the set of DHCP options.
- vcn
Id String - The OCID of the VCN the set of DHCP options belongs to.
Supporting Types
GetDhcpOptionsFilter
GetDhcpOptionsOption
- Compartment
Id string - The OCID of the compartment.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Domain
Name stringType - The search domain name type of DHCP options
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- Oracle ID (OCID) for the set of DHCP options.
- Options
List<Get
Dhcp Options Option Option> - The collection of individual DHCP options.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Time
Created string - Date and time the set of DHCP options was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id string - The OCID of the VCN.
- Compartment
Id string - The OCID of the compartment.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Domain
Name stringType - The search domain name type of DHCP options
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- Oracle ID (OCID) for the set of DHCP options.
- Options
[]Get
Dhcp Options Option Option - The collection of individual DHCP options.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Time
Created string - Date and time the set of DHCP options was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id string - The OCID of the VCN.
- compartment
Id String - The OCID of the compartment.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String - A filter to return only resources that match the given display name exactly.
- domain
Name StringType - The search domain name type of DHCP options
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- Oracle ID (OCID) for the set of DHCP options.
- options
List<Get
Dhcp Options Option Option> - The collection of individual DHCP options.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created String - Date and time the set of DHCP options was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id String - The OCID of the VCN.
- compartment
Id string - The OCID of the compartment.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name string - A filter to return only resources that match the given display name exactly.
- domain
Name stringType - The search domain name type of DHCP options
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id string
- Oracle ID (OCID) for the set of DHCP options.
- options
Get
Dhcp Options Option Option[] - The collection of individual DHCP options.
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created string - Date and time the set of DHCP options was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id string - The OCID of the VCN.
- compartment_
id str - The OCID of the compartment.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display_
name str - A filter to return only resources that match the given display name exactly.
- domain_
name_ strtype - The search domain name type of DHCP options
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id str
- Oracle ID (OCID) for the set of DHCP options.
- options
Sequence[core.
Get Dhcp Options Option Option] - The collection of individual DHCP options.
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time_
created str - Date and time the set of DHCP options was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn_
id str - The OCID of the VCN.
- compartment
Id String - The OCID of the compartment.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String - A filter to return only resources that match the given display name exactly.
- domain
Name StringType - The search domain name type of DHCP options
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- Oracle ID (OCID) for the set of DHCP options.
- options List<Property Map>
- The collection of individual DHCP options.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created String - Date and time the set of DHCP options was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id String - The OCID of the VCN.
GetDhcpOptionsOptionOption
- Custom
Dns List<string>Servers - If you set
serverType
toCustomDnsServer
, specify the IP address of at least one DNS server of your choice (three maximum). - Search
Domain List<string>Names - A single search domain name according to RFC 952 and RFC 1123. During a DNS query, the OS will append this search domain name to the value being queried.
- Server
Type string - VcnLocal: Reserved for future use.
- VcnLocalPlusInternet: Also referred to as "Internet and VCN Resolver". Instances can resolve internet hostnames (no internet gateway is required), and can resolve hostnames of instances in the VCN. This is the default value in the default set of DHCP options in the VCN. For the Internet and VCN Resolver to work across the VCN, there must also be a DNS label set for the VCN, a DNS label set for each subnet, and a hostname for each instance. The Internet and VCN Resolver also enables reverse DNS lookup, which lets you determine the hostname corresponding to the private IP address. For more information, see DNS in Your Virtual Cloud Network.
- CustomDnsServer: Instances use a DNS server of your choice (three maximum).
- Type string
- The specific DHCP option. Either
DomainNameServer
(for DhcpDnsOption) orSearchDomain
(for DhcpSearchDomainOption).
- Custom
Dns []stringServers - If you set
serverType
toCustomDnsServer
, specify the IP address of at least one DNS server of your choice (three maximum). - Search
Domain []stringNames - A single search domain name according to RFC 952 and RFC 1123. During a DNS query, the OS will append this search domain name to the value being queried.
- Server
Type string - VcnLocal: Reserved for future use.
- VcnLocalPlusInternet: Also referred to as "Internet and VCN Resolver". Instances can resolve internet hostnames (no internet gateway is required), and can resolve hostnames of instances in the VCN. This is the default value in the default set of DHCP options in the VCN. For the Internet and VCN Resolver to work across the VCN, there must also be a DNS label set for the VCN, a DNS label set for each subnet, and a hostname for each instance. The Internet and VCN Resolver also enables reverse DNS lookup, which lets you determine the hostname corresponding to the private IP address. For more information, see DNS in Your Virtual Cloud Network.
- CustomDnsServer: Instances use a DNS server of your choice (three maximum).
- Type string
- The specific DHCP option. Either
DomainNameServer
(for DhcpDnsOption) orSearchDomain
(for DhcpSearchDomainOption).
- custom
Dns List<String>Servers - If you set
serverType
toCustomDnsServer
, specify the IP address of at least one DNS server of your choice (three maximum). - search
Domain List<String>Names - A single search domain name according to RFC 952 and RFC 1123. During a DNS query, the OS will append this search domain name to the value being queried.
- server
Type String - VcnLocal: Reserved for future use.
- VcnLocalPlusInternet: Also referred to as "Internet and VCN Resolver". Instances can resolve internet hostnames (no internet gateway is required), and can resolve hostnames of instances in the VCN. This is the default value in the default set of DHCP options in the VCN. For the Internet and VCN Resolver to work across the VCN, there must also be a DNS label set for the VCN, a DNS label set for each subnet, and a hostname for each instance. The Internet and VCN Resolver also enables reverse DNS lookup, which lets you determine the hostname corresponding to the private IP address. For more information, see DNS in Your Virtual Cloud Network.
- CustomDnsServer: Instances use a DNS server of your choice (three maximum).
- type String
- The specific DHCP option. Either
DomainNameServer
(for DhcpDnsOption) orSearchDomain
(for DhcpSearchDomainOption).
- custom
Dns string[]Servers - If you set
serverType
toCustomDnsServer
, specify the IP address of at least one DNS server of your choice (three maximum). - search
Domain string[]Names - A single search domain name according to RFC 952 and RFC 1123. During a DNS query, the OS will append this search domain name to the value being queried.
- server
Type string - VcnLocal: Reserved for future use.
- VcnLocalPlusInternet: Also referred to as "Internet and VCN Resolver". Instances can resolve internet hostnames (no internet gateway is required), and can resolve hostnames of instances in the VCN. This is the default value in the default set of DHCP options in the VCN. For the Internet and VCN Resolver to work across the VCN, there must also be a DNS label set for the VCN, a DNS label set for each subnet, and a hostname for each instance. The Internet and VCN Resolver also enables reverse DNS lookup, which lets you determine the hostname corresponding to the private IP address. For more information, see DNS in Your Virtual Cloud Network.
- CustomDnsServer: Instances use a DNS server of your choice (three maximum).
- type string
- The specific DHCP option. Either
DomainNameServer
(for DhcpDnsOption) orSearchDomain
(for DhcpSearchDomainOption).
- custom_
dns_ Sequence[str]servers - If you set
serverType
toCustomDnsServer
, specify the IP address of at least one DNS server of your choice (three maximum). - search_
domain_ Sequence[str]names - A single search domain name according to RFC 952 and RFC 1123. During a DNS query, the OS will append this search domain name to the value being queried.
- server_
type str - VcnLocal: Reserved for future use.
- VcnLocalPlusInternet: Also referred to as "Internet and VCN Resolver". Instances can resolve internet hostnames (no internet gateway is required), and can resolve hostnames of instances in the VCN. This is the default value in the default set of DHCP options in the VCN. For the Internet and VCN Resolver to work across the VCN, there must also be a DNS label set for the VCN, a DNS label set for each subnet, and a hostname for each instance. The Internet and VCN Resolver also enables reverse DNS lookup, which lets you determine the hostname corresponding to the private IP address. For more information, see DNS in Your Virtual Cloud Network.
- CustomDnsServer: Instances use a DNS server of your choice (three maximum).
- type str
- The specific DHCP option. Either
DomainNameServer
(for DhcpDnsOption) orSearchDomain
(for DhcpSearchDomainOption).
- custom
Dns List<String>Servers - If you set
serverType
toCustomDnsServer
, specify the IP address of at least one DNS server of your choice (three maximum). - search
Domain List<String>Names - A single search domain name according to RFC 952 and RFC 1123. During a DNS query, the OS will append this search domain name to the value being queried.
- server
Type String - VcnLocal: Reserved for future use.
- VcnLocalPlusInternet: Also referred to as "Internet and VCN Resolver". Instances can resolve internet hostnames (no internet gateway is required), and can resolve hostnames of instances in the VCN. This is the default value in the default set of DHCP options in the VCN. For the Internet and VCN Resolver to work across the VCN, there must also be a DNS label set for the VCN, a DNS label set for each subnet, and a hostname for each instance. The Internet and VCN Resolver also enables reverse DNS lookup, which lets you determine the hostname corresponding to the private IP address. For more information, see DNS in Your Virtual Cloud Network.
- CustomDnsServer: Instances use a DNS server of your choice (three maximum).
- type String
- The specific DHCP option. Either
DomainNameServer
(for DhcpDnsOption) orSearchDomain
(for DhcpSearchDomainOption).
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.