1. Packages
  2. Fortimanager Provider
  3. API Docs
  4. SystemSnmpCommunityHosts6
fortimanager 1.13.0 published on Thursday, Mar 13, 2025 by fortinetdev

fortimanager.SystemSnmpCommunityHosts6

Explore with Pulumi AI

Allow hosts configuration for IPv6.

This resource is a sub resource for variable hosts6 of resource fortimanager.SystemSnmpCommunity. Conflict and overwrite may occur if use both of them.

Example Usage

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

const trname4 = new fortimanager.SystemSnmpCommunity("trname4", {fosid: 2});
const trname = new fortimanager.SystemSnmpCommunityHosts6("trname", {
    community: trname4.fosid,
    fosid: 2,
    "interface": "port2",
    ip: "2001:db8:85a3::8a2e:370:7334/128",
}, {
    dependsOn: [trname4],
});
Copy
import pulumi
import pulumi_fortimanager as fortimanager

trname4 = fortimanager.SystemSnmpCommunity("trname4", fosid=2)
trname = fortimanager.SystemSnmpCommunityHosts6("trname",
    community=trname4.fosid,
    fosid=2,
    interface="port2",
    ip="2001:db8:85a3::8a2e:370:7334/128",
    opts = pulumi.ResourceOptions(depends_on=[trname4]))
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		trname4, err := fortimanager.NewSystemSnmpCommunity(ctx, "trname4", &fortimanager.SystemSnmpCommunityArgs{
			Fosid: pulumi.Float64(2),
		})
		if err != nil {
			return err
		}
		_, err = fortimanager.NewSystemSnmpCommunityHosts6(ctx, "trname", &fortimanager.SystemSnmpCommunityHosts6Args{
			Community: trname4.Fosid,
			Fosid:     pulumi.Float64(2),
			Interface: pulumi.String("port2"),
			Ip:        pulumi.String("2001:db8:85a3::8a2e:370:7334/128"),
		}, pulumi.DependsOn([]pulumi.Resource{
			trname4,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortimanager = Pulumi.Fortimanager;

return await Deployment.RunAsync(() => 
{
    var trname4 = new Fortimanager.SystemSnmpCommunity("trname4", new()
    {
        Fosid = 2,
    });

    var trname = new Fortimanager.SystemSnmpCommunityHosts6("trname", new()
    {
        Community = trname4.Fosid,
        Fosid = 2,
        Interface = "port2",
        Ip = "2001:db8:85a3::8a2e:370:7334/128",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            trname4,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortimanager.SystemSnmpCommunity;
import com.pulumi.fortimanager.SystemSnmpCommunityArgs;
import com.pulumi.fortimanager.SystemSnmpCommunityHosts6;
import com.pulumi.fortimanager.SystemSnmpCommunityHosts6Args;
import com.pulumi.resources.CustomResourceOptions;
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 trname4 = new SystemSnmpCommunity("trname4", SystemSnmpCommunityArgs.builder()
            .fosid("2")
            .build());

        var trname = new SystemSnmpCommunityHosts6("trname", SystemSnmpCommunityHosts6Args.builder()
            .community(trname4.fosid())
            .fosid(2)
            .interface_("port2")
            .ip("2001:db8:85a3::8a2e:370:7334/128")
            .build(), CustomResourceOptions.builder()
                .dependsOn(trname4)
                .build());

    }
}
Copy
resources:
  trname:
    type: fortimanager:SystemSnmpCommunityHosts6
    properties:
      community: ${trname4.fosid}
      fosid: 2
      interface: port2
      ip: 2001:db8:85a3::8a2e:370:7334/128
    options:
      dependsOn:
        - ${trname4}
  trname4:
    type: fortimanager:SystemSnmpCommunity
    properties:
      fosid: '2'
Copy

Create SystemSnmpCommunityHosts6 Resource

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

Constructor syntax

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

@overload
def SystemSnmpCommunityHosts6(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              community: Optional[str] = None,
                              fosid: Optional[float] = None,
                              interface: Optional[str] = None,
                              ip: Optional[str] = None,
                              system_snmp_community_hosts6_id: Optional[str] = None)
func NewSystemSnmpCommunityHosts6(ctx *Context, name string, args SystemSnmpCommunityHosts6Args, opts ...ResourceOption) (*SystemSnmpCommunityHosts6, error)
public SystemSnmpCommunityHosts6(string name, SystemSnmpCommunityHosts6Args args, CustomResourceOptions? opts = null)
public SystemSnmpCommunityHosts6(String name, SystemSnmpCommunityHosts6Args args)
public SystemSnmpCommunityHosts6(String name, SystemSnmpCommunityHosts6Args args, CustomResourceOptions options)
type: fortimanager:SystemSnmpCommunityHosts6
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 This property is required. SystemSnmpCommunityHosts6Args
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 This property is required. SystemSnmpCommunityHosts6InitArgs
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 This property is required. SystemSnmpCommunityHosts6Args
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 This property is required. SystemSnmpCommunityHosts6Args
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. SystemSnmpCommunityHosts6Args
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 systemSnmpCommunityHosts6Resource = new Fortimanager.SystemSnmpCommunityHosts6("systemSnmpCommunityHosts6Resource", new()
{
    Community = "string",
    Fosid = 0,
    Interface = "string",
    Ip = "string",
    SystemSnmpCommunityHosts6Id = "string",
});
Copy
example, err := fortimanager.NewSystemSnmpCommunityHosts6(ctx, "systemSnmpCommunityHosts6Resource", &fortimanager.SystemSnmpCommunityHosts6Args{
Community: pulumi.String("string"),
Fosid: pulumi.Float64(0),
Interface: pulumi.String("string"),
Ip: pulumi.String("string"),
SystemSnmpCommunityHosts6Id: pulumi.String("string"),
})
Copy
var systemSnmpCommunityHosts6Resource = new SystemSnmpCommunityHosts6("systemSnmpCommunityHosts6Resource", SystemSnmpCommunityHosts6Args.builder()
    .community("string")
    .fosid(0)
    .interface_("string")
    .ip("string")
    .systemSnmpCommunityHosts6Id("string")
    .build());
Copy
system_snmp_community_hosts6_resource = fortimanager.SystemSnmpCommunityHosts6("systemSnmpCommunityHosts6Resource",
    community="string",
    fosid=0,
    interface="string",
    ip="string",
    system_snmp_community_hosts6_id="string")
Copy
const systemSnmpCommunityHosts6Resource = new fortimanager.SystemSnmpCommunityHosts6("systemSnmpCommunityHosts6Resource", {
    community: "string",
    fosid: 0,
    "interface": "string",
    ip: "string",
    systemSnmpCommunityHosts6Id: "string",
});
Copy
type: fortimanager:SystemSnmpCommunityHosts6
properties:
    community: string
    fosid: 0
    interface: string
    ip: string
    systemSnmpCommunityHosts6Id: string
Copy

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

Community This property is required. string
Community.
Fosid double
Host entry ID.
Interface string
Allow interface name.
Ip string
Allow host IP address.
SystemSnmpCommunityHosts6Id string
an identifier for the resource with format {{fosid}}.
Community This property is required. string
Community.
Fosid float64
Host entry ID.
Interface string
Allow interface name.
Ip string
Allow host IP address.
SystemSnmpCommunityHosts6Id string
an identifier for the resource with format {{fosid}}.
community This property is required. String
Community.
fosid Double
Host entry ID.
interface_ String
Allow interface name.
ip String
Allow host IP address.
systemSnmpCommunityHosts6Id String
an identifier for the resource with format {{fosid}}.
community This property is required. string
Community.
fosid number
Host entry ID.
interface string
Allow interface name.
ip string
Allow host IP address.
systemSnmpCommunityHosts6Id string
an identifier for the resource with format {{fosid}}.
community This property is required. str
Community.
fosid float
Host entry ID.
interface str
Allow interface name.
ip str
Allow host IP address.
system_snmp_community_hosts6_id str
an identifier for the resource with format {{fosid}}.
community This property is required. String
Community.
fosid Number
Host entry ID.
interface String
Allow interface name.
ip String
Allow host IP address.
systemSnmpCommunityHosts6Id String
an identifier for the resource with format {{fosid}}.

Outputs

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

Get an existing SystemSnmpCommunityHosts6 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?: SystemSnmpCommunityHosts6State, opts?: CustomResourceOptions): SystemSnmpCommunityHosts6
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        community: Optional[str] = None,
        fosid: Optional[float] = None,
        interface: Optional[str] = None,
        ip: Optional[str] = None,
        system_snmp_community_hosts6_id: Optional[str] = None) -> SystemSnmpCommunityHosts6
func GetSystemSnmpCommunityHosts6(ctx *Context, name string, id IDInput, state *SystemSnmpCommunityHosts6State, opts ...ResourceOption) (*SystemSnmpCommunityHosts6, error)
public static SystemSnmpCommunityHosts6 Get(string name, Input<string> id, SystemSnmpCommunityHosts6State? state, CustomResourceOptions? opts = null)
public static SystemSnmpCommunityHosts6 get(String name, Output<String> id, SystemSnmpCommunityHosts6State state, CustomResourceOptions options)
resources:  _:    type: fortimanager:SystemSnmpCommunityHosts6    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:
Community string
Community.
Fosid double
Host entry ID.
Interface string
Allow interface name.
Ip string
Allow host IP address.
SystemSnmpCommunityHosts6Id string
an identifier for the resource with format {{fosid}}.
Community string
Community.
Fosid float64
Host entry ID.
Interface string
Allow interface name.
Ip string
Allow host IP address.
SystemSnmpCommunityHosts6Id string
an identifier for the resource with format {{fosid}}.
community String
Community.
fosid Double
Host entry ID.
interface_ String
Allow interface name.
ip String
Allow host IP address.
systemSnmpCommunityHosts6Id String
an identifier for the resource with format {{fosid}}.
community string
Community.
fosid number
Host entry ID.
interface string
Allow interface name.
ip string
Allow host IP address.
systemSnmpCommunityHosts6Id string
an identifier for the resource with format {{fosid}}.
community str
Community.
fosid float
Host entry ID.
interface str
Allow interface name.
ip str
Allow host IP address.
system_snmp_community_hosts6_id str
an identifier for the resource with format {{fosid}}.
community String
Community.
fosid Number
Host entry ID.
interface String
Allow interface name.
ip String
Allow host IP address.
systemSnmpCommunityHosts6Id String
an identifier for the resource with format {{fosid}}.

Import

System SnmpCommunityHosts6 can be imported using any of these accepted formats:

Set import_options = [“community=YOUR_VALUE”] in the provider section.

$ export “FORTIMANAGER_IMPORT_TABLE”=“true”

$ pulumi import fortimanager:index/systemSnmpCommunityHosts6:SystemSnmpCommunityHosts6 labelname {{fosid}}
Copy

$ unset “FORTIMANAGER_IMPORT_TABLE”

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

Package Details

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