1. Packages
  2. Routeros Provider
  3. API Docs
  4. Snmp
routeros 1.83.0 published on Wednesday, Apr 16, 2025 by terraform-routeros

routeros.Snmp

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";

const test = new routeros.Snmp("test", {
    contact: "John D.",
    enabled: true,
    engineIdSuffix: "8a3c",
    location: "Backyard",
    trapCommunity: "private",
    trapGenerators: "start-trap",
    trapVersion: 3,
});
Copy
import pulumi
import pulumi_routeros as routeros

test = routeros.Snmp("test",
    contact="John D.",
    enabled=True,
    engine_id_suffix="8a3c",
    location="Backyard",
    trap_community="private",
    trap_generators="start-trap",
    trap_version=3)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := routeros.NewSnmp(ctx, "test", &routeros.SnmpArgs{
			Contact:        pulumi.String("John D."),
			Enabled:        pulumi.Bool(true),
			EngineIdSuffix: pulumi.String("8a3c"),
			Location:       pulumi.String("Backyard"),
			TrapCommunity:  pulumi.String("private"),
			TrapGenerators: pulumi.String("start-trap"),
			TrapVersion:    pulumi.Float64(3),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Routeros = Pulumi.Routeros;

return await Deployment.RunAsync(() => 
{
    var test = new Routeros.Snmp("test", new()
    {
        Contact = "John D.",
        Enabled = true,
        EngineIdSuffix = "8a3c",
        Location = "Backyard",
        TrapCommunity = "private",
        TrapGenerators = "start-trap",
        TrapVersion = 3,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.Snmp;
import com.pulumi.routeros.SnmpArgs;
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 test = new Snmp("test", SnmpArgs.builder()
            .contact("John D.")
            .enabled(true)
            .engineIdSuffix("8a3c")
            .location("Backyard")
            .trapCommunity("private")
            .trapGenerators("start-trap")
            .trapVersion(3)
            .build());

    }
}
Copy
resources:
  test:
    type: routeros:Snmp
    properties:
      contact: John D.
      enabled: true
      engineIdSuffix: 8a3c
      location: Backyard
      trapCommunity: private
      trapGenerators: start-trap
      trapVersion: 3
Copy

Create Snmp Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Snmp(name: string, args?: SnmpArgs, opts?: CustomResourceOptions);
@overload
def Snmp(resource_name: str,
         args: Optional[SnmpArgs] = None,
         opts: Optional[ResourceOptions] = None)

@overload
def Snmp(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         ___id_: Optional[float] = None,
         ___path_: Optional[str] = None,
         contact: Optional[str] = None,
         enabled: Optional[bool] = None,
         engine_id_suffix: Optional[str] = None,
         location: Optional[str] = None,
         snmp_id: Optional[str] = None,
         src_address: Optional[str] = None,
         trap_community: Optional[str] = None,
         trap_generators: Optional[str] = None,
         trap_interfaces: Optional[str] = None,
         trap_targets: Optional[Sequence[str]] = None,
         trap_version: Optional[float] = None,
         vrf: Optional[str] = None)
func NewSnmp(ctx *Context, name string, args *SnmpArgs, opts ...ResourceOption) (*Snmp, error)
public Snmp(string name, SnmpArgs? args = null, CustomResourceOptions? opts = null)
public Snmp(String name, SnmpArgs args)
public Snmp(String name, SnmpArgs args, CustomResourceOptions options)
type: routeros:Snmp
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args SnmpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args SnmpArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args SnmpArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args SnmpArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SnmpArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Snmp 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 Snmp resource accepts the following input properties:

Contact string
Contact information.
Enabled bool
Used to disable/enable SNMP service
EngineIdSuffix string
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
Location string
Location information.
SnmpId string
SrcAddress string
Force the router to always use the same IP source address for all of the SNMP messages.
TrapCommunity string
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
TrapGenerators string
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
TrapInterfaces string
List of interfaces that traps are going to be sent out.
TrapTargets List<string>
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
TrapVersion double
Version of SNMP protocol to use for trap.
Vrf string
The VRF table this resource operates on.
___id_ double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
Contact string
Contact information.
Enabled bool
Used to disable/enable SNMP service
EngineIdSuffix string
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
Location string
Location information.
SnmpId string
SrcAddress string
Force the router to always use the same IP source address for all of the SNMP messages.
TrapCommunity string
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
TrapGenerators string
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
TrapInterfaces string
List of interfaces that traps are going to be sent out.
TrapTargets []string
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
TrapVersion float64
Version of SNMP protocol to use for trap.
Vrf string
The VRF table this resource operates on.
___id_ float64
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
___id_ Double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact String
Contact information.
enabled Boolean
Used to disable/enable SNMP service
engineIdSuffix String
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location String
Location information.
snmpId String
srcAddress String
Force the router to always use the same IP source address for all of the SNMP messages.
trapCommunity String
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trapGenerators String
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trapInterfaces String
List of interfaces that traps are going to be sent out.
trapTargets List<String>
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trapVersion Double
Version of SNMP protocol to use for trap.
vrf String
The VRF table this resource operates on.
___id_ number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact string
Contact information.
enabled boolean
Used to disable/enable SNMP service
engineIdSuffix string
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location string
Location information.
snmpId string
srcAddress string
Force the router to always use the same IP source address for all of the SNMP messages.
trapCommunity string
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trapGenerators string
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trapInterfaces string
List of interfaces that traps are going to be sent out.
trapTargets string[]
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trapVersion number
Version of SNMP protocol to use for trap.
vrf string
The VRF table this resource operates on.
___id_ float
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ str
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact str
Contact information.
enabled bool
Used to disable/enable SNMP service
engine_id_suffix str
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location str
Location information.
snmp_id str
src_address str
Force the router to always use the same IP source address for all of the SNMP messages.
trap_community str
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trap_generators str
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trap_interfaces str
List of interfaces that traps are going to be sent out.
trap_targets Sequence[str]
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trap_version float
Version of SNMP protocol to use for trap.
vrf str
The VRF table this resource operates on.
___id_ Number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact String
Contact information.
enabled Boolean
Used to disable/enable SNMP service
engineIdSuffix String
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location String
Location information.
snmpId String
srcAddress String
Force the router to always use the same IP source address for all of the SNMP messages.
trapCommunity String
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trapGenerators String
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trapInterfaces String
List of interfaces that traps are going to be sent out.
trapTargets List<String>
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trapVersion Number
Version of SNMP protocol to use for trap.
vrf String
The VRF table this resource operates on.

Outputs

All input properties are implicitly available as output properties. Additionally, the Snmp resource produces the following output properties:

EngineId string
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
Id string
The provider-assigned unique ID for this managed resource.
EngineId string
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
Id string
The provider-assigned unique ID for this managed resource.
engineId String
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
id String
The provider-assigned unique ID for this managed resource.
engineId string
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
id string
The provider-assigned unique ID for this managed resource.
engine_id str
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
id str
The provider-assigned unique ID for this managed resource.
engineId String
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Snmp Resource

Get an existing Snmp 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?: SnmpState, opts?: CustomResourceOptions): Snmp
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ___id_: Optional[float] = None,
        ___path_: Optional[str] = None,
        contact: Optional[str] = None,
        enabled: Optional[bool] = None,
        engine_id: Optional[str] = None,
        engine_id_suffix: Optional[str] = None,
        location: Optional[str] = None,
        snmp_id: Optional[str] = None,
        src_address: Optional[str] = None,
        trap_community: Optional[str] = None,
        trap_generators: Optional[str] = None,
        trap_interfaces: Optional[str] = None,
        trap_targets: Optional[Sequence[str]] = None,
        trap_version: Optional[float] = None,
        vrf: Optional[str] = None) -> Snmp
func GetSnmp(ctx *Context, name string, id IDInput, state *SnmpState, opts ...ResourceOption) (*Snmp, error)
public static Snmp Get(string name, Input<string> id, SnmpState? state, CustomResourceOptions? opts = null)
public static Snmp get(String name, Output<String> id, SnmpState state, CustomResourceOptions options)
resources:  _:    type: routeros:Snmp    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Contact string
Contact information.
Enabled bool
Used to disable/enable SNMP service
EngineId string
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
EngineIdSuffix string
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
Location string
Location information.
SnmpId string
SrcAddress string
Force the router to always use the same IP source address for all of the SNMP messages.
TrapCommunity string
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
TrapGenerators string
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
TrapInterfaces string
List of interfaces that traps are going to be sent out.
TrapTargets List<string>
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
TrapVersion double
Version of SNMP protocol to use for trap.
Vrf string
The VRF table this resource operates on.
___id_ double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
Contact string
Contact information.
Enabled bool
Used to disable/enable SNMP service
EngineId string
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
EngineIdSuffix string
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
Location string
Location information.
SnmpId string
SrcAddress string
Force the router to always use the same IP source address for all of the SNMP messages.
TrapCommunity string
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
TrapGenerators string
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
TrapInterfaces string
List of interfaces that traps are going to be sent out.
TrapTargets []string
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
TrapVersion float64
Version of SNMP protocol to use for trap.
Vrf string
The VRF table this resource operates on.
___id_ float64
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
___id_ Double
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact String
Contact information.
enabled Boolean
Used to disable/enable SNMP service
engineId String
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
engineIdSuffix String
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location String
Location information.
snmpId String
srcAddress String
Force the router to always use the same IP source address for all of the SNMP messages.
trapCommunity String
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trapGenerators String
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trapInterfaces String
List of interfaces that traps are going to be sent out.
trapTargets List<String>
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trapVersion Double
Version of SNMP protocol to use for trap.
vrf String
The VRF table this resource operates on.
___id_ number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ string
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact string
Contact information.
enabled boolean
Used to disable/enable SNMP service
engineId string
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
engineIdSuffix string
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location string
Location information.
snmpId string
srcAddress string
Force the router to always use the same IP source address for all of the SNMP messages.
trapCommunity string
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trapGenerators string
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trapInterfaces string
List of interfaces that traps are going to be sent out.
trapTargets string[]
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trapVersion number
Version of SNMP protocol to use for trap.
vrf string
The VRF table this resource operates on.
___id_ float
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ str
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact str
Contact information.
enabled bool
Used to disable/enable SNMP service
engine_id str
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
engine_id_suffix str
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location str
Location information.
snmp_id str
src_address str
Force the router to always use the same IP source address for all of the SNMP messages.
trap_community str
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trap_generators str
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trap_interfaces str
List of interfaces that traps are going to be sent out.
trap_targets Sequence[str]
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trap_version float
Version of SNMP protocol to use for trap.
vrf str
The VRF table this resource operates on.
___id_ Number
Resource ID type (.id / name). This is an internal service field, setting a value is not required.
___path_ String
Resource path for CRUD operations. This is an internal service field, setting a value is not required.
contact String
Contact information.
enabled Boolean
Used to disable/enable SNMP service
engineId String
For SNMP v3, used as part of identifier. You can configure suffix part of engine id using this argument. If SNMP client is not capable to detect set engine-id value then this prefix hex have to be used 0x80003a8c04
engineIdSuffix String
Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
location String
Location information.
snmpId String
srcAddress String
Force the router to always use the same IP source address for all of the SNMP messages.
trapCommunity String
Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
trapGenerators String
What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
trapInterfaces String
List of interfaces that traps are going to be sent out.
trapTargets List<String>
IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
trapVersion Number
Version of SNMP protocol to use for trap.
vrf String
The VRF table this resource operates on.

Import

$ pulumi import routeros:index/snmp:Snmp test .
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
routeros terraform-routeros/terraform-provider-routeros
License
Notes
This Pulumi package is based on the routeros Terraform Provider.