oci.NetworkFirewall.NetworkFirewallPolicyService
Explore with Pulumi AI
This resource provides the Network Firewall Policy Service resource in Oracle Cloud Infrastructure Network Firewall service.
Creates a new Service for the Network Firewall Policy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNetworkFirewallPolicyService = new oci.networkfirewall.NetworkFirewallPolicyService("test_network_firewall_policy_service", {
name: networkFirewallPolicyServiceName,
networkFirewallPolicyId: testNetworkFirewallPolicy.id,
portRanges: [{
minimumPort: networkFirewallPolicyServicePortRangesMinimumPort,
maximumPort: networkFirewallPolicyServicePortRangesMaximumPort,
}],
type: networkFirewallPolicyServiceType,
});
import pulumi
import pulumi_oci as oci
test_network_firewall_policy_service = oci.network_firewall.NetworkFirewallPolicyService("test_network_firewall_policy_service",
name=network_firewall_policy_service_name,
network_firewall_policy_id=test_network_firewall_policy["id"],
port_ranges=[{
"minimum_port": network_firewall_policy_service_port_ranges_minimum_port,
"maximum_port": network_firewall_policy_service_port_ranges_maximum_port,
}],
type=network_firewall_policy_service_type)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/NetworkFirewall"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := NetworkFirewall.NewNetworkFirewallPolicyService(ctx, "test_network_firewall_policy_service", &NetworkFirewall.NetworkFirewallPolicyServiceArgs{
Name: pulumi.Any(networkFirewallPolicyServiceName),
NetworkFirewallPolicyId: pulumi.Any(testNetworkFirewallPolicy.Id),
PortRanges: networkfirewall.NetworkFirewallPolicyServicePortRangeArray{
&networkfirewall.NetworkFirewallPolicyServicePortRangeArgs{
MinimumPort: pulumi.Any(networkFirewallPolicyServicePortRangesMinimumPort),
MaximumPort: pulumi.Any(networkFirewallPolicyServicePortRangesMaximumPort),
},
},
Type: pulumi.Any(networkFirewallPolicyServiceType),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testNetworkFirewallPolicyService = new Oci.NetworkFirewall.NetworkFirewallPolicyService("test_network_firewall_policy_service", new()
{
Name = networkFirewallPolicyServiceName,
NetworkFirewallPolicyId = testNetworkFirewallPolicy.Id,
PortRanges = new[]
{
new Oci.NetworkFirewall.Inputs.NetworkFirewallPolicyServicePortRangeArgs
{
MinimumPort = networkFirewallPolicyServicePortRangesMinimumPort,
MaximumPort = networkFirewallPolicyServicePortRangesMaximumPort,
},
},
Type = networkFirewallPolicyServiceType,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.NetworkFirewall.NetworkFirewallPolicyService;
import com.pulumi.oci.NetworkFirewall.NetworkFirewallPolicyServiceArgs;
import com.pulumi.oci.NetworkFirewall.inputs.NetworkFirewallPolicyServicePortRangeArgs;
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 testNetworkFirewallPolicyService = new NetworkFirewallPolicyService("testNetworkFirewallPolicyService", NetworkFirewallPolicyServiceArgs.builder()
.name(networkFirewallPolicyServiceName)
.networkFirewallPolicyId(testNetworkFirewallPolicy.id())
.portRanges(NetworkFirewallPolicyServicePortRangeArgs.builder()
.minimumPort(networkFirewallPolicyServicePortRangesMinimumPort)
.maximumPort(networkFirewallPolicyServicePortRangesMaximumPort)
.build())
.type(networkFirewallPolicyServiceType)
.build());
}
}
resources:
testNetworkFirewallPolicyService:
type: oci:NetworkFirewall:NetworkFirewallPolicyService
name: test_network_firewall_policy_service
properties:
name: ${networkFirewallPolicyServiceName}
networkFirewallPolicyId: ${testNetworkFirewallPolicy.id}
portRanges:
- minimumPort: ${networkFirewallPolicyServicePortRangesMinimumPort}
maximumPort: ${networkFirewallPolicyServicePortRangesMaximumPort}
type: ${networkFirewallPolicyServiceType}
Create NetworkFirewallPolicyService Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkFirewallPolicyService(name: string, args: NetworkFirewallPolicyServiceArgs, opts?: CustomResourceOptions);
@overload
def NetworkFirewallPolicyService(resource_name: str,
args: NetworkFirewallPolicyServiceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkFirewallPolicyService(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_firewall_policy_id: Optional[str] = None,
port_ranges: Optional[Sequence[_networkfirewall.NetworkFirewallPolicyServicePortRangeArgs]] = None,
type: Optional[str] = None,
name: Optional[str] = None)
func NewNetworkFirewallPolicyService(ctx *Context, name string, args NetworkFirewallPolicyServiceArgs, opts ...ResourceOption) (*NetworkFirewallPolicyService, error)
public NetworkFirewallPolicyService(string name, NetworkFirewallPolicyServiceArgs args, CustomResourceOptions? opts = null)
public NetworkFirewallPolicyService(String name, NetworkFirewallPolicyServiceArgs args)
public NetworkFirewallPolicyService(String name, NetworkFirewallPolicyServiceArgs args, CustomResourceOptions options)
type: oci:NetworkFirewall:NetworkFirewallPolicyService
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 NetworkFirewallPolicyServiceArgs
- 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 NetworkFirewallPolicyServiceArgs
- 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 NetworkFirewallPolicyServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkFirewallPolicyServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkFirewallPolicyServiceArgs
- 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 networkFirewallPolicyServiceResource = new Oci.NetworkFirewall.NetworkFirewallPolicyService("networkFirewallPolicyServiceResource", new()
{
NetworkFirewallPolicyId = "string",
PortRanges = new[]
{
new Oci.NetworkFirewall.Inputs.NetworkFirewallPolicyServicePortRangeArgs
{
MinimumPort = 0,
MaximumPort = 0,
},
},
Type = "string",
Name = "string",
});
example, err := NetworkFirewall.NewNetworkFirewallPolicyService(ctx, "networkFirewallPolicyServiceResource", &NetworkFirewall.NetworkFirewallPolicyServiceArgs{
NetworkFirewallPolicyId: pulumi.String("string"),
PortRanges: networkfirewall.NetworkFirewallPolicyServicePortRangeArray{
&networkfirewall.NetworkFirewallPolicyServicePortRangeArgs{
MinimumPort: pulumi.Int(0),
MaximumPort: pulumi.Int(0),
},
},
Type: pulumi.String("string"),
Name: pulumi.String("string"),
})
var networkFirewallPolicyServiceResource = new NetworkFirewallPolicyService("networkFirewallPolicyServiceResource", NetworkFirewallPolicyServiceArgs.builder()
.networkFirewallPolicyId("string")
.portRanges(NetworkFirewallPolicyServicePortRangeArgs.builder()
.minimumPort(0)
.maximumPort(0)
.build())
.type("string")
.name("string")
.build());
network_firewall_policy_service_resource = oci.network_firewall.NetworkFirewallPolicyService("networkFirewallPolicyServiceResource",
network_firewall_policy_id="string",
port_ranges=[oci.network_firewall.NetworkFirewallPolicyServicePortRangeArgs(
minimum_port=0,
maximum_port=0,
)],
type="string",
name="string")
const networkFirewallPolicyServiceResource = new oci.networkfirewall.NetworkFirewallPolicyService("networkFirewallPolicyServiceResource", {
networkFirewallPolicyId: "string",
portRanges: [{
minimumPort: 0,
maximumPort: 0,
}],
type: "string",
name: "string",
});
type: oci:NetworkFirewall:NetworkFirewallPolicyService
properties:
name: string
networkFirewallPolicyId: string
portRanges:
- maximumPort: 0
minimumPort: 0
type: string
NetworkFirewallPolicyService Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The NetworkFirewallPolicyService resource accepts the following input properties:
- Network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- Port
Ranges List<NetworkFirewall Policy Service Port Range> - (Updatable) List of port-ranges to be used.
- Type string
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Name string
- Name of the service
- Network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- Port
Ranges []NetworkFirewall Policy Service Port Range Args - (Updatable) List of port-ranges to be used.
- Type string
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Name string
- Name of the service
- network
Firewall StringPolicy Id - Unique Network Firewall Policy identifier
- port
Ranges List<PolicyService Port Range> - (Updatable) List of port-ranges to be used.
- type String
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- Name of the service
- network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- port
Ranges NetworkFirewall Policy Service Port Range[] - (Updatable) List of port-ranges to be used.
- type string
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name string
- Name of the service
- network_
firewall_ strpolicy_ id - Unique Network Firewall Policy identifier
- port_
ranges Sequence[networkfirewall.Network Firewall Policy Service Port Range Args] - (Updatable) List of port-ranges to be used.
- type str
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name str
- Name of the service
- network
Firewall StringPolicy Id - Unique Network Firewall Policy identifier
- port
Ranges List<Property Map> - (Updatable) List of port-ranges to be used.
- type String
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- Name of the service
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkFirewallPolicyService resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Parent
Resource stringId - OCID of the Network Firewall Policy this service belongs to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Parent
Resource stringId - OCID of the Network Firewall Policy this service belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- parent
Resource StringId - OCID of the Network Firewall Policy this service belongs to.
- id string
- The provider-assigned unique ID for this managed resource.
- parent
Resource stringId - OCID of the Network Firewall Policy this service belongs to.
- id str
- The provider-assigned unique ID for this managed resource.
- parent_
resource_ strid - OCID of the Network Firewall Policy this service belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- parent
Resource StringId - OCID of the Network Firewall Policy this service belongs to.
Look up Existing NetworkFirewallPolicyService Resource
Get an existing NetworkFirewallPolicyService 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?: NetworkFirewallPolicyServiceState, opts?: CustomResourceOptions): NetworkFirewallPolicyService
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
network_firewall_policy_id: Optional[str] = None,
parent_resource_id: Optional[str] = None,
port_ranges: Optional[Sequence[_networkfirewall.NetworkFirewallPolicyServicePortRangeArgs]] = None,
type: Optional[str] = None) -> NetworkFirewallPolicyService
func GetNetworkFirewallPolicyService(ctx *Context, name string, id IDInput, state *NetworkFirewallPolicyServiceState, opts ...ResourceOption) (*NetworkFirewallPolicyService, error)
public static NetworkFirewallPolicyService Get(string name, Input<string> id, NetworkFirewallPolicyServiceState? state, CustomResourceOptions? opts = null)
public static NetworkFirewallPolicyService get(String name, Output<String> id, NetworkFirewallPolicyServiceState 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.
- Name string
- Name of the service
- Network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- Parent
Resource stringId - OCID of the Network Firewall Policy this service belongs to.
- Port
Ranges List<NetworkFirewall Policy Service Port Range> - (Updatable) List of port-ranges to be used.
- Type string
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Name string
- Name of the service
- Network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- Parent
Resource stringId - OCID of the Network Firewall Policy this service belongs to.
- Port
Ranges []NetworkFirewall Policy Service Port Range Args - (Updatable) List of port-ranges to be used.
- Type string
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- Name of the service
- network
Firewall StringPolicy Id - Unique Network Firewall Policy identifier
- parent
Resource StringId - OCID of the Network Firewall Policy this service belongs to.
- port
Ranges List<PolicyService Port Range> - (Updatable) List of port-ranges to be used.
- type String
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name string
- Name of the service
- network
Firewall stringPolicy Id - Unique Network Firewall Policy identifier
- parent
Resource stringId - OCID of the Network Firewall Policy this service belongs to.
- port
Ranges NetworkFirewall Policy Service Port Range[] - (Updatable) List of port-ranges to be used.
- type string
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name str
- Name of the service
- network_
firewall_ strpolicy_ id - Unique Network Firewall Policy identifier
- parent_
resource_ strid - OCID of the Network Firewall Policy this service belongs to.
- port_
ranges Sequence[networkfirewall.Network Firewall Policy Service Port Range Args] - (Updatable) List of port-ranges to be used.
- type str
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- Name of the service
- network
Firewall StringPolicy Id - Unique Network Firewall Policy identifier
- parent
Resource StringId - OCID of the Network Firewall Policy this service belongs to.
- port
Ranges List<Property Map> - (Updatable) List of port-ranges to be used.
- type String
Describes the type of Service. The accepted values are
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Supporting Types
NetworkFirewallPolicyServicePortRange, NetworkFirewallPolicyServicePortRangeArgs
- Minimum
Port int - (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
- Maximum
Port int - (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
- Minimum
Port int - (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
- Maximum
Port int - (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
- minimum
Port Integer - (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
- maximum
Port Integer - (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
- minimum
Port number - (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
- maximum
Port number - (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
- minimum_
port int - (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
- maximum_
port int - (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
- minimum
Port Number - (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
- maximum
Port Number - (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
Import
NetworkFirewallPolicyServices can be imported using the name
, e.g.
$ pulumi import oci:NetworkFirewall/networkFirewallPolicyService:NetworkFirewallPolicyService test_network_firewall_policy_service "networkFirewallPolicies/{networkFirewallPolicyId}/services/{serviceName}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.