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",
});
import pulumi
import pulumiverse_fortios as fortios
v11 = fortios.firewall.ObjectService("v11",
category="General",
comment="comment",
fqdn="abc.com",
protocol="TCP/UDP/SCTP")
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
})
}
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",
});
});
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());
}
}
resources:
v11:
type: fortios:firewall:ObjectService
properties:
category: General
comment: comment
fqdn: abc.com
protocol: TCP/UDP/SCTP
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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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",
});
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")
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
})
}
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",
});
});
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());
}
}
resources:
iCMP:
type: fortios:firewall:ObjectService
properties:
category: General
comment: comment
icmpcode: '3'
icmptype: '2'
protocol: ICMP
protocolNumber: '1'
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 string
- The unique name of the resource.
- args ObjectServiceArgs
- 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 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 string
- The unique name of the resource.
- args ObjectServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ObjectServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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 string
- Service category.
- Protocol 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.
- Protocol
Number string - IP protocol number.
- Sctp
Portrange string - Multiple SCTP port ranges.
- Session
Ttl string - Custom tcp session TTL.
- Tcp
Portrange string - Multiple TCP port ranges.
- Udp
Portrange string - Multiple UDP port ranges.
- Category string
- Service category.
- Protocol 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.
- Protocol
Number string - IP protocol number.
- Sctp
Portrange string - Multiple SCTP port ranges.
- Session
Ttl string - Custom tcp session TTL.
- Tcp
Portrange string - Multiple TCP port ranges.
- Udp
Portrange string - Multiple UDP port ranges.
- category String
- Service category.
- protocol 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.
- protocol
Number String - IP protocol number.
- sctp
Portrange String - Multiple SCTP port ranges.
- session
Ttl String - Custom tcp session TTL.
- tcp
Portrange String - Multiple TCP port ranges.
- udp
Portrange String - Multiple UDP port ranges.
- category string
- Service category.
- protocol 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.
- protocol
Number string - IP protocol number.
- sctp
Portrange string - Multiple SCTP port ranges.
- session
Ttl string - Custom tcp session TTL.
- tcp
Portrange string - Multiple TCP port ranges.
- udp
Portrange string - Multiple UDP port ranges.
- category str
- Service category.
- protocol 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 String
- Service category.
- protocol 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.
- protocol
Number String - IP protocol number.
- sctp
Portrange String - Multiple SCTP port ranges.
- session
Ttl String - Custom tcp session TTL.
- tcp
Portrange String - Multiple TCP port ranges.
- udp
Portrange 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)
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.
- 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.
- Protocol
Number string - IP protocol number.
- Sctp
Portrange string - Multiple SCTP port ranges.
- Session
Ttl string - Custom tcp session TTL.
- Tcp
Portrange string - Multiple TCP port ranges.
- Udp
Portrange 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.
- Protocol
Number string - IP protocol number.
- Sctp
Portrange string - Multiple SCTP port ranges.
- Session
Ttl string - Custom tcp session TTL.
- Tcp
Portrange string - Multiple TCP port ranges.
- Udp
Portrange 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.
- protocol
Number String - IP protocol number.
- sctp
Portrange String - Multiple SCTP port ranges.
- session
Ttl String - Custom tcp session TTL.
- tcp
Portrange String - Multiple TCP port ranges.
- udp
Portrange 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.
- protocol
Number string - IP protocol number.
- sctp
Portrange string - Multiple SCTP port ranges.
- session
Ttl string - Custom tcp session TTL.
- tcp
Portrange string - Multiple TCP port ranges.
- udp
Portrange 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.
- protocol
Number String - IP protocol number.
- sctp
Portrange String - Multiple SCTP port ranges.
- session
Ttl String - Custom tcp session TTL.
- tcp
Portrange String - Multiple TCP port ranges.
- udp
Portrange 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.