iosxe.Dhcp
Explore with Pulumi AI
This resource can manage the DHCP configuration.
Example Usage
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.iosxe.Dhcp;
import com.pulumi.iosxe.DhcpArgs;
import com.pulumi.iosxe.inputs.DhcpSnoopingVlanArgs;
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 example = new Dhcp("example", DhcpArgs.builder()
.relayInformationOptionDefault(false)
.relayInformationOptionVpn(true)
.relayInformationTrustAll(false)
.snooping(true)
.snoopingVlans(DhcpSnoopingVlanArgs.builder()
.vlan_id("3-4")
.build())
.build());
}
}
Coming soon!
Coming soon!
resources:
example:
type: iosxe:Dhcp
properties:
relayInformationOptionDefault: false
relayInformationOptionVpn: true
relayInformationTrustAll: false
snooping: true
snoopingVlans:
- vlan_id: 3-4
Create Dhcp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Dhcp(name: string, args?: DhcpArgs, opts?: CustomResourceOptions);
@overload
def Dhcp(resource_name: str,
args: Optional[DhcpArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Dhcp(resource_name: str,
opts: Optional[ResourceOptions] = None,
compatibility_suboption_link_selection: Optional[str] = None,
compatibility_suboption_server_override: Optional[str] = None,
delete_mode: Optional[str] = None,
device: Optional[str] = None,
relay_information_option_default: Optional[bool] = None,
relay_information_option_vpn: Optional[bool] = None,
relay_information_trust_all: Optional[bool] = None,
snooping: Optional[bool] = None,
snooping_information_option_format_remote_id_hostname: Optional[bool] = None,
snooping_vlans: Optional[Sequence[DhcpSnoopingVlanArgs]] = None)
func NewDhcp(ctx *Context, name string, args *DhcpArgs, opts ...ResourceOption) (*Dhcp, error)
public Dhcp(string name, DhcpArgs? args = null, CustomResourceOptions? opts = null)
type: iosxe:Dhcp
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 DhcpArgs
- 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 DhcpArgs
- 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 DhcpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DhcpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DhcpArgs
- 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 dhcpResource = new Iosxe.Dhcp("dhcpResource", new()
{
CompatibilitySuboptionLinkSelection = "string",
CompatibilitySuboptionServerOverride = "string",
DeleteMode = "string",
Device = "string",
RelayInformationOptionDefault = false,
RelayInformationOptionVpn = false,
RelayInformationTrustAll = false,
Snooping = false,
SnoopingInformationOptionFormatRemoteIdHostname = false,
SnoopingVlans = new[]
{
new Iosxe.Inputs.DhcpSnoopingVlanArgs
{
VlanId = "string",
},
},
});
example, err := iosxe.NewDhcp(ctx, "dhcpResource", &iosxe.DhcpArgs{
CompatibilitySuboptionLinkSelection: pulumi.String("string"),
CompatibilitySuboptionServerOverride: pulumi.String("string"),
DeleteMode: pulumi.String("string"),
Device: pulumi.String("string"),
RelayInformationOptionDefault: pulumi.Bool(false),
RelayInformationOptionVpn: pulumi.Bool(false),
RelayInformationTrustAll: pulumi.Bool(false),
Snooping: pulumi.Bool(false),
SnoopingInformationOptionFormatRemoteIdHostname: pulumi.Bool(false),
SnoopingVlans: iosxe.DhcpSnoopingVlanArray{
&iosxe.DhcpSnoopingVlanArgs{
VlanId: pulumi.String("string"),
},
},
})
var dhcpResource = new Dhcp("dhcpResource", DhcpArgs.builder()
.compatibilitySuboptionLinkSelection("string")
.compatibilitySuboptionServerOverride("string")
.deleteMode("string")
.device("string")
.relayInformationOptionDefault(false)
.relayInformationOptionVpn(false)
.relayInformationTrustAll(false)
.snooping(false)
.snoopingInformationOptionFormatRemoteIdHostname(false)
.snoopingVlans(DhcpSnoopingVlanArgs.builder()
.vlanId("string")
.build())
.build());
dhcp_resource = iosxe.Dhcp("dhcpResource",
compatibility_suboption_link_selection="string",
compatibility_suboption_server_override="string",
delete_mode="string",
device="string",
relay_information_option_default=False,
relay_information_option_vpn=False,
relay_information_trust_all=False,
snooping=False,
snooping_information_option_format_remote_id_hostname=False,
snooping_vlans=[iosxe.DhcpSnoopingVlanArgs(
vlan_id="string",
)])
const dhcpResource = new iosxe.Dhcp("dhcpResource", {
compatibilitySuboptionLinkSelection: "string",
compatibilitySuboptionServerOverride: "string",
deleteMode: "string",
device: "string",
relayInformationOptionDefault: false,
relayInformationOptionVpn: false,
relayInformationTrustAll: false,
snooping: false,
snoopingInformationOptionFormatRemoteIdHostname: false,
snoopingVlans: [{
vlanId: "string",
}],
});
type: iosxe:Dhcp
properties:
compatibilitySuboptionLinkSelection: string
compatibilitySuboptionServerOverride: string
deleteMode: string
device: string
relayInformationOptionDefault: false
relayInformationOptionVpn: false
relayInformationTrustAll: false
snooping: false
snoopingInformationOptionFormatRemoteIdHostname: false
snoopingVlans:
- vlanId: string
Dhcp Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Dhcp resource accepts the following input properties:
- Compatibility
Suboption stringLink Selection - Choices:
cisco
,standard
- Choices:
- Compatibility
Suboption stringServer Override - Choices:
cisco
,standard
- Choices:
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Relay
Information boolOption Default - Default option, no vpn
- Relay
Information boolOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- Relay
Information boolTrust All - Received DHCP packets may contain relay info option with zero giaddr
- Snooping bool
- DHCP Snooping
- Snooping
Information boolOption Format Remote Id Hostname - Use configured hostname for remote id
- Snooping
Vlans List<Lbrlabs.Pulumi Package. Iosxe. Inputs. Dhcp Snooping Vlan> - DHCP Snooping vlan
- Compatibility
Suboption stringLink Selection - Choices:
cisco
,standard
- Choices:
- Compatibility
Suboption stringServer Override - Choices:
cisco
,standard
- Choices:
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Relay
Information boolOption Default - Default option, no vpn
- Relay
Information boolOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- Relay
Information boolTrust All - Received DHCP packets may contain relay info option with zero giaddr
- Snooping bool
- DHCP Snooping
- Snooping
Information boolOption Format Remote Id Hostname - Use configured hostname for remote id
- Snooping
Vlans []DhcpSnooping Vlan Args - DHCP Snooping vlan
- compatibility
Suboption StringLink Selection - Choices:
cisco
,standard
- Choices:
- compatibility
Suboption StringServer Override - Choices:
cisco
,standard
- Choices:
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- relay
Information BooleanOption Default - Default option, no vpn
- relay
Information BooleanOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay
Information BooleanTrust All - Received DHCP packets may contain relay info option with zero giaddr
- snooping Boolean
- DHCP Snooping
- snooping
Information BooleanOption Format Remote Id Hostname - Use configured hostname for remote id
- snooping
Vlans List<DhcpSnooping Vlan> - DHCP Snooping vlan
- compatibility
Suboption stringLink Selection - Choices:
cisco
,standard
- Choices:
- compatibility
Suboption stringServer Override - Choices:
cisco
,standard
- Choices:
- delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device string
- A device name from the provider configuration.
- relay
Information booleanOption Default - Default option, no vpn
- relay
Information booleanOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay
Information booleanTrust All - Received DHCP packets may contain relay info option with zero giaddr
- snooping boolean
- DHCP Snooping
- snooping
Information booleanOption Format Remote Id Hostname - Use configured hostname for remote id
- snooping
Vlans DhcpSnooping Vlan[] - DHCP Snooping vlan
- compatibility_
suboption_ strlink_ selection - Choices:
cisco
,standard
- Choices:
- compatibility_
suboption_ strserver_ override - Choices:
cisco
,standard
- Choices:
- delete_
mode str - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device str
- A device name from the provider configuration.
- relay_
information_ booloption_ default - Default option, no vpn
- relay_
information_ booloption_ vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay_
information_ booltrust_ all - Received DHCP packets may contain relay info option with zero giaddr
- snooping bool
- DHCP Snooping
- snooping_
information_ booloption_ format_ remote_ id_ hostname - Use configured hostname for remote id
- snooping_
vlans Sequence[DhcpSnooping Vlan Args] - DHCP Snooping vlan
- compatibility
Suboption StringLink Selection - Choices:
cisco
,standard
- Choices:
- compatibility
Suboption StringServer Override - Choices:
cisco
,standard
- Choices:
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- relay
Information BooleanOption Default - Default option, no vpn
- relay
Information BooleanOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay
Information BooleanTrust All - Received DHCP packets may contain relay info option with zero giaddr
- snooping Boolean
- DHCP Snooping
- snooping
Information BooleanOption Format Remote Id Hostname - Use configured hostname for remote id
- snooping
Vlans List<Property Map> - DHCP Snooping vlan
Outputs
All input properties are implicitly available as output properties. Additionally, the Dhcp resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Dhcp Resource
Get an existing Dhcp 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?: DhcpState, opts?: CustomResourceOptions): Dhcp
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compatibility_suboption_link_selection: Optional[str] = None,
compatibility_suboption_server_override: Optional[str] = None,
delete_mode: Optional[str] = None,
device: Optional[str] = None,
relay_information_option_default: Optional[bool] = None,
relay_information_option_vpn: Optional[bool] = None,
relay_information_trust_all: Optional[bool] = None,
snooping: Optional[bool] = None,
snooping_information_option_format_remote_id_hostname: Optional[bool] = None,
snooping_vlans: Optional[Sequence[DhcpSnoopingVlanArgs]] = None) -> Dhcp
func GetDhcp(ctx *Context, name string, id IDInput, state *DhcpState, opts ...ResourceOption) (*Dhcp, error)
public static Dhcp Get(string name, Input<string> id, DhcpState? state, CustomResourceOptions? opts = null)
public static Dhcp get(String name, Output<String> id, DhcpState 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.
- Compatibility
Suboption stringLink Selection - Choices:
cisco
,standard
- Choices:
- Compatibility
Suboption stringServer Override - Choices:
cisco
,standard
- Choices:
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Relay
Information boolOption Default - Default option, no vpn
- Relay
Information boolOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- Relay
Information boolTrust All - Received DHCP packets may contain relay info option with zero giaddr
- Snooping bool
- DHCP Snooping
- Snooping
Information boolOption Format Remote Id Hostname - Use configured hostname for remote id
- Snooping
Vlans List<Lbrlabs.Pulumi Package. Iosxe. Inputs. Dhcp Snooping Vlan> - DHCP Snooping vlan
- Compatibility
Suboption stringLink Selection - Choices:
cisco
,standard
- Choices:
- Compatibility
Suboption stringServer Override - Choices:
cisco
,standard
- Choices:
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Relay
Information boolOption Default - Default option, no vpn
- Relay
Information boolOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- Relay
Information boolTrust All - Received DHCP packets may contain relay info option with zero giaddr
- Snooping bool
- DHCP Snooping
- Snooping
Information boolOption Format Remote Id Hostname - Use configured hostname for remote id
- Snooping
Vlans []DhcpSnooping Vlan Args - DHCP Snooping vlan
- compatibility
Suboption StringLink Selection - Choices:
cisco
,standard
- Choices:
- compatibility
Suboption StringServer Override - Choices:
cisco
,standard
- Choices:
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- relay
Information BooleanOption Default - Default option, no vpn
- relay
Information BooleanOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay
Information BooleanTrust All - Received DHCP packets may contain relay info option with zero giaddr
- snooping Boolean
- DHCP Snooping
- snooping
Information BooleanOption Format Remote Id Hostname - Use configured hostname for remote id
- snooping
Vlans List<DhcpSnooping Vlan> - DHCP Snooping vlan
- compatibility
Suboption stringLink Selection - Choices:
cisco
,standard
- Choices:
- compatibility
Suboption stringServer Override - Choices:
cisco
,standard
- Choices:
- delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device string
- A device name from the provider configuration.
- relay
Information booleanOption Default - Default option, no vpn
- relay
Information booleanOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay
Information booleanTrust All - Received DHCP packets may contain relay info option with zero giaddr
- snooping boolean
- DHCP Snooping
- snooping
Information booleanOption Format Remote Id Hostname - Use configured hostname for remote id
- snooping
Vlans DhcpSnooping Vlan[] - DHCP Snooping vlan
- compatibility_
suboption_ strlink_ selection - Choices:
cisco
,standard
- Choices:
- compatibility_
suboption_ strserver_ override - Choices:
cisco
,standard
- Choices:
- delete_
mode str - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device str
- A device name from the provider configuration.
- relay_
information_ booloption_ default - Default option, no vpn
- relay_
information_ booloption_ vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay_
information_ booltrust_ all - Received DHCP packets may contain relay info option with zero giaddr
- snooping bool
- DHCP Snooping
- snooping_
information_ booloption_ format_ remote_ id_ hostname - Use configured hostname for remote id
- snooping_
vlans Sequence[DhcpSnooping Vlan Args] - DHCP Snooping vlan
- compatibility
Suboption StringLink Selection - Choices:
cisco
,standard
- Choices:
- compatibility
Suboption StringServer Override - Choices:
cisco
,standard
- Choices:
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- relay
Information BooleanOption Default - Default option, no vpn
- relay
Information BooleanOption Vpn - Insert VPN sub-options and change the giaddr to the outgoing interface
- relay
Information BooleanTrust All - Received DHCP packets may contain relay info option with zero giaddr
- snooping Boolean
- DHCP Snooping
- snooping
Information BooleanOption Format Remote Id Hostname - Use configured hostname for remote id
- snooping
Vlans List<Property Map> - DHCP Snooping vlan
Supporting Types
DhcpSnoopingVlan, DhcpSnoopingVlanArgs
- Vlan
Id string
- Vlan
Id string
- vlan
Id String
- vlan
Id string
- vlan_
id str
- vlan
Id String
Import
$ pulumi import iosxe:index/dhcp:Dhcp example "Cisco-IOS-XE-native:native/ip/dhcp"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- iosxe lbrlabs/pulumi-iosxe
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
iosxe
Terraform Provider.