routeros.SnmpCommunity
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
const test = new routeros.SnmpCommunity("test", {
authenticationPassword: "authpasswd",
authenticationProtocol: "MD5",
comment: "Comment",
disabled: true,
encryptionPassword: "encpassword",
encryptionProtocol: "DES",
readAccess: true,
security: "private",
writeAccess: true,
});
const mything = new routeros.SnmpCommunity("mything", {addresses: [
"10.0.1.12",
"10.10.0.129",
]});
import pulumi
import pulumi_routeros as routeros
test = routeros.SnmpCommunity("test",
authentication_password="authpasswd",
authentication_protocol="MD5",
comment="Comment",
disabled=True,
encryption_password="encpassword",
encryption_protocol="DES",
read_access=True,
security="private",
write_access=True)
mything = routeros.SnmpCommunity("mything", addresses=[
"10.0.1.12",
"10.10.0.129",
])
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.NewSnmpCommunity(ctx, "test", &routeros.SnmpCommunityArgs{
AuthenticationPassword: pulumi.String("authpasswd"),
AuthenticationProtocol: pulumi.String("MD5"),
Comment: pulumi.String("Comment"),
Disabled: pulumi.Bool(true),
EncryptionPassword: pulumi.String("encpassword"),
EncryptionProtocol: pulumi.String("DES"),
ReadAccess: pulumi.Bool(true),
Security: pulumi.String("private"),
WriteAccess: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = routeros.NewSnmpCommunity(ctx, "mything", &routeros.SnmpCommunityArgs{
Addresses: pulumi.StringArray{
pulumi.String("10.0.1.12"),
pulumi.String("10.10.0.129"),
},
})
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.SnmpCommunity("test", new()
{
AuthenticationPassword = "authpasswd",
AuthenticationProtocol = "MD5",
Comment = "Comment",
Disabled = true,
EncryptionPassword = "encpassword",
EncryptionProtocol = "DES",
ReadAccess = true,
Security = "private",
WriteAccess = true,
});
var mything = new Routeros.SnmpCommunity("mything", new()
{
Addresses = new[]
{
"10.0.1.12",
"10.10.0.129",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.SnmpCommunity;
import com.pulumi.routeros.SnmpCommunityArgs;
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 SnmpCommunity("test", SnmpCommunityArgs.builder()
.authenticationPassword("authpasswd")
.authenticationProtocol("MD5")
.comment("Comment")
.disabled(true)
.encryptionPassword("encpassword")
.encryptionProtocol("DES")
.readAccess(true)
.security("private")
.writeAccess(true)
.build());
var mything = new SnmpCommunity("mything", SnmpCommunityArgs.builder()
.addresses(
"10.0.1.12",
"10.10.0.129")
.build());
}
}
resources:
test:
type: routeros:SnmpCommunity
properties:
authenticationPassword: authpasswd
authenticationProtocol: MD5
comment: Comment
disabled: true
encryptionPassword: encpassword
encryptionProtocol: DES
readAccess: true
security: private
writeAccess: true
mything:
type: routeros:SnmpCommunity
properties:
addresses:
- 10.0.1.12
- 10.10.0.129
Create SnmpCommunity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SnmpCommunity(name: string, args?: SnmpCommunityArgs, opts?: CustomResourceOptions);
@overload
def SnmpCommunity(resource_name: str,
args: Optional[SnmpCommunityArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SnmpCommunity(resource_name: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
addresses: Optional[Sequence[str]] = None,
authentication_password: Optional[str] = None,
authentication_protocol: Optional[str] = None,
comment: Optional[str] = None,
disabled: Optional[bool] = None,
encryption_password: Optional[str] = None,
encryption_protocol: Optional[str] = None,
name: Optional[str] = None,
read_access: Optional[bool] = None,
security: Optional[str] = None,
snmp_community_id: Optional[str] = None,
write_access: Optional[bool] = None)
func NewSnmpCommunity(ctx *Context, name string, args *SnmpCommunityArgs, opts ...ResourceOption) (*SnmpCommunity, error)
public SnmpCommunity(string name, SnmpCommunityArgs? args = null, CustomResourceOptions? opts = null)
public SnmpCommunity(String name, SnmpCommunityArgs args)
public SnmpCommunity(String name, SnmpCommunityArgs args, CustomResourceOptions options)
type: routeros:SnmpCommunity
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 SnmpCommunityArgs
- 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 SnmpCommunityArgs
- 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 SnmpCommunityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnmpCommunityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnmpCommunityArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SnmpCommunity 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 SnmpCommunity resource accepts the following input properties:
- Addresses List<string>
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- Authentication
Password string - Password used to authenticate the connection to the server (SNMPv3).
- Authentication
Protocol string - The protocol used for authentication (SNMPv3).
- Comment string
- Disabled bool
- Encryption
Password string - The password used for encryption (SNMPv3).
- Encryption
Protocol string - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- Name string
- Community Name.
- Read
Access bool - Whether read access is enabled for this community.
- Security string
- Security features.
- Snmp
Community stringId - The ID of this resource.
- Write
Access bool - Whether write access is enabled for this community.
- ___
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.
- Addresses []string
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- Authentication
Password string - Password used to authenticate the connection to the server (SNMPv3).
- Authentication
Protocol string - The protocol used for authentication (SNMPv3).
- Comment string
- Disabled bool
- Encryption
Password string - The password used for encryption (SNMPv3).
- Encryption
Protocol string - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- Name string
- Community Name.
- Read
Access bool - Whether read access is enabled for this community.
- Security string
- Security features.
- Snmp
Community stringId - The ID of this resource.
- Write
Access bool - Whether write access is enabled for this community.
- ___
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.
- addresses List<String>
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication
Password String - Password used to authenticate the connection to the server (SNMPv3).
- authentication
Protocol String - The protocol used for authentication (SNMPv3).
- comment String
- disabled Boolean
- encryption
Password String - The password used for encryption (SNMPv3).
- encryption
Protocol String - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name String
- Community Name.
- read
Access Boolean - Whether read access is enabled for this community.
- security String
- Security features.
- snmp
Community StringId - The ID of this resource.
- write
Access Boolean - Whether write access is enabled for this community.
- ___
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.
- addresses string[]
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication
Password string - Password used to authenticate the connection to the server (SNMPv3).
- authentication
Protocol string - The protocol used for authentication (SNMPv3).
- comment string
- disabled boolean
- encryption
Password string - The password used for encryption (SNMPv3).
- encryption
Protocol string - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name string
- Community Name.
- read
Access boolean - Whether read access is enabled for this community.
- security string
- Security features.
- snmp
Community stringId - The ID of this resource.
- write
Access boolean - Whether write access is enabled for this community.
- ___
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.
- addresses Sequence[str]
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication_
password str - Password used to authenticate the connection to the server (SNMPv3).
- authentication_
protocol str - The protocol used for authentication (SNMPv3).
- comment str
- disabled bool
- encryption_
password str - The password used for encryption (SNMPv3).
- encryption_
protocol str - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name str
- Community Name.
- read_
access bool - Whether read access is enabled for this community.
- security str
- Security features.
- snmp_
community_ strid - The ID of this resource.
- write_
access bool - Whether write access is enabled for this community.
- ___
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.
- addresses List<String>
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication
Password String - Password used to authenticate the connection to the server (SNMPv3).
- authentication
Protocol String - The protocol used for authentication (SNMPv3).
- comment String
- disabled Boolean
- encryption
Password String - The password used for encryption (SNMPv3).
- encryption
Protocol String - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name String
- Community Name.
- read
Access Boolean - Whether read access is enabled for this community.
- security String
- Security features.
- snmp
Community StringId - The ID of this resource.
- write
Access Boolean - Whether write access is enabled for this community.
Outputs
All input properties are implicitly available as output properties. Additionally, the SnmpCommunity resource produces the following output properties:
Look up Existing SnmpCommunity Resource
Get an existing SnmpCommunity 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?: SnmpCommunityState, opts?: CustomResourceOptions): SnmpCommunity
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
addresses: Optional[Sequence[str]] = None,
authentication_password: Optional[str] = None,
authentication_protocol: Optional[str] = None,
comment: Optional[str] = None,
default: Optional[bool] = None,
disabled: Optional[bool] = None,
encryption_password: Optional[str] = None,
encryption_protocol: Optional[str] = None,
name: Optional[str] = None,
read_access: Optional[bool] = None,
security: Optional[str] = None,
snmp_community_id: Optional[str] = None,
write_access: Optional[bool] = None) -> SnmpCommunity
func GetSnmpCommunity(ctx *Context, name string, id IDInput, state *SnmpCommunityState, opts ...ResourceOption) (*SnmpCommunity, error)
public static SnmpCommunity Get(string name, Input<string> id, SnmpCommunityState? state, CustomResourceOptions? opts = null)
public static SnmpCommunity get(String name, Output<String> id, SnmpCommunityState state, CustomResourceOptions options)
resources: _: type: routeros:SnmpCommunity 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.
- Addresses List<string>
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- Authentication
Password string - Password used to authenticate the connection to the server (SNMPv3).
- Authentication
Protocol string - The protocol used for authentication (SNMPv3).
- Comment string
- Default bool
- It's the default item.
- Disabled bool
- Encryption
Password string - The password used for encryption (SNMPv3).
- Encryption
Protocol string - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- Name string
- Community Name.
- Read
Access bool - Whether read access is enabled for this community.
- Security string
- Security features.
- Snmp
Community stringId - The ID of this resource.
- Write
Access bool - Whether write access is enabled for this community.
- ___
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.
- Addresses []string
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- Authentication
Password string - Password used to authenticate the connection to the server (SNMPv3).
- Authentication
Protocol string - The protocol used for authentication (SNMPv3).
- Comment string
- Default bool
- It's the default item.
- Disabled bool
- Encryption
Password string - The password used for encryption (SNMPv3).
- Encryption
Protocol string - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- Name string
- Community Name.
- Read
Access bool - Whether read access is enabled for this community.
- Security string
- Security features.
- Snmp
Community stringId - The ID of this resource.
- Write
Access bool - Whether write access is enabled for this community.
- ___
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.
- addresses List<String>
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication
Password String - Password used to authenticate the connection to the server (SNMPv3).
- authentication
Protocol String - The protocol used for authentication (SNMPv3).
- comment String
- default_ Boolean
- It's the default item.
- disabled Boolean
- encryption
Password String - The password used for encryption (SNMPv3).
- encryption
Protocol String - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name String
- Community Name.
- read
Access Boolean - Whether read access is enabled for this community.
- security String
- Security features.
- snmp
Community StringId - The ID of this resource.
- write
Access Boolean - Whether write access is enabled for this community.
- ___
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.
- addresses string[]
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication
Password string - Password used to authenticate the connection to the server (SNMPv3).
- authentication
Protocol string - The protocol used for authentication (SNMPv3).
- comment string
- default boolean
- It's the default item.
- disabled boolean
- encryption
Password string - The password used for encryption (SNMPv3).
- encryption
Protocol string - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name string
- Community Name.
- read
Access boolean - Whether read access is enabled for this community.
- security string
- Security features.
- snmp
Community stringId - The ID of this resource.
- write
Access boolean - Whether write access is enabled for this community.
- ___
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.
- addresses Sequence[str]
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication_
password str - Password used to authenticate the connection to the server (SNMPv3).
- authentication_
protocol str - The protocol used for authentication (SNMPv3).
- comment str
- default bool
- It's the default item.
- disabled bool
- encryption_
password str - The password used for encryption (SNMPv3).
- encryption_
protocol str - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name str
- Community Name.
- read_
access bool - Whether read access is enabled for this community.
- security str
- Security features.
- snmp_
community_ strid - The ID of this resource.
- write_
access bool - Whether write access is enabled for this community.
- ___
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.
- addresses List<String>
- Set of IP (v4 or v6) addresses or CIDR networks from which connections to SNMP server are allowed.
- authentication
Password String - Password used to authenticate the connection to the server (SNMPv3).
- authentication
Protocol String - The protocol used for authentication (SNMPv3).
- comment String
- default Boolean
- It's the default item.
- disabled Boolean
- encryption
Password String - The password used for encryption (SNMPv3).
- encryption
Protocol String - encryption protocol to be used to encrypt the communication (SNMPv3). AES (see rfc3826) available since v6.16.
- name String
- Community Name.
- read
Access Boolean - Whether read access is enabled for this community.
- security String
- Security features.
- snmp
Community StringId - The ID of this resource.
- write
Access Boolean - Whether write access is enabled for this community.
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/snmp/community get [print show-ids]]
$ pulumi import routeros:index/snmpCommunity:SnmpCommunity test "*0"
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.