1. Packages
  2. Fortios
  3. API Docs
  4. firewall
  5. ObjectService
Fortios v0.0.6 published on Tuesday, Jul 9, 2024 by pulumiverse

fortios.firewall.ObjectService

Explore with Pulumi AI

Provides a resource to configure firewall service of FortiOS.

!> Warning: The resource will be deprecated and replaced by new resource fortios.firewall/service.Custom, we recommend that you use the new resource.

Example Usage

Fqdn Service

import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";

const v11 = new fortios.firewall.ObjectService("v11", {
    category: "General",
    comment: "comment",
    fqdn: "abc.com",
    protocol: "TCP/UDP/SCTP",
});
Copy
import pulumi
import pulumiverse_fortios as fortios

v11 = fortios.firewall.ObjectService("v11",
    category="General",
    comment="comment",
    fqdn="abc.com",
    protocol="TCP/UDP/SCTP")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/firewall"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := firewall.NewObjectService(ctx, "v11", &firewall.ObjectServiceArgs{
			Category: pulumi.String("General"),
			Comment:  pulumi.String("comment"),
			Fqdn:     pulumi.String("abc.com"),
			Protocol: pulumi.String("TCP/UDP/SCTP"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortios = Pulumiverse.Fortios;

return await Deployment.RunAsync(() => 
{
    var v11 = new Fortios.Firewall.ObjectService("v11", new()
    {
        Category = "General",
        Comment = "comment",
        Fqdn = "abc.com",
        Protocol = "TCP/UDP/SCTP",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.firewall.ObjectService;
import com.pulumi.fortios.firewall.ObjectServiceArgs;
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 v11 = new ObjectService("v11", ObjectServiceArgs.builder()
            .category("General")
            .comment("comment")
            .fqdn("abc.com")
            .protocol("TCP/UDP/SCTP")
            .build());

    }
}
Copy
resources:
  v11:
    type: fortios:firewall:ObjectService
    properties:
      category: General
      comment: comment
      fqdn: abc.com
      protocol: TCP/UDP/SCTP
Copy

Iprange Service

import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";

const v13 = new fortios.firewall.ObjectService("v13", {
    category: "General",
    comment: "comment",
    iprange: "1.1.1.1-2.2.2.2",
    protocol: "TCP/UDP/SCTP",
    sctpPortrange: "66-88",
    tcpPortrange: "22-33",
    udpPortrange: "44-55",
});
Copy
import pulumi
import pulumiverse_fortios as fortios

v13 = fortios.firewall.ObjectService("v13",
    category="General",
    comment="comment",
    iprange="1.1.1.1-2.2.2.2",
    protocol="TCP/UDP/SCTP",
    sctp_portrange="66-88",
    tcp_portrange="22-33",
    udp_portrange="44-55")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/firewall"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := firewall.NewObjectService(ctx, "v13", &firewall.ObjectServiceArgs{
			Category:      pulumi.String("General"),
			Comment:       pulumi.String("comment"),
			Iprange:       pulumi.String("1.1.1.1-2.2.2.2"),
			Protocol:      pulumi.String("TCP/UDP/SCTP"),
			SctpPortrange: pulumi.String("66-88"),
			TcpPortrange:  pulumi.String("22-33"),
			UdpPortrange:  pulumi.String("44-55"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortios = Pulumiverse.Fortios;

return await Deployment.RunAsync(() => 
{
    var v13 = new Fortios.Firewall.ObjectService("v13", new()
    {
        Category = "General",
        Comment = "comment",
        Iprange = "1.1.1.1-2.2.2.2",
        Protocol = "TCP/UDP/SCTP",
        SctpPortrange = "66-88",
        TcpPortrange = "22-33",
        UdpPortrange = "44-55",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.firewall.ObjectService;
import com.pulumi.fortios.firewall.ObjectServiceArgs;
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 v13 = new ObjectService("v13", ObjectServiceArgs.builder()
            .category("General")
            .comment("comment")
            .iprange("1.1.1.1-2.2.2.2")
            .protocol("TCP/UDP/SCTP")
            .sctpPortrange("66-88")
            .tcpPortrange("22-33")
            .udpPortrange("44-55")
            .build());

    }
}
Copy
resources:
  v13:
    type: fortios:firewall:ObjectService
    properties:
      category: General
      comment: comment
      iprange: 1.1.1.1-2.2.2.2
      protocol: TCP/UDP/SCTP
      sctpPortrange: 66-88
      tcpPortrange: 22-33
      udpPortrange: 44-55
Copy

ICMP Service

import * as pulumi from "@pulumi/pulumi";
import * as fortios from "@pulumiverse/fortios";

const iCMP = new fortios.firewall.ObjectService("iCMP", {
    category: "General",
    comment: "comment",
    icmpcode: "3",
    icmptype: "2",
    protocol: "ICMP",
    protocolNumber: "1",
});
Copy
import pulumi
import pulumiverse_fortios as fortios

i_cmp = fortios.firewall.ObjectService("iCMP",
    category="General",
    comment="comment",
    icmpcode="3",
    icmptype="2",
    protocol="ICMP",
    protocol_number="1")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/firewall"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := firewall.NewObjectService(ctx, "iCMP", &firewall.ObjectServiceArgs{
			Category:       pulumi.String("General"),
			Comment:        pulumi.String("comment"),
			Icmpcode:       pulumi.String("3"),
			Icmptype:       pulumi.String("2"),
			Protocol:       pulumi.String("ICMP"),
			ProtocolNumber: pulumi.String("1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fortios = Pulumiverse.Fortios;

return await Deployment.RunAsync(() => 
{
    var iCMP = new Fortios.Firewall.ObjectService("iCMP", new()
    {
        Category = "General",
        Comment = "comment",
        Icmpcode = "3",
        Icmptype = "2",
        Protocol = "ICMP",
        ProtocolNumber = "1",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fortios.firewall.ObjectService;
import com.pulumi.fortios.firewall.ObjectServiceArgs;
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 iCMP = new ObjectService("iCMP", ObjectServiceArgs.builder()
            .category("General")
            .comment("comment")
            .icmpcode("3")
            .icmptype("2")
            .protocol("ICMP")
            .protocolNumber("1")
            .build());

    }
}
Copy
resources:
  iCMP:
    type: fortios:firewall:ObjectService
    properties:
      category: General
      comment: comment
      icmpcode: '3'
      icmptype: '2'
      protocol: ICMP
      protocolNumber: '1'
Copy

Create ObjectService Resource

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

Constructor syntax

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

@overload
def ObjectService(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  category: Optional[str] = None,
                  protocol: Optional[str] = None,
                  name: Optional[str] = None,
                  icmpcode: Optional[str] = None,
                  icmptype: Optional[str] = None,
                  iprange: Optional[str] = None,
                  fqdn: Optional[str] = None,
                  comment: Optional[str] = None,
                  protocol_number: Optional[str] = None,
                  sctp_portrange: Optional[str] = None,
                  session_ttl: Optional[str] = None,
                  tcp_portrange: Optional[str] = None,
                  udp_portrange: Optional[str] = None)
func NewObjectService(ctx *Context, name string, args ObjectServiceArgs, opts ...ResourceOption) (*ObjectService, error)
public ObjectService(string name, ObjectServiceArgs args, CustomResourceOptions? opts = null)
public ObjectService(String name, ObjectServiceArgs args)
public ObjectService(String name, ObjectServiceArgs args, CustomResourceOptions options)
type: fortios:firewall:ObjectService
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. ObjectServiceArgs
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. ObjectServiceArgs
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. ObjectServiceArgs
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. ObjectServiceArgs
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. ObjectServiceArgs
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 objectServiceResource = new Fortios.Firewall.ObjectService("objectServiceResource", new()
{
    Category = "string",
    Protocol = "string",
    Name = "string",
    Icmpcode = "string",
    Icmptype = "string",
    Iprange = "string",
    Fqdn = "string",
    Comment = "string",
    ProtocolNumber = "string",
    SctpPortrange = "string",
    SessionTtl = "string",
    TcpPortrange = "string",
    UdpPortrange = "string",
});
Copy
example, err := firewall.NewObjectService(ctx, "objectServiceResource", &firewall.ObjectServiceArgs{
	Category:       pulumi.String("string"),
	Protocol:       pulumi.String("string"),
	Name:           pulumi.String("string"),
	Icmpcode:       pulumi.String("string"),
	Icmptype:       pulumi.String("string"),
	Iprange:        pulumi.String("string"),
	Fqdn:           pulumi.String("string"),
	Comment:        pulumi.String("string"),
	ProtocolNumber: pulumi.String("string"),
	SctpPortrange:  pulumi.String("string"),
	SessionTtl:     pulumi.String("string"),
	TcpPortrange:   pulumi.String("string"),
	UdpPortrange:   pulumi.String("string"),
})
Copy
var objectServiceResource = new ObjectService("objectServiceResource", ObjectServiceArgs.builder()
    .category("string")
    .protocol("string")
    .name("string")
    .icmpcode("string")
    .icmptype("string")
    .iprange("string")
    .fqdn("string")
    .comment("string")
    .protocolNumber("string")
    .sctpPortrange("string")
    .sessionTtl("string")
    .tcpPortrange("string")
    .udpPortrange("string")
    .build());
Copy
object_service_resource = fortios.firewall.ObjectService("objectServiceResource",
    category="string",
    protocol="string",
    name="string",
    icmpcode="string",
    icmptype="string",
    iprange="string",
    fqdn="string",
    comment="string",
    protocol_number="string",
    sctp_portrange="string",
    session_ttl="string",
    tcp_portrange="string",
    udp_portrange="string")
Copy
const objectServiceResource = new fortios.firewall.ObjectService("objectServiceResource", {
    category: "string",
    protocol: "string",
    name: "string",
    icmpcode: "string",
    icmptype: "string",
    iprange: "string",
    fqdn: "string",
    comment: "string",
    protocolNumber: "string",
    sctpPortrange: "string",
    sessionTtl: "string",
    tcpPortrange: "string",
    udpPortrange: "string",
});
Copy
type: fortios:firewall:ObjectService
properties:
    category: string
    comment: string
    fqdn: string
    icmpcode: string
    icmptype: string
    iprange: string
    name: string
    protocol: string
    protocolNumber: string
    sctpPortrange: string
    sessionTtl: string
    tcpPortrange: string
    udpPortrange: string
Copy

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

Category This property is required. string
Service category.
Protocol This property is required. string
Protocol type based on IANA numbers.
Comment string
Comment.
Fqdn string
Fully qualified domain name.
Icmpcode string
ICMP code.
Icmptype string
ICMP type.
Iprange string
Start and end of the IP range associated with service.
Name string
Number of minutes before an idle administrator session time out.
ProtocolNumber string
IP protocol number.
SctpPortrange string
Multiple SCTP port ranges.
SessionTtl string
Custom tcp session TTL.
TcpPortrange string
Multiple TCP port ranges.
UdpPortrange string
Multiple UDP port ranges.
Category This property is required. string
Service category.
Protocol This property is required. string
Protocol type based on IANA numbers.
Comment string
Comment.
Fqdn string
Fully qualified domain name.
Icmpcode string
ICMP code.
Icmptype string
ICMP type.
Iprange string
Start and end of the IP range associated with service.
Name string
Number of minutes before an idle administrator session time out.
ProtocolNumber string
IP protocol number.
SctpPortrange string
Multiple SCTP port ranges.
SessionTtl string
Custom tcp session TTL.
TcpPortrange string
Multiple TCP port ranges.
UdpPortrange string
Multiple UDP port ranges.
category This property is required. String
Service category.
protocol This property is required. String
Protocol type based on IANA numbers.
comment String
Comment.
fqdn String
Fully qualified domain name.
icmpcode String
ICMP code.
icmptype String
ICMP type.
iprange String
Start and end of the IP range associated with service.
name String
Number of minutes before an idle administrator session time out.
protocolNumber String
IP protocol number.
sctpPortrange String
Multiple SCTP port ranges.
sessionTtl String
Custom tcp session TTL.
tcpPortrange String
Multiple TCP port ranges.
udpPortrange String
Multiple UDP port ranges.
category This property is required. string
Service category.
protocol This property is required. string
Protocol type based on IANA numbers.
comment string
Comment.
fqdn string
Fully qualified domain name.
icmpcode string
ICMP code.
icmptype string
ICMP type.
iprange string
Start and end of the IP range associated with service.
name string
Number of minutes before an idle administrator session time out.
protocolNumber string
IP protocol number.
sctpPortrange string
Multiple SCTP port ranges.
sessionTtl string
Custom tcp session TTL.
tcpPortrange string
Multiple TCP port ranges.
udpPortrange string
Multiple UDP port ranges.
category This property is required. str
Service category.
protocol This property is required. str
Protocol type based on IANA numbers.
comment str
Comment.
fqdn str
Fully qualified domain name.
icmpcode str
ICMP code.
icmptype str
ICMP type.
iprange str
Start and end of the IP range associated with service.
name str
Number of minutes before an idle administrator session time out.
protocol_number str
IP protocol number.
sctp_portrange str
Multiple SCTP port ranges.
session_ttl str
Custom tcp session TTL.
tcp_portrange str
Multiple TCP port ranges.
udp_portrange str
Multiple UDP port ranges.
category This property is required. String
Service category.
protocol This property is required. String
Protocol type based on IANA numbers.
comment String
Comment.
fqdn String
Fully qualified domain name.
icmpcode String
ICMP code.
icmptype String
ICMP type.
iprange String
Start and end of the IP range associated with service.
name String
Number of minutes before an idle administrator session time out.
protocolNumber String
IP protocol number.
sctpPortrange String
Multiple SCTP port ranges.
sessionTtl String
Custom tcp session TTL.
tcpPortrange String
Multiple TCP port ranges.
udpPortrange String
Multiple UDP port ranges.

Outputs

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

Get an existing ObjectService 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?: ObjectServiceState, opts?: CustomResourceOptions): ObjectService
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        category: Optional[str] = None,
        comment: Optional[str] = None,
        fqdn: Optional[str] = None,
        icmpcode: Optional[str] = None,
        icmptype: Optional[str] = None,
        iprange: Optional[str] = None,
        name: Optional[str] = None,
        protocol: Optional[str] = None,
        protocol_number: Optional[str] = None,
        sctp_portrange: Optional[str] = None,
        session_ttl: Optional[str] = None,
        tcp_portrange: Optional[str] = None,
        udp_portrange: Optional[str] = None) -> ObjectService
func GetObjectService(ctx *Context, name string, id IDInput, state *ObjectServiceState, opts ...ResourceOption) (*ObjectService, error)
public static ObjectService Get(string name, Input<string> id, ObjectServiceState? state, CustomResourceOptions? opts = null)
public static ObjectService get(String name, Output<String> id, ObjectServiceState state, CustomResourceOptions options)
resources:  _:    type: fortios:firewall:ObjectService    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:
Category string
Service category.
Comment string
Comment.
Fqdn string
Fully qualified domain name.
Icmpcode string
ICMP code.
Icmptype string
ICMP type.
Iprange string
Start and end of the IP range associated with service.
Name string
Number of minutes before an idle administrator session time out.
Protocol string
Protocol type based on IANA numbers.
ProtocolNumber string
IP protocol number.
SctpPortrange string
Multiple SCTP port ranges.
SessionTtl string
Custom tcp session TTL.
TcpPortrange string
Multiple TCP port ranges.
UdpPortrange string
Multiple UDP port ranges.
Category string
Service category.
Comment string
Comment.
Fqdn string
Fully qualified domain name.
Icmpcode string
ICMP code.
Icmptype string
ICMP type.
Iprange string
Start and end of the IP range associated with service.
Name string
Number of minutes before an idle administrator session time out.
Protocol string
Protocol type based on IANA numbers.
ProtocolNumber string
IP protocol number.
SctpPortrange string
Multiple SCTP port ranges.
SessionTtl string
Custom tcp session TTL.
TcpPortrange string
Multiple TCP port ranges.
UdpPortrange string
Multiple UDP port ranges.
category String
Service category.
comment String
Comment.
fqdn String
Fully qualified domain name.
icmpcode String
ICMP code.
icmptype String
ICMP type.
iprange String
Start and end of the IP range associated with service.
name String
Number of minutes before an idle administrator session time out.
protocol String
Protocol type based on IANA numbers.
protocolNumber String
IP protocol number.
sctpPortrange String
Multiple SCTP port ranges.
sessionTtl String
Custom tcp session TTL.
tcpPortrange String
Multiple TCP port ranges.
udpPortrange String
Multiple UDP port ranges.
category string
Service category.
comment string
Comment.
fqdn string
Fully qualified domain name.
icmpcode string
ICMP code.
icmptype string
ICMP type.
iprange string
Start and end of the IP range associated with service.
name string
Number of minutes before an idle administrator session time out.
protocol string
Protocol type based on IANA numbers.
protocolNumber string
IP protocol number.
sctpPortrange string
Multiple SCTP port ranges.
sessionTtl string
Custom tcp session TTL.
tcpPortrange string
Multiple TCP port ranges.
udpPortrange string
Multiple UDP port ranges.
category str
Service category.
comment str
Comment.
fqdn str
Fully qualified domain name.
icmpcode str
ICMP code.
icmptype str
ICMP type.
iprange str
Start and end of the IP range associated with service.
name str
Number of minutes before an idle administrator session time out.
protocol str
Protocol type based on IANA numbers.
protocol_number str
IP protocol number.
sctp_portrange str
Multiple SCTP port ranges.
session_ttl str
Custom tcp session TTL.
tcp_portrange str
Multiple TCP port ranges.
udp_portrange str
Multiple UDP port ranges.
category String
Service category.
comment String
Comment.
fqdn String
Fully qualified domain name.
icmpcode String
ICMP code.
icmptype String
ICMP type.
iprange String
Start and end of the IP range associated with service.
name String
Number of minutes before an idle administrator session time out.
protocol String
Protocol type based on IANA numbers.
protocolNumber String
IP protocol number.
sctpPortrange String
Multiple SCTP port ranges.
sessionTtl String
Custom tcp session TTL.
tcpPortrange String
Multiple TCP port ranges.
udpPortrange String
Multiple UDP port ranges.

Package Details

Repository
fortios pulumiverse/pulumi-fortios
License
Apache-2.0
Notes
This Pulumi package is based on the fortios Terraform Provider.