1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getNetworkSecurityGroupSecurityRules
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Core.getNetworkSecurityGroupSecurityRules

Explore with Pulumi AI

This data source provides the list of Network Security Group Security Rules in Oracle Cloud Infrastructure Core service.

Lists the security rules in the specified network security group.

Example Usage

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

const testNetworkSecurityGroupSecurityRules = oci.Core.getNetworkSecurityGroupSecurityRules({
    networkSecurityGroupId: testNetworkSecurityGroup.id,
    direction: networkSecurityGroupSecurityRuleDirection,
});
Copy
import pulumi
import pulumi_oci as oci

test_network_security_group_security_rules = oci.Core.get_network_security_group_security_rules(network_security_group_id=test_network_security_group["id"],
    direction=network_security_group_security_rule_direction)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetNetworkSecurityGroupSecurityRules(ctx, &core.GetNetworkSecurityGroupSecurityRulesArgs{
			NetworkSecurityGroupId: testNetworkSecurityGroup.Id,
			Direction:              pulumi.StringRef(networkSecurityGroupSecurityRuleDirection),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testNetworkSecurityGroupSecurityRules = Oci.Core.GetNetworkSecurityGroupSecurityRules.Invoke(new()
    {
        NetworkSecurityGroupId = testNetworkSecurityGroup.Id,
        Direction = networkSecurityGroupSecurityRuleDirection,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetNetworkSecurityGroupSecurityRulesArgs;
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) {
        final var testNetworkSecurityGroupSecurityRules = CoreFunctions.getNetworkSecurityGroupSecurityRules(GetNetworkSecurityGroupSecurityRulesArgs.builder()
            .networkSecurityGroupId(testNetworkSecurityGroup.id())
            .direction(networkSecurityGroupSecurityRuleDirection)
            .build());

    }
}
Copy
variables:
  testNetworkSecurityGroupSecurityRules:
    fn::invoke:
      function: oci:Core:getNetworkSecurityGroupSecurityRules
      arguments:
        networkSecurityGroupId: ${testNetworkSecurityGroup.id}
        direction: ${networkSecurityGroupSecurityRuleDirection}
Copy

Using getNetworkSecurityGroupSecurityRules

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetworkSecurityGroupSecurityRules(args: GetNetworkSecurityGroupSecurityRulesArgs, opts?: InvokeOptions): Promise<GetNetworkSecurityGroupSecurityRulesResult>
function getNetworkSecurityGroupSecurityRulesOutput(args: GetNetworkSecurityGroupSecurityRulesOutputArgs, opts?: InvokeOptions): Output<GetNetworkSecurityGroupSecurityRulesResult>
Copy
def get_network_security_group_security_rules(direction: Optional[str] = None,
                                              filters: Optional[Sequence[_core.GetNetworkSecurityGroupSecurityRulesFilter]] = None,
                                              network_security_group_id: Optional[str] = None,
                                              opts: Optional[InvokeOptions] = None) -> GetNetworkSecurityGroupSecurityRulesResult
def get_network_security_group_security_rules_output(direction: Optional[pulumi.Input[str]] = None,
                                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetNetworkSecurityGroupSecurityRulesFilterArgs]]]] = None,
                                              network_security_group_id: Optional[pulumi.Input[str]] = None,
                                              opts: Optional[InvokeOptions] = None) -> Output[GetNetworkSecurityGroupSecurityRulesResult]
Copy
func GetNetworkSecurityGroupSecurityRules(ctx *Context, args *GetNetworkSecurityGroupSecurityRulesArgs, opts ...InvokeOption) (*GetNetworkSecurityGroupSecurityRulesResult, error)
func GetNetworkSecurityGroupSecurityRulesOutput(ctx *Context, args *GetNetworkSecurityGroupSecurityRulesOutputArgs, opts ...InvokeOption) GetNetworkSecurityGroupSecurityRulesResultOutput
Copy

> Note: This function is named GetNetworkSecurityGroupSecurityRules in the Go SDK.

public static class GetNetworkSecurityGroupSecurityRules 
{
    public static Task<GetNetworkSecurityGroupSecurityRulesResult> InvokeAsync(GetNetworkSecurityGroupSecurityRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkSecurityGroupSecurityRulesResult> Invoke(GetNetworkSecurityGroupSecurityRulesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNetworkSecurityGroupSecurityRulesResult> getNetworkSecurityGroupSecurityRules(GetNetworkSecurityGroupSecurityRulesArgs args, InvokeOptions options)
public static Output<GetNetworkSecurityGroupSecurityRulesResult> getNetworkSecurityGroupSecurityRules(GetNetworkSecurityGroupSecurityRulesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Core/getNetworkSecurityGroupSecurityRules:getNetworkSecurityGroupSecurityRules
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

NetworkSecurityGroupId This property is required. string
The OCID of the network security group.
Direction string
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
Filters Changes to this property will trigger replacement. List<GetNetworkSecurityGroupSecurityRulesFilter>
NetworkSecurityGroupId This property is required. string
The OCID of the network security group.
Direction string
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
Filters Changes to this property will trigger replacement. []GetNetworkSecurityGroupSecurityRulesFilter
networkSecurityGroupId This property is required. String
The OCID of the network security group.
direction String
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
filters Changes to this property will trigger replacement. List<GetNetworkSecurityGroupSecurityRulesFilter>
networkSecurityGroupId This property is required. string
The OCID of the network security group.
direction string
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
filters Changes to this property will trigger replacement. GetNetworkSecurityGroupSecurityRulesFilter[]
network_security_group_id This property is required. str
The OCID of the network security group.
direction str
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
filters Changes to this property will trigger replacement. Sequence[core.GetNetworkSecurityGroupSecurityRulesFilter]
networkSecurityGroupId This property is required. String
The OCID of the network security group.
direction String
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
filters Changes to this property will trigger replacement. List<Property Map>

getNetworkSecurityGroupSecurityRules Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
NetworkSecurityGroupId string
SecurityRules List<GetNetworkSecurityGroupSecurityRulesSecurityRule>
The list of security_rules.
Direction string
Direction of the security rule. Set to EGRESS for rules to allow outbound IP packets, or INGRESS for rules to allow inbound IP packets.
Filters List<GetNetworkSecurityGroupSecurityRulesFilter>
Id string
The provider-assigned unique ID for this managed resource.
NetworkSecurityGroupId string
SecurityRules []GetNetworkSecurityGroupSecurityRulesSecurityRule
The list of security_rules.
Direction string
Direction of the security rule. Set to EGRESS for rules to allow outbound IP packets, or INGRESS for rules to allow inbound IP packets.
Filters []GetNetworkSecurityGroupSecurityRulesFilter
id String
The provider-assigned unique ID for this managed resource.
networkSecurityGroupId String
securityRules List<GetNetworkSecurityGroupSecurityRulesSecurityRule>
The list of security_rules.
direction String
Direction of the security rule. Set to EGRESS for rules to allow outbound IP packets, or INGRESS for rules to allow inbound IP packets.
filters List<GetNetworkSecurityGroupSecurityRulesFilter>
id string
The provider-assigned unique ID for this managed resource.
networkSecurityGroupId string
securityRules GetNetworkSecurityGroupSecurityRulesSecurityRule[]
The list of security_rules.
direction string
Direction of the security rule. Set to EGRESS for rules to allow outbound IP packets, or INGRESS for rules to allow inbound IP packets.
filters GetNetworkSecurityGroupSecurityRulesFilter[]
id str
The provider-assigned unique ID for this managed resource.
network_security_group_id str
security_rules Sequence[core.GetNetworkSecurityGroupSecurityRulesSecurityRule]
The list of security_rules.
direction str
Direction of the security rule. Set to EGRESS for rules to allow outbound IP packets, or INGRESS for rules to allow inbound IP packets.
filters Sequence[core.GetNetworkSecurityGroupSecurityRulesFilter]
id String
The provider-assigned unique ID for this managed resource.
networkSecurityGroupId String
securityRules List<Property Map>
The list of security_rules.
direction String
Direction of the security rule. Set to EGRESS for rules to allow outbound IP packets, or INGRESS for rules to allow inbound IP packets.
filters List<Property Map>

Supporting Types

GetNetworkSecurityGroupSecurityRulesFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetNetworkSecurityGroupSecurityRulesSecurityRule

Description This property is required. string
An optional description of your choice for the rule.
Destination This property is required. string
Conceptually, this is the range of IP addresses that a packet originating from the instance can go to.
DestinationType This property is required. string
Type of destination for the rule. Required if direction = EGRESS.
Direction This property is required. string
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
IcmpOptions This property is required. List<GetNetworkSecurityGroupSecurityRulesSecurityRuleIcmpOption>
Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code as defined in:

Id This property is required. string
An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: 04ABEC
IsValid This property is required. bool
Whether the rule is valid. The value is True when the rule is first created. If the rule's source or destination is a network security group, the value changes to False if that network security group is deleted.
Protocol This property is required. string
The transport protocol. Specify either all or an IPv4 protocol number as defined in Protocol Numbers. Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58").
Source This property is required. string
Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.
SourceType This property is required. string
Type of source for the rule. Required if direction = INGRESS.

  • CIDR_BLOCK: If the rule's source is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule's source is the cidrBlock value for a Service (the rule is for traffic coming from a particular Service through a service gateway).
  • NETWORK_SECURITY_GROUP: If the rule's source is the OCID of a NetworkSecurityGroup.
Stateless This property is required. bool
A stateless rule allows traffic in one direction. Remember to add a corresponding stateless rule in the other direction if you need to support bidirectional traffic. For example, if egress traffic allows TCP destination port 80, there should be an ingress rule to allow TCP source port 80. Defaults to false, which means the rule is stateful and a corresponding rule is not necessary for bidirectional traffic.
TcpOptions This property is required. List<GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOption>
Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. If you specify TCP as the protocol but omit this object, then all destination ports are allowed.
TimeCreated This property is required. string
The date and time the security rule was created. Format defined by RFC3339.
UdpOptions This property is required. List<GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOption>
Optional and valid only for UDP. Use to specify particular destination ports for UDP rules. If you specify UDP as the protocol but omit this object, then all destination ports are allowed.
Description This property is required. string
An optional description of your choice for the rule.
Destination This property is required. string
Conceptually, this is the range of IP addresses that a packet originating from the instance can go to.
DestinationType This property is required. string
Type of destination for the rule. Required if direction = EGRESS.
Direction This property is required. string
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
IcmpOptions This property is required. []GetNetworkSecurityGroupSecurityRulesSecurityRuleIcmpOption
Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code as defined in:

Id This property is required. string
An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: 04ABEC
IsValid This property is required. bool
Whether the rule is valid. The value is True when the rule is first created. If the rule's source or destination is a network security group, the value changes to False if that network security group is deleted.
Protocol This property is required. string
The transport protocol. Specify either all or an IPv4 protocol number as defined in Protocol Numbers. Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58").
Source This property is required. string
Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.
SourceType This property is required. string
Type of source for the rule. Required if direction = INGRESS.

  • CIDR_BLOCK: If the rule's source is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule's source is the cidrBlock value for a Service (the rule is for traffic coming from a particular Service through a service gateway).
  • NETWORK_SECURITY_GROUP: If the rule's source is the OCID of a NetworkSecurityGroup.
Stateless This property is required. bool
A stateless rule allows traffic in one direction. Remember to add a corresponding stateless rule in the other direction if you need to support bidirectional traffic. For example, if egress traffic allows TCP destination port 80, there should be an ingress rule to allow TCP source port 80. Defaults to false, which means the rule is stateful and a corresponding rule is not necessary for bidirectional traffic.
TcpOptions This property is required. []GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOption
Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. If you specify TCP as the protocol but omit this object, then all destination ports are allowed.
TimeCreated This property is required. string
The date and time the security rule was created. Format defined by RFC3339.
UdpOptions This property is required. []GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOption
Optional and valid only for UDP. Use to specify particular destination ports for UDP rules. If you specify UDP as the protocol but omit this object, then all destination ports are allowed.
description This property is required. String
An optional description of your choice for the rule.
destination This property is required. String
Conceptually, this is the range of IP addresses that a packet originating from the instance can go to.
destinationType This property is required. String
Type of destination for the rule. Required if direction = EGRESS.
direction This property is required. String
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
icmpOptions This property is required. List<GetNetworkSecurityGroupSecurityRulesSecurityRuleIcmpOption>
Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code as defined in:

id This property is required. String
An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: 04ABEC
isValid This property is required. Boolean
Whether the rule is valid. The value is True when the rule is first created. If the rule's source or destination is a network security group, the value changes to False if that network security group is deleted.
protocol This property is required. String
The transport protocol. Specify either all or an IPv4 protocol number as defined in Protocol Numbers. Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58").
source This property is required. String
Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.
sourceType This property is required. String
Type of source for the rule. Required if direction = INGRESS.

  • CIDR_BLOCK: If the rule's source is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule's source is the cidrBlock value for a Service (the rule is for traffic coming from a particular Service through a service gateway).
  • NETWORK_SECURITY_GROUP: If the rule's source is the OCID of a NetworkSecurityGroup.
stateless This property is required. Boolean
A stateless rule allows traffic in one direction. Remember to add a corresponding stateless rule in the other direction if you need to support bidirectional traffic. For example, if egress traffic allows TCP destination port 80, there should be an ingress rule to allow TCP source port 80. Defaults to false, which means the rule is stateful and a corresponding rule is not necessary for bidirectional traffic.
tcpOptions This property is required. List<GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOption>
Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. If you specify TCP as the protocol but omit this object, then all destination ports are allowed.
timeCreated This property is required. String
The date and time the security rule was created. Format defined by RFC3339.
udpOptions This property is required. List<GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOption>
Optional and valid only for UDP. Use to specify particular destination ports for UDP rules. If you specify UDP as the protocol but omit this object, then all destination ports are allowed.
description This property is required. string
An optional description of your choice for the rule.
destination This property is required. string
Conceptually, this is the range of IP addresses that a packet originating from the instance can go to.
destinationType This property is required. string
Type of destination for the rule. Required if direction = EGRESS.
direction This property is required. string
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
icmpOptions This property is required. GetNetworkSecurityGroupSecurityRulesSecurityRuleIcmpOption[]
Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code as defined in:

id This property is required. string
An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: 04ABEC
isValid This property is required. boolean
Whether the rule is valid. The value is True when the rule is first created. If the rule's source or destination is a network security group, the value changes to False if that network security group is deleted.
protocol This property is required. string
The transport protocol. Specify either all or an IPv4 protocol number as defined in Protocol Numbers. Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58").
source This property is required. string
Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.
sourceType This property is required. string
Type of source for the rule. Required if direction = INGRESS.

  • CIDR_BLOCK: If the rule's source is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule's source is the cidrBlock value for a Service (the rule is for traffic coming from a particular Service through a service gateway).
  • NETWORK_SECURITY_GROUP: If the rule's source is the OCID of a NetworkSecurityGroup.
stateless This property is required. boolean
A stateless rule allows traffic in one direction. Remember to add a corresponding stateless rule in the other direction if you need to support bidirectional traffic. For example, if egress traffic allows TCP destination port 80, there should be an ingress rule to allow TCP source port 80. Defaults to false, which means the rule is stateful and a corresponding rule is not necessary for bidirectional traffic.
tcpOptions This property is required. GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOption[]
Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. If you specify TCP as the protocol but omit this object, then all destination ports are allowed.
timeCreated This property is required. string
The date and time the security rule was created. Format defined by RFC3339.
udpOptions This property is required. GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOption[]
Optional and valid only for UDP. Use to specify particular destination ports for UDP rules. If you specify UDP as the protocol but omit this object, then all destination ports are allowed.
description This property is required. str
An optional description of your choice for the rule.
destination This property is required. str
Conceptually, this is the range of IP addresses that a packet originating from the instance can go to.
destination_type This property is required. str
Type of destination for the rule. Required if direction = EGRESS.
direction This property is required. str
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
icmp_options This property is required. Sequence[core.GetNetworkSecurityGroupSecurityRulesSecurityRuleIcmpOption]
Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code as defined in:

id This property is required. str
An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: 04ABEC
is_valid This property is required. bool
Whether the rule is valid. The value is True when the rule is first created. If the rule's source or destination is a network security group, the value changes to False if that network security group is deleted.
protocol This property is required. str
The transport protocol. Specify either all or an IPv4 protocol number as defined in Protocol Numbers. Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58").
source This property is required. str
Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.
source_type This property is required. str
Type of source for the rule. Required if direction = INGRESS.

  • CIDR_BLOCK: If the rule's source is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule's source is the cidrBlock value for a Service (the rule is for traffic coming from a particular Service through a service gateway).
  • NETWORK_SECURITY_GROUP: If the rule's source is the OCID of a NetworkSecurityGroup.
stateless This property is required. bool
A stateless rule allows traffic in one direction. Remember to add a corresponding stateless rule in the other direction if you need to support bidirectional traffic. For example, if egress traffic allows TCP destination port 80, there should be an ingress rule to allow TCP source port 80. Defaults to false, which means the rule is stateful and a corresponding rule is not necessary for bidirectional traffic.
tcp_options This property is required. Sequence[core.GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOption]
Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. If you specify TCP as the protocol but omit this object, then all destination ports are allowed.
time_created This property is required. str
The date and time the security rule was created. Format defined by RFC3339.
udp_options This property is required. Sequence[core.GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOption]
Optional and valid only for UDP. Use to specify particular destination ports for UDP rules. If you specify UDP as the protocol but omit this object, then all destination ports are allowed.
description This property is required. String
An optional description of your choice for the rule.
destination This property is required. String
Conceptually, this is the range of IP addresses that a packet originating from the instance can go to.
destinationType This property is required. String
Type of destination for the rule. Required if direction = EGRESS.
direction This property is required. String
Direction of the security rule. Set to EGRESS for rules that allow outbound IP packets, or INGRESS for rules that allow inbound IP packets.
icmpOptions This property is required. List<Property Map>
Optional and valid only for ICMP and ICMPv6. Use to specify a particular ICMP type and code as defined in:

id This property is required. String
An Oracle-assigned identifier for the security rule. You specify this ID when you want to update or delete the rule. Example: 04ABEC
isValid This property is required. Boolean
Whether the rule is valid. The value is True when the rule is first created. If the rule's source or destination is a network security group, the value changes to False if that network security group is deleted.
protocol This property is required. String
The transport protocol. Specify either all or an IPv4 protocol number as defined in Protocol Numbers. Options are supported only for ICMP ("1"), TCP ("6"), UDP ("17"), and ICMPv6 ("58").
source This property is required. String
Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.
sourceType This property is required. String
Type of source for the rule. Required if direction = INGRESS.

  • CIDR_BLOCK: If the rule's source is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule's source is the cidrBlock value for a Service (the rule is for traffic coming from a particular Service through a service gateway).
  • NETWORK_SECURITY_GROUP: If the rule's source is the OCID of a NetworkSecurityGroup.
stateless This property is required. Boolean
A stateless rule allows traffic in one direction. Remember to add a corresponding stateless rule in the other direction if you need to support bidirectional traffic. For example, if egress traffic allows TCP destination port 80, there should be an ingress rule to allow TCP source port 80. Defaults to false, which means the rule is stateful and a corresponding rule is not necessary for bidirectional traffic.
tcpOptions This property is required. List<Property Map>
Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. If you specify TCP as the protocol but omit this object, then all destination ports are allowed.
timeCreated This property is required. String
The date and time the security rule was created. Format defined by RFC3339.
udpOptions This property is required. List<Property Map>
Optional and valid only for UDP. Use to specify particular destination ports for UDP rules. If you specify UDP as the protocol but omit this object, then all destination ports are allowed.

GetNetworkSecurityGroupSecurityRulesSecurityRuleIcmpOption

Code This property is required. int
The ICMP code (optional).
Type This property is required. int
The ICMP type.
Code This property is required. int
The ICMP code (optional).
Type This property is required. int
The ICMP type.
code This property is required. Integer
The ICMP code (optional).
type This property is required. Integer
The ICMP type.
code This property is required. number
The ICMP code (optional).
type This property is required. number
The ICMP type.
code This property is required. int
The ICMP code (optional).
type This property is required. int
The ICMP type.
code This property is required. Number
The ICMP code (optional).
type This property is required. Number
The ICMP type.

GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOption

destinationPortRanges This property is required. List<Property Map>
sourcePortRanges This property is required. List<Property Map>

GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOptionDestinationPortRange

Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Integer
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Integer
The minimum port number. Must not be greater than the maximum port number.
max This property is required. number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. number
The minimum port number. Must not be greater than the maximum port number.
max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Number
The minimum port number. Must not be greater than the maximum port number.

GetNetworkSecurityGroupSecurityRulesSecurityRuleTcpOptionSourcePortRange

Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Integer
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Integer
The minimum port number. Must not be greater than the maximum port number.
max This property is required. number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. number
The minimum port number. Must not be greater than the maximum port number.
max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Number
The minimum port number. Must not be greater than the maximum port number.

GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOption

destinationPortRanges This property is required. List<Property Map>
sourcePortRanges This property is required. List<Property Map>

GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOptionDestinationPortRange

Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Integer
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Integer
The minimum port number. Must not be greater than the maximum port number.
max This property is required. number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. number
The minimum port number. Must not be greater than the maximum port number.
max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Number
The minimum port number. Must not be greater than the maximum port number.

GetNetworkSecurityGroupSecurityRulesSecurityRuleUdpOptionSourcePortRange

Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
Max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
Min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Integer
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Integer
The minimum port number. Must not be greater than the maximum port number.
max This property is required. number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. number
The minimum port number. Must not be greater than the maximum port number.
max This property is required. int
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. int
The minimum port number. Must not be greater than the maximum port number.
max This property is required. Number
The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value.
min This property is required. Number
The minimum port number. Must not be greater than the maximum port number.

Package Details

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