meraki.networks.SwitchDhcpServerPolicy
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as meraki from "@pulumi/meraki";
const example = new meraki.networks.SwitchDhcpServerPolicy("example", {
alerts: {
email: {
enabled: true,
},
},
allowedServers: [
"00:50:56:00:00:01",
"00:50:56:00:00:02",
],
arpInspection: {
enabled: true,
},
blockedServers: [
"00:50:56:00:00:03",
"00:50:56:00:00:04",
],
defaultPolicy: "block",
networkId: "string",
});
export const merakiNetworksSwitchDhcpServerPolicyExample = example;
import pulumi
import pulumi_meraki as meraki
example = meraki.networks.SwitchDhcpServerPolicy("example",
alerts={
"email": {
"enabled": True,
},
},
allowed_servers=[
"00:50:56:00:00:01",
"00:50:56:00:00:02",
],
arp_inspection={
"enabled": True,
},
blocked_servers=[
"00:50:56:00:00:03",
"00:50:56:00:00:04",
],
default_policy="block",
network_id="string")
pulumi.export("merakiNetworksSwitchDhcpServerPolicyExample", example)
package main
import (
"github.com/pulumi/pulumi-meraki/sdk/go/meraki/networks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := networks.NewSwitchDhcpServerPolicy(ctx, "example", &networks.SwitchDhcpServerPolicyArgs{
Alerts: &networks.SwitchDhcpServerPolicyAlertsArgs{
Email: &networks.SwitchDhcpServerPolicyAlertsEmailArgs{
Enabled: pulumi.Bool(true),
},
},
AllowedServers: pulumi.StringArray{
pulumi.String("00:50:56:00:00:01"),
pulumi.String("00:50:56:00:00:02"),
},
ArpInspection: &networks.SwitchDhcpServerPolicyArpInspectionArgs{
Enabled: pulumi.Bool(true),
},
BlockedServers: pulumi.StringArray{
pulumi.String("00:50:56:00:00:03"),
pulumi.String("00:50:56:00:00:04"),
},
DefaultPolicy: pulumi.String("block"),
NetworkId: pulumi.String("string"),
})
if err != nil {
return err
}
ctx.Export("merakiNetworksSwitchDhcpServerPolicyExample", example)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Meraki = Pulumi.Meraki;
return await Deployment.RunAsync(() =>
{
var example = new Meraki.Networks.SwitchDhcpServerPolicy("example", new()
{
Alerts = new Meraki.Networks.Inputs.SwitchDhcpServerPolicyAlertsArgs
{
Email = new Meraki.Networks.Inputs.SwitchDhcpServerPolicyAlertsEmailArgs
{
Enabled = true,
},
},
AllowedServers = new[]
{
"00:50:56:00:00:01",
"00:50:56:00:00:02",
},
ArpInspection = new Meraki.Networks.Inputs.SwitchDhcpServerPolicyArpInspectionArgs
{
Enabled = true,
},
BlockedServers = new[]
{
"00:50:56:00:00:03",
"00:50:56:00:00:04",
},
DefaultPolicy = "block",
NetworkId = "string",
});
return new Dictionary<string, object?>
{
["merakiNetworksSwitchDhcpServerPolicyExample"] = example,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.meraki.networks.SwitchDhcpServerPolicy;
import com.pulumi.meraki.networks.SwitchDhcpServerPolicyArgs;
import com.pulumi.meraki.networks.inputs.SwitchDhcpServerPolicyAlertsArgs;
import com.pulumi.meraki.networks.inputs.SwitchDhcpServerPolicyAlertsEmailArgs;
import com.pulumi.meraki.networks.inputs.SwitchDhcpServerPolicyArpInspectionArgs;
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 SwitchDhcpServerPolicy("example", SwitchDhcpServerPolicyArgs.builder()
.alerts(SwitchDhcpServerPolicyAlertsArgs.builder()
.email(SwitchDhcpServerPolicyAlertsEmailArgs.builder()
.enabled(true)
.build())
.build())
.allowedServers(
"00:50:56:00:00:01",
"00:50:56:00:00:02")
.arpInspection(SwitchDhcpServerPolicyArpInspectionArgs.builder()
.enabled(true)
.build())
.blockedServers(
"00:50:56:00:00:03",
"00:50:56:00:00:04")
.defaultPolicy("block")
.networkId("string")
.build());
ctx.export("merakiNetworksSwitchDhcpServerPolicyExample", example);
}
}
resources:
example:
type: meraki:networks:SwitchDhcpServerPolicy
properties:
alerts:
email:
enabled: true
allowedServers:
- 00:50:56:00:00:01
- 00:50:56:00:00:02
arpInspection:
enabled: true
blockedServers:
- 00:50:56:00:00:03
- 00:50:56:00:00:04
defaultPolicy: block
networkId: string
outputs:
merakiNetworksSwitchDhcpServerPolicyExample: ${example}
Create SwitchDhcpServerPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SwitchDhcpServerPolicy(name: string, args: SwitchDhcpServerPolicyArgs, opts?: CustomResourceOptions);
@overload
def SwitchDhcpServerPolicy(resource_name: str,
args: SwitchDhcpServerPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SwitchDhcpServerPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
alerts: Optional[SwitchDhcpServerPolicyAlertsArgs] = None,
allowed_servers: Optional[Sequence[str]] = None,
arp_inspection: Optional[SwitchDhcpServerPolicyArpInspectionArgs] = None,
blocked_servers: Optional[Sequence[str]] = None,
default_policy: Optional[str] = None)
func NewSwitchDhcpServerPolicy(ctx *Context, name string, args SwitchDhcpServerPolicyArgs, opts ...ResourceOption) (*SwitchDhcpServerPolicy, error)
public SwitchDhcpServerPolicy(string name, SwitchDhcpServerPolicyArgs args, CustomResourceOptions? opts = null)
public SwitchDhcpServerPolicy(String name, SwitchDhcpServerPolicyArgs args)
public SwitchDhcpServerPolicy(String name, SwitchDhcpServerPolicyArgs args, CustomResourceOptions options)
type: meraki:networks:SwitchDhcpServerPolicy
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 SwitchDhcpServerPolicyArgs
- 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 SwitchDhcpServerPolicyArgs
- 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 SwitchDhcpServerPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SwitchDhcpServerPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SwitchDhcpServerPolicyArgs
- 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 switchDhcpServerPolicyResource = new Meraki.Networks.SwitchDhcpServerPolicy("switchDhcpServerPolicyResource", new()
{
NetworkId = "string",
Alerts = new Meraki.Networks.Inputs.SwitchDhcpServerPolicyAlertsArgs
{
Email = new Meraki.Networks.Inputs.SwitchDhcpServerPolicyAlertsEmailArgs
{
Enabled = false,
},
},
AllowedServers = new[]
{
"string",
},
ArpInspection = new Meraki.Networks.Inputs.SwitchDhcpServerPolicyArpInspectionArgs
{
Enabled = false,
UnsupportedModels = new[]
{
"string",
},
},
BlockedServers = new[]
{
"string",
},
DefaultPolicy = "string",
});
example, err := networks.NewSwitchDhcpServerPolicy(ctx, "switchDhcpServerPolicyResource", &networks.SwitchDhcpServerPolicyArgs{
NetworkId: pulumi.String("string"),
Alerts: &networks.SwitchDhcpServerPolicyAlertsArgs{
Email: &networks.SwitchDhcpServerPolicyAlertsEmailArgs{
Enabled: pulumi.Bool(false),
},
},
AllowedServers: pulumi.StringArray{
pulumi.String("string"),
},
ArpInspection: &networks.SwitchDhcpServerPolicyArpInspectionArgs{
Enabled: pulumi.Bool(false),
UnsupportedModels: pulumi.StringArray{
pulumi.String("string"),
},
},
BlockedServers: pulumi.StringArray{
pulumi.String("string"),
},
DefaultPolicy: pulumi.String("string"),
})
var switchDhcpServerPolicyResource = new SwitchDhcpServerPolicy("switchDhcpServerPolicyResource", SwitchDhcpServerPolicyArgs.builder()
.networkId("string")
.alerts(SwitchDhcpServerPolicyAlertsArgs.builder()
.email(SwitchDhcpServerPolicyAlertsEmailArgs.builder()
.enabled(false)
.build())
.build())
.allowedServers("string")
.arpInspection(SwitchDhcpServerPolicyArpInspectionArgs.builder()
.enabled(false)
.unsupportedModels("string")
.build())
.blockedServers("string")
.defaultPolicy("string")
.build());
switch_dhcp_server_policy_resource = meraki.networks.SwitchDhcpServerPolicy("switchDhcpServerPolicyResource",
network_id="string",
alerts={
"email": {
"enabled": False,
},
},
allowed_servers=["string"],
arp_inspection={
"enabled": False,
"unsupported_models": ["string"],
},
blocked_servers=["string"],
default_policy="string")
const switchDhcpServerPolicyResource = new meraki.networks.SwitchDhcpServerPolicy("switchDhcpServerPolicyResource", {
networkId: "string",
alerts: {
email: {
enabled: false,
},
},
allowedServers: ["string"],
arpInspection: {
enabled: false,
unsupportedModels: ["string"],
},
blockedServers: ["string"],
defaultPolicy: "string",
});
type: meraki:networks:SwitchDhcpServerPolicy
properties:
alerts:
email:
enabled: false
allowedServers:
- string
arpInspection:
enabled: false
unsupportedModels:
- string
blockedServers:
- string
defaultPolicy: string
networkId: string
SwitchDhcpServerPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SwitchDhcpServerPolicy resource accepts the following input properties:
- Network
Id string - networkId path parameter. Network ID
- Alerts
Switch
Dhcp Server Policy Alerts - Email alert settings for DHCP servers
- Allowed
Servers List<string> - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- Arp
Inspection SwitchDhcp Server Policy Arp Inspection - Dynamic ARP Inspection settings
- Blocked
Servers List<string> - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- Default
Policy string - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- Network
Id string - networkId path parameter. Network ID
- Alerts
Switch
Dhcp Server Policy Alerts Args - Email alert settings for DHCP servers
- Allowed
Servers []string - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- Arp
Inspection SwitchDhcp Server Policy Arp Inspection Args - Dynamic ARP Inspection settings
- Blocked
Servers []string - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- Default
Policy string - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network
Id String - networkId path parameter. Network ID
- alerts
Switch
Dhcp Server Policy Alerts - Email alert settings for DHCP servers
- allowed
Servers List<String> - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp
Inspection SwitchDhcp Server Policy Arp Inspection - Dynamic ARP Inspection settings
- blocked
Servers List<String> - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default
Policy String - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network
Id string - networkId path parameter. Network ID
- alerts
Switch
Dhcp Server Policy Alerts - Email alert settings for DHCP servers
- allowed
Servers string[] - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp
Inspection SwitchDhcp Server Policy Arp Inspection - Dynamic ARP Inspection settings
- blocked
Servers string[] - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default
Policy string - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network_
id str - networkId path parameter. Network ID
- alerts
Switch
Dhcp Server Policy Alerts Args - Email alert settings for DHCP servers
- allowed_
servers Sequence[str] - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp_
inspection SwitchDhcp Server Policy Arp Inspection Args - Dynamic ARP Inspection settings
- blocked_
servers Sequence[str] - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default_
policy str - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network
Id String - networkId path parameter. Network ID
- alerts Property Map
- Email alert settings for DHCP servers
- allowed
Servers List<String> - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp
Inspection Property Map - Dynamic ARP Inspection settings
- blocked
Servers List<String> - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default
Policy String - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
Outputs
All input properties are implicitly available as output properties. Additionally, the SwitchDhcpServerPolicy 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 SwitchDhcpServerPolicy Resource
Get an existing SwitchDhcpServerPolicy 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?: SwitchDhcpServerPolicyState, opts?: CustomResourceOptions): SwitchDhcpServerPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alerts: Optional[SwitchDhcpServerPolicyAlertsArgs] = None,
allowed_servers: Optional[Sequence[str]] = None,
arp_inspection: Optional[SwitchDhcpServerPolicyArpInspectionArgs] = None,
blocked_servers: Optional[Sequence[str]] = None,
default_policy: Optional[str] = None,
network_id: Optional[str] = None) -> SwitchDhcpServerPolicy
func GetSwitchDhcpServerPolicy(ctx *Context, name string, id IDInput, state *SwitchDhcpServerPolicyState, opts ...ResourceOption) (*SwitchDhcpServerPolicy, error)
public static SwitchDhcpServerPolicy Get(string name, Input<string> id, SwitchDhcpServerPolicyState? state, CustomResourceOptions? opts = null)
public static SwitchDhcpServerPolicy get(String name, Output<String> id, SwitchDhcpServerPolicyState 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.
- Alerts
Switch
Dhcp Server Policy Alerts - Email alert settings for DHCP servers
- Allowed
Servers List<string> - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- Arp
Inspection SwitchDhcp Server Policy Arp Inspection - Dynamic ARP Inspection settings
- Blocked
Servers List<string> - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- Default
Policy string - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- Network
Id string - networkId path parameter. Network ID
- Alerts
Switch
Dhcp Server Policy Alerts Args - Email alert settings for DHCP servers
- Allowed
Servers []string - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- Arp
Inspection SwitchDhcp Server Policy Arp Inspection Args - Dynamic ARP Inspection settings
- Blocked
Servers []string - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- Default
Policy string - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- Network
Id string - networkId path parameter. Network ID
- alerts
Switch
Dhcp Server Policy Alerts - Email alert settings for DHCP servers
- allowed
Servers List<String> - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp
Inspection SwitchDhcp Server Policy Arp Inspection - Dynamic ARP Inspection settings
- blocked
Servers List<String> - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default
Policy String - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network
Id String - networkId path parameter. Network ID
- alerts
Switch
Dhcp Server Policy Alerts - Email alert settings for DHCP servers
- allowed
Servers string[] - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp
Inspection SwitchDhcp Server Policy Arp Inspection - Dynamic ARP Inspection settings
- blocked
Servers string[] - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default
Policy string - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network
Id string - networkId path parameter. Network ID
- alerts
Switch
Dhcp Server Policy Alerts Args - Email alert settings for DHCP servers
- allowed_
servers Sequence[str] - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp_
inspection SwitchDhcp Server Policy Arp Inspection Args - Dynamic ARP Inspection settings
- blocked_
servers Sequence[str] - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default_
policy str - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network_
id str - networkId path parameter. Network ID
- alerts Property Map
- Email alert settings for DHCP servers
- allowed
Servers List<String> - List the MAC addresses of DHCP servers to permit on the network when defaultPolicy is set to block.An empty array will clear the entries.
- arp
Inspection Property Map - Dynamic ARP Inspection settings
- blocked
Servers List<String> - List the MAC addresses of DHCP servers to block on the network when defaultPolicy is set to allow.An empty array will clear the entries.
- default
Policy String - 'allow' or 'block' new DHCP servers. Default value is 'allow'.
- network
Id String - networkId path parameter. Network ID
Supporting Types
SwitchDhcpServerPolicyAlerts, SwitchDhcpServerPolicyAlertsArgs
- Email
Switch
Dhcp Server Policy Alerts Email - Alert settings for DHCP servers
- Email
Switch
Dhcp Server Policy Alerts Email - Alert settings for DHCP servers
- email
Switch
Dhcp Server Policy Alerts Email - Alert settings for DHCP servers
- email
Switch
Dhcp Server Policy Alerts Email - Alert settings for DHCP servers
- email
Switch
Dhcp Server Policy Alerts Email - Alert settings for DHCP servers
- email Property Map
- Alert settings for DHCP servers
SwitchDhcpServerPolicyAlertsEmail, SwitchDhcpServerPolicyAlertsEmailArgs
- Enabled bool
- When enabled, send an email if a new DHCP server is seen. Default value is false.
- Enabled bool
- When enabled, send an email if a new DHCP server is seen. Default value is false.
- enabled Boolean
- When enabled, send an email if a new DHCP server is seen. Default value is false.
- enabled boolean
- When enabled, send an email if a new DHCP server is seen. Default value is false.
- enabled bool
- When enabled, send an email if a new DHCP server is seen. Default value is false.
- enabled Boolean
- When enabled, send an email if a new DHCP server is seen. Default value is false.
SwitchDhcpServerPolicyArpInspection, SwitchDhcpServerPolicyArpInspectionArgs
- Enabled bool
- Enable or disable Dynamic ARP Inspection on the network. Default value is false.
- Unsupported
Models List<string> - List of switch models that does not support dynamic ARP inspection
- Enabled bool
- Enable or disable Dynamic ARP Inspection on the network. Default value is false.
- Unsupported
Models []string - List of switch models that does not support dynamic ARP inspection
- enabled Boolean
- Enable or disable Dynamic ARP Inspection on the network. Default value is false.
- unsupported
Models List<String> - List of switch models that does not support dynamic ARP inspection
- enabled boolean
- Enable or disable Dynamic ARP Inspection on the network. Default value is false.
- unsupported
Models string[] - List of switch models that does not support dynamic ARP inspection
- enabled bool
- Enable or disable Dynamic ARP Inspection on the network. Default value is false.
- unsupported_
models Sequence[str] - List of switch models that does not support dynamic ARP inspection
- enabled Boolean
- Enable or disable Dynamic ARP Inspection on the network. Default value is false.
- unsupported
Models List<String> - List of switch models that does not support dynamic ARP inspection
Import
$ pulumi import meraki:networks/switchDhcpServerPolicy:SwitchDhcpServerPolicy example "network_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- meraki pulumi/pulumi-meraki
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
meraki
Terraform Provider.