1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. NetworkFirewall
  5. NetworkFirewallPolicyService
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.NetworkFirewall.NetworkFirewallPolicyService

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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:

    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    PortRanges List<NetworkFirewallPolicyServicePortRange>
    (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
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    PortRanges []NetworkFirewallPolicyServicePortRangeArgs
    (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
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    portRanges List<PolicyServicePortRange>
    (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
    networkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    portRanges NetworkFirewallPolicyServicePortRange[]
    (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_policy_id str
    Unique Network Firewall Policy identifier
    port_ranges Sequence[networkfirewall.NetworkFirewallPolicyServicePortRangeArgs]
    (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
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    portRanges 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.
    ParentResourceId string
    OCID of the Network Firewall Policy this service belongs to.
    Id string
    The provider-assigned unique ID for this managed resource.
    ParentResourceId string
    OCID of the Network Firewall Policy this service belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    parentResourceId String
    OCID of the Network Firewall Policy this service belongs to.
    id string
    The provider-assigned unique ID for this managed resource.
    parentResourceId string
    OCID of the Network Firewall Policy this service belongs to.
    id str
    The provider-assigned unique ID for this managed resource.
    parent_resource_id str
    OCID of the Network Firewall Policy this service belongs to.
    id String
    The provider-assigned unique ID for this managed resource.
    parentResourceId String
    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.
    The following state arguments are supported:
    Name string
    Name of the service
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    ParentResourceId string
    OCID of the Network Firewall Policy this service belongs to.
    PortRanges List<NetworkFirewallPolicyServicePortRange>
    (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
    NetworkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    ParentResourceId string
    OCID of the Network Firewall Policy this service belongs to.
    PortRanges []NetworkFirewallPolicyServicePortRangeArgs
    (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
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    parentResourceId String
    OCID of the Network Firewall Policy this service belongs to.
    portRanges List<PolicyServicePortRange>
    (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
    networkFirewallPolicyId string
    Unique Network Firewall Policy identifier
    parentResourceId string
    OCID of the Network Firewall Policy this service belongs to.
    portRanges NetworkFirewallPolicyServicePortRange[]
    (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_policy_id str
    Unique Network Firewall Policy identifier
    parent_resource_id str
    OCID of the Network Firewall Policy this service belongs to.
    port_ranges Sequence[networkfirewall.NetworkFirewallPolicyServicePortRangeArgs]
    (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
    networkFirewallPolicyId String
    Unique Network Firewall Policy identifier
    parentResourceId String
    OCID of the Network Firewall Policy this service belongs to.
    portRanges 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

    MinimumPort int
    (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
    MaximumPort int
    (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
    MinimumPort int
    (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
    MaximumPort int
    (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
    minimumPort Integer
    (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
    maximumPort Integer
    (Updatable) The maximum port in the range (inclusive), which may be absent for a single-port range.
    minimumPort number
    (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
    maximumPort 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.
    minimumPort Number
    (Updatable) The minimum port in the range (inclusive), or the sole port of a single-port range.
    maximumPort 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.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi