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,
});
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)
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
})
}
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,
});
});
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());
}
}
resources:
test:
type: routeros:Snmp
properties:
contact: John D.
enabled: true
engineIdSuffix: 8a3c
location: Backyard
trapCommunity: private
trapGenerators: start-trap
trapVersion: 3
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)
type: routeros:Snmp
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 SnmpArgs
- 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 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 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 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 String
- The unique name of the resource.
- args 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
- Engine
Id stringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- Location string
- Location information.
- Snmp
Id string - Src
Address string - Force the router to always use the same IP source address for all of the SNMP messages.
- Trap
Community string - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- Trap
Generators string - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- Trap
Interfaces string - List of interfaces that traps are going to be sent out.
- Trap
Targets List<string> - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- Trap
Version 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
- Engine
Id stringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- Location string
- Location information.
- Snmp
Id string - Src
Address string - Force the router to always use the same IP source address for all of the SNMP messages.
- Trap
Community string - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- Trap
Generators string - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- Trap
Interfaces string - List of interfaces that traps are going to be sent out.
- Trap
Targets []string - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- Trap
Version 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
- engine
Id StringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- location String
- Location information.
- snmp
Id String - src
Address String - Force the router to always use the same IP source address for all of the SNMP messages.
- trap
Community String - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- trap
Generators String - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- trap
Interfaces String - List of interfaces that traps are going to be sent out.
- trap
Targets List<String> - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- trap
Version 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
- engine
Id stringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- location string
- Location information.
- snmp
Id string - src
Address string - Force the router to always use the same IP source address for all of the SNMP messages.
- trap
Community string - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- trap
Generators string - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- trap
Interfaces string - List of interfaces that traps are going to be sent out.
- trap
Targets string[] - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- trap
Version 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_ strsuffix - 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
- engine
Id StringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- location String
- Location information.
- snmp
Id String - src
Address String - Force the router to always use the same IP source address for all of the SNMP messages.
- trap
Community String - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- trap
Generators String - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- trap
Interfaces String - List of interfaces that traps are going to be sent out.
- trap
Targets List<String> - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- trap
Version 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:
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
- 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.
- Contact string
- Contact information.
- Enabled bool
- Used to disable/enable SNMP service
- Engine
Id 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
- Engine
Id stringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- Location string
- Location information.
- Snmp
Id string - Src
Address string - Force the router to always use the same IP source address for all of the SNMP messages.
- Trap
Community string - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- Trap
Generators string - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- Trap
Interfaces string - List of interfaces that traps are going to be sent out.
- Trap
Targets List<string> - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- Trap
Version 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
- Engine
Id 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
- Engine
Id stringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- Location string
- Location information.
- Snmp
Id string - Src
Address string - Force the router to always use the same IP source address for all of the SNMP messages.
- Trap
Community string - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- Trap
Generators string - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- Trap
Interfaces string - List of interfaces that traps are going to be sent out.
- Trap
Targets []string - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- Trap
Version 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
- engine
Id 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
- engine
Id StringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- location String
- Location information.
- snmp
Id String - src
Address String - Force the router to always use the same IP source address for all of the SNMP messages.
- trap
Community String - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- trap
Generators String - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- trap
Interfaces String - List of interfaces that traps are going to be sent out.
- trap
Targets List<String> - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- trap
Version 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
- engine
Id 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
- engine
Id stringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- location string
- Location information.
- snmp
Id string - src
Address string - Force the router to always use the same IP source address for all of the SNMP messages.
- trap
Community string - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- trap
Generators string - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- trap
Interfaces string - List of interfaces that traps are going to be sent out.
- trap
Targets string[] - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- trap
Version 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_ strsuffix - 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
- engine
Id 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
- engine
Id StringSuffix - Unique identifier for an SNMPv3 engine by configuring the suffix of the engine ID.
- location String
- Location information.
- snmp
Id String - src
Address String - Force the router to always use the same IP source address for all of the SNMP messages.
- trap
Community String - Which communities configured in community menu to use when sending out the trap. This name must be present in the community list.
- trap
Generators String - What action will generate traps: * interfaces - interface changes; * start-trap - snmp server starting on the router.
- trap
Interfaces String - List of interfaces that traps are going to be sent out.
- trap
Targets List<String> - IP (IPv4 or IPv6) addresses of SNMP data collectors that have to receive the trap.
- trap
Version 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 .
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.