1. Packages
  2. Meraki Provider
  3. API Docs
  4. networks
  5. Snmp
Cisco Meraki v0.3.2 published on Tuesday, Sep 24, 2024 by Pulumi

meraki.networks.Snmp

Explore with Pulumi AI

meraki logo
Cisco Meraki v0.3.2 published on Tuesday, Sep 24, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as meraki from "@pulumi/meraki";
    
    const example = new meraki.networks.Snmp("example", {
        access: "users",
        communityString: "sample",
        networkId: "string",
        users: [{
            passphrase: "hunter2",
            username: "AzureDiamond",
        }],
    });
    export const merakiNetworksSnmpExample = example;
    
    import pulumi
    import pulumi_meraki as meraki
    
    example = meraki.networks.Snmp("example",
        access="users",
        community_string="sample",
        network_id="string",
        users=[{
            "passphrase": "hunter2",
            "username": "AzureDiamond",
        }])
    pulumi.export("merakiNetworksSnmpExample", 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.NewSnmp(ctx, "example", &networks.SnmpArgs{
    			Access:          pulumi.String("users"),
    			CommunityString: pulumi.String("sample"),
    			NetworkId:       pulumi.String("string"),
    			Users: networks.SnmpUserArray{
    				&networks.SnmpUserArgs{
    					Passphrase: pulumi.String("hunter2"),
    					Username:   pulumi.String("AzureDiamond"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("merakiNetworksSnmpExample", 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.Snmp("example", new()
        {
            Access = "users",
            CommunityString = "sample",
            NetworkId = "string",
            Users = new[]
            {
                new Meraki.Networks.Inputs.SnmpUserArgs
                {
                    Passphrase = "hunter2",
                    Username = "AzureDiamond",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["merakiNetworksSnmpExample"] = example,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.meraki.networks.Snmp;
    import com.pulumi.meraki.networks.SnmpArgs;
    import com.pulumi.meraki.networks.inputs.SnmpUserArgs;
    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 Snmp("example", SnmpArgs.builder()
                .access("users")
                .communityString("sample")
                .networkId("string")
                .users(SnmpUserArgs.builder()
                    .passphrase("hunter2")
                    .username("AzureDiamond")
                    .build())
                .build());
    
            ctx.export("merakiNetworksSnmpExample", example);
        }
    }
    
    resources:
      example:
        type: meraki:networks:Snmp
        properties:
          access: users
          communityString: sample
          networkId: string
          users:
            - passphrase: hunter2
              username: AzureDiamond
    outputs:
      merakiNetworksSnmpExample: ${example}
    

    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: SnmpArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Snmp(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             network_id: Optional[str] = None,
             access: Optional[str] = None,
             community_string: Optional[str] = None,
             users: Optional[Sequence[SnmpUserArgs]] = None)
    func NewSnmp(ctx *Context, name string, args SnmpArgs, opts ...ResourceOption) (*Snmp, error)
    public Snmp(string name, SnmpArgs args, CustomResourceOptions? opts = null)
    public Snmp(String name, SnmpArgs args)
    public Snmp(String name, SnmpArgs args, CustomResourceOptions options)
    
    type: meraki:networks: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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var snmpResource = new Meraki.Networks.Snmp("snmpResource", new()
    {
        NetworkId = "string",
        Access = "string",
        CommunityString = "string",
        Users = new[]
        {
            new Meraki.Networks.Inputs.SnmpUserArgs
            {
                Passphrase = "string",
                Username = "string",
            },
        },
    });
    
    example, err := networks.NewSnmp(ctx, "snmpResource", &networks.SnmpArgs{
    	NetworkId:       pulumi.String("string"),
    	Access:          pulumi.String("string"),
    	CommunityString: pulumi.String("string"),
    	Users: networks.SnmpUserArray{
    		&networks.SnmpUserArgs{
    			Passphrase: pulumi.String("string"),
    			Username:   pulumi.String("string"),
    		},
    	},
    })
    
    var snmpResource = new Snmp("snmpResource", SnmpArgs.builder()
        .networkId("string")
        .access("string")
        .communityString("string")
        .users(SnmpUserArgs.builder()
            .passphrase("string")
            .username("string")
            .build())
        .build());
    
    snmp_resource = meraki.networks.Snmp("snmpResource",
        network_id="string",
        access="string",
        community_string="string",
        users=[{
            "passphrase": "string",
            "username": "string",
        }])
    
    const snmpResource = new meraki.networks.Snmp("snmpResource", {
        networkId: "string",
        access: "string",
        communityString: "string",
        users: [{
            passphrase: "string",
            username: "string",
        }],
    });
    
    type: meraki:networks:Snmp
    properties:
        access: string
        communityString: string
        networkId: string
        users:
            - passphrase: string
              username: string
    

    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:

    NetworkId string
    networkId path parameter. Network ID
    Access string
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    CommunityString string
    SNMP community string if access is 'community'.
    Users List<SnmpUser>
    SNMP settings if access is 'users'.
    NetworkId string
    networkId path parameter. Network ID
    Access string
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    CommunityString string
    SNMP community string if access is 'community'.
    Users []SnmpUserArgs
    SNMP settings if access is 'users'.
    networkId String
    networkId path parameter. Network ID
    access String
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    communityString String
    SNMP community string if access is 'community'.
    users List<SnmpUser>
    SNMP settings if access is 'users'.
    networkId string
    networkId path parameter. Network ID
    access string
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    communityString string
    SNMP community string if access is 'community'.
    users SnmpUser[]
    SNMP settings if access is 'users'.
    network_id str
    networkId path parameter. Network ID
    access str
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    community_string str
    SNMP community string if access is 'community'.
    users Sequence[SnmpUserArgs]
    SNMP settings if access is 'users'.
    networkId String
    networkId path parameter. Network ID
    access String
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    communityString String
    SNMP community string if access is 'community'.
    users List<Property Map>
    SNMP settings if access is 'users'.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Snmp 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 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,
            access: Optional[str] = None,
            community_string: Optional[str] = None,
            network_id: Optional[str] = None,
            users: Optional[Sequence[SnmpUserArgs]] = 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)
    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.
    The following state arguments are supported:
    Access string
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    CommunityString string
    SNMP community string if access is 'community'.
    NetworkId string
    networkId path parameter. Network ID
    Users List<SnmpUser>
    SNMP settings if access is 'users'.
    Access string
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    CommunityString string
    SNMP community string if access is 'community'.
    NetworkId string
    networkId path parameter. Network ID
    Users []SnmpUserArgs
    SNMP settings if access is 'users'.
    access String
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    communityString String
    SNMP community string if access is 'community'.
    networkId String
    networkId path parameter. Network ID
    users List<SnmpUser>
    SNMP settings if access is 'users'.
    access string
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    communityString string
    SNMP community string if access is 'community'.
    networkId string
    networkId path parameter. Network ID
    users SnmpUser[]
    SNMP settings if access is 'users'.
    access str
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    community_string str
    SNMP community string if access is 'community'.
    network_id str
    networkId path parameter. Network ID
    users Sequence[SnmpUserArgs]
    SNMP settings if access is 'users'.
    access String
    The type of SNMP access. Can be one of 'none' (disabled), 'community' (V1/V2c), or 'users' (V3).
    communityString String
    SNMP community string if access is 'community'.
    networkId String
    networkId path parameter. Network ID
    users List<Property Map>
    SNMP settings if access is 'users'.

    Supporting Types

    SnmpUser, SnmpUserArgs

    Passphrase string
    The passphrase for the SNMP user.
    Username string
    The username for the SNMP user.
    Passphrase string
    The passphrase for the SNMP user.
    Username string
    The username for the SNMP user.
    passphrase String
    The passphrase for the SNMP user.
    username String
    The username for the SNMP user.
    passphrase string
    The passphrase for the SNMP user.
    username string
    The username for the SNMP user.
    passphrase str
    The passphrase for the SNMP user.
    username str
    The username for the SNMP user.
    passphrase String
    The passphrase for the SNMP user.
    username String
    The username for the SNMP user.

    Import

    $ pulumi import meraki:networks/snmp:Snmp 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.
    meraki logo
    Cisco Meraki v0.3.2 published on Tuesday, Sep 24, 2024 by Pulumi