1. Packages
  2. Avi Provider
  3. API Docs
  4. Snmptrapprofile
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

avi.Snmptrapprofile

Explore with Pulumi AI

<!–

Copyright 2021 VMware, Inc.
SPDX-License-Identifier: Mozilla Public License 2.0

–>

layout: “avi”

page_title: “Avi: avi.Snmptrapprofile” sidebar_current: “docs-avi-resource-snmptrapprofile” description: |- Creates and manages Avi SnmpTrapProfile.

avi.Snmptrapprofile

The SnmpTrapProfile resource allows the creation and management of Avi SnmpTrapProfile

Example Usage

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

const foo = new avi.Snmptrapprofile("foo", {tenantRef: "/api/tenant/?name=admin"});
Copy
import pulumi
import pulumi_avi as avi

foo = avi.Snmptrapprofile("foo", tenant_ref="/api/tenant/?name=admin")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := avi.NewSnmptrapprofile(ctx, "foo", &avi.SnmptrapprofileArgs{
			TenantRef: pulumi.String("/api/tenant/?name=admin"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Avi = Pulumi.Avi;

return await Deployment.RunAsync(() => 
{
    var foo = new Avi.Snmptrapprofile("foo", new()
    {
        TenantRef = "/api/tenant/?name=admin",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.avi.Snmptrapprofile;
import com.pulumi.avi.SnmptrapprofileArgs;
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 foo = new Snmptrapprofile("foo", SnmptrapprofileArgs.builder()
            .tenantRef("/api/tenant/?name=admin")
            .build());

    }
}
Copy
resources:
  foo:
    type: avi:Snmptrapprofile
    properties:
      tenantRef: /api/tenant/?name=admin
Copy

Create Snmptrapprofile Resource

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

Constructor syntax

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

@overload
def Snmptrapprofile(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    configpb_attributes: Optional[Sequence[SnmptrapprofileConfigpbAttributeArgs]] = None,
                    name: Optional[str] = None,
                    snmptrapprofile_id: Optional[str] = None,
                    tenant_ref: Optional[str] = None,
                    trap_servers: Optional[Sequence[SnmptrapprofileTrapServerArgs]] = None,
                    uuid: Optional[str] = None)
func NewSnmptrapprofile(ctx *Context, name string, args *SnmptrapprofileArgs, opts ...ResourceOption) (*Snmptrapprofile, error)
public Snmptrapprofile(string name, SnmptrapprofileArgs? args = null, CustomResourceOptions? opts = null)
public Snmptrapprofile(String name, SnmptrapprofileArgs args)
public Snmptrapprofile(String name, SnmptrapprofileArgs args, CustomResourceOptions options)
type: avi:Snmptrapprofile
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 SnmptrapprofileArgs
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 SnmptrapprofileArgs
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 SnmptrapprofileArgs
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 SnmptrapprofileArgs
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. SnmptrapprofileArgs
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 snmptrapprofileResource = new Avi.Snmptrapprofile("snmptrapprofileResource", new()
{
    ConfigpbAttributes = new[]
    {
        new Avi.Inputs.SnmptrapprofileConfigpbAttributeArgs
        {
            Version = "string",
        },
    },
    Name = "string",
    SnmptrapprofileId = "string",
    TenantRef = "string",
    TrapServers = new[]
    {
        new Avi.Inputs.SnmptrapprofileTrapServerArgs
        {
            IpAddrs = new[]
            {
                new Avi.Inputs.SnmptrapprofileTrapServerIpAddrArgs
                {
                    Addr = "string",
                    Type = "string",
                },
            },
            Community = "string",
            Port = "string",
            Users = new[]
            {
                new Avi.Inputs.SnmptrapprofileTrapServerUserArgs
                {
                    AuthPassphrase = "string",
                    AuthType = "string",
                    PrivPassphrase = "string",
                    PrivType = "string",
                    Username = "string",
                },
            },
            Version = "string",
        },
    },
    Uuid = "string",
});
Copy
example, err := avi.NewSnmptrapprofile(ctx, "snmptrapprofileResource", &avi.SnmptrapprofileArgs{
	ConfigpbAttributes: avi.SnmptrapprofileConfigpbAttributeArray{
		&avi.SnmptrapprofileConfigpbAttributeArgs{
			Version: pulumi.String("string"),
		},
	},
	Name:              pulumi.String("string"),
	SnmptrapprofileId: pulumi.String("string"),
	TenantRef:         pulumi.String("string"),
	TrapServers: avi.SnmptrapprofileTrapServerArray{
		&avi.SnmptrapprofileTrapServerArgs{
			IpAddrs: avi.SnmptrapprofileTrapServerIpAddrArray{
				&avi.SnmptrapprofileTrapServerIpAddrArgs{
					Addr: pulumi.String("string"),
					Type: pulumi.String("string"),
				},
			},
			Community: pulumi.String("string"),
			Port:      pulumi.String("string"),
			Users: avi.SnmptrapprofileTrapServerUserArray{
				&avi.SnmptrapprofileTrapServerUserArgs{
					AuthPassphrase: pulumi.String("string"),
					AuthType:       pulumi.String("string"),
					PrivPassphrase: pulumi.String("string"),
					PrivType:       pulumi.String("string"),
					Username:       pulumi.String("string"),
				},
			},
			Version: pulumi.String("string"),
		},
	},
	Uuid: pulumi.String("string"),
})
Copy
var snmptrapprofileResource = new Snmptrapprofile("snmptrapprofileResource", SnmptrapprofileArgs.builder()
    .configpbAttributes(SnmptrapprofileConfigpbAttributeArgs.builder()
        .version("string")
        .build())
    .name("string")
    .snmptrapprofileId("string")
    .tenantRef("string")
    .trapServers(SnmptrapprofileTrapServerArgs.builder()
        .ipAddrs(SnmptrapprofileTrapServerIpAddrArgs.builder()
            .addr("string")
            .type("string")
            .build())
        .community("string")
        .port("string")
        .users(SnmptrapprofileTrapServerUserArgs.builder()
            .authPassphrase("string")
            .authType("string")
            .privPassphrase("string")
            .privType("string")
            .username("string")
            .build())
        .version("string")
        .build())
    .uuid("string")
    .build());
Copy
snmptrapprofile_resource = avi.Snmptrapprofile("snmptrapprofileResource",
    configpb_attributes=[{
        "version": "string",
    }],
    name="string",
    snmptrapprofile_id="string",
    tenant_ref="string",
    trap_servers=[{
        "ip_addrs": [{
            "addr": "string",
            "type": "string",
        }],
        "community": "string",
        "port": "string",
        "users": [{
            "auth_passphrase": "string",
            "auth_type": "string",
            "priv_passphrase": "string",
            "priv_type": "string",
            "username": "string",
        }],
        "version": "string",
    }],
    uuid="string")
Copy
const snmptrapprofileResource = new avi.Snmptrapprofile("snmptrapprofileResource", {
    configpbAttributes: [{
        version: "string",
    }],
    name: "string",
    snmptrapprofileId: "string",
    tenantRef: "string",
    trapServers: [{
        ipAddrs: [{
            addr: "string",
            type: "string",
        }],
        community: "string",
        port: "string",
        users: [{
            authPassphrase: "string",
            authType: "string",
            privPassphrase: "string",
            privType: "string",
            username: "string",
        }],
        version: "string",
    }],
    uuid: "string",
});
Copy
type: avi:Snmptrapprofile
properties:
    configpbAttributes:
        - version: string
    name: string
    snmptrapprofileId: string
    tenantRef: string
    trapServers:
        - community: string
          ipAddrs:
            - addr: string
              type: string
          port: string
          users:
            - authPassphrase: string
              authType: string
              privPassphrase: string
              privType: string
              username: string
          version: string
    uuid: string
Copy

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

ConfigpbAttributes List<SnmptrapprofileConfigpbAttribute>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Name string
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
SnmptrapprofileId string
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
TrapServers List<SnmptrapprofileTrapServer>
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ConfigpbAttributes []SnmptrapprofileConfigpbAttributeArgs
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Name string
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
SnmptrapprofileId string
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
TrapServers []SnmptrapprofileTrapServerArgs
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes List<SnmptrapprofileConfigpbAttribute>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name String
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofileId String
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trapServers List<SnmptrapprofileTrapServer>
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes SnmptrapprofileConfigpbAttribute[]
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name string
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofileId string
tenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trapServers SnmptrapprofileTrapServer[]
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid string
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpb_attributes Sequence[SnmptrapprofileConfigpbAttributeArgs]
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name str
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofile_id str
tenant_ref str
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trap_servers Sequence[SnmptrapprofileTrapServerArgs]
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid str
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes List<Property Map>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name String
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofileId String
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trapServers List<Property Map>
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.

Outputs

All input properties are implicitly available as output properties. Additionally, the Snmptrapprofile 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 Snmptrapprofile Resource

Get an existing Snmptrapprofile 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?: SnmptrapprofileState, opts?: CustomResourceOptions): Snmptrapprofile
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        configpb_attributes: Optional[Sequence[SnmptrapprofileConfigpbAttributeArgs]] = None,
        name: Optional[str] = None,
        snmptrapprofile_id: Optional[str] = None,
        tenant_ref: Optional[str] = None,
        trap_servers: Optional[Sequence[SnmptrapprofileTrapServerArgs]] = None,
        uuid: Optional[str] = None) -> Snmptrapprofile
func GetSnmptrapprofile(ctx *Context, name string, id IDInput, state *SnmptrapprofileState, opts ...ResourceOption) (*Snmptrapprofile, error)
public static Snmptrapprofile Get(string name, Input<string> id, SnmptrapprofileState? state, CustomResourceOptions? opts = null)
public static Snmptrapprofile get(String name, Output<String> id, SnmptrapprofileState state, CustomResourceOptions options)
resources:  _:    type: avi:Snmptrapprofile    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:
ConfigpbAttributes List<SnmptrapprofileConfigpbAttribute>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Name string
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
SnmptrapprofileId string
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
TrapServers List<SnmptrapprofileTrapServer>
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ConfigpbAttributes []SnmptrapprofileConfigpbAttributeArgs
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Name string
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
SnmptrapprofileId string
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
TrapServers []SnmptrapprofileTrapServerArgs
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes List<SnmptrapprofileConfigpbAttribute>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name String
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofileId String
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trapServers List<SnmptrapprofileTrapServer>
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes SnmptrapprofileConfigpbAttribute[]
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name string
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofileId string
tenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trapServers SnmptrapprofileTrapServer[]
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid string
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpb_attributes Sequence[SnmptrapprofileConfigpbAttributeArgs]
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name str
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofile_id str
tenant_ref str
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trap_servers Sequence[SnmptrapprofileTrapServerArgs]
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid str
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes List<Property Map>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name String
A user-friendly name of the snmp trap configuration. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
snmptrapprofileId String
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
trapServers List<Property Map>
The ip address or hostname of the snmp trap destination server. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Uuid of the snmp trap profile object. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.

Supporting Types

SnmptrapprofileConfigpbAttribute
, SnmptrapprofileConfigpbAttributeArgs

Version string
Version string
version String
version string
version String

SnmptrapprofileTrapServer
, SnmptrapprofileTrapServerArgs

ipAddrs This property is required. List<Property Map>
community String
port String
users List<Property Map>
version String

SnmptrapprofileTrapServerIpAddr
, SnmptrapprofileTrapServerIpAddrArgs

Addr This property is required. string
Type This property is required. string
Addr This property is required. string
Type This property is required. string
addr This property is required. String
type This property is required. String
addr This property is required. string
type This property is required. string
addr This property is required. str
type This property is required. str
addr This property is required. String
type This property is required. String

SnmptrapprofileTrapServerUser
, SnmptrapprofileTrapServerUserArgs

AuthPassphrase string
AuthType string
PrivPassphrase string
PrivType string
Username string
AuthPassphrase string
AuthType string
PrivPassphrase string
PrivType string
Username string
authPassphrase String
authType String
privPassphrase String
privType String
username String
authPassphrase string
authType string
privPassphrase string
privType string
username string
authPassphrase String
authType String
privPassphrase String
privType String
username String

Package Details

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