UpdateSecurityRuleDetails

class oci.core.models.UpdateSecurityRuleDetails(**kwargs)

Bases: object

A rule for allowing inbound (`direction`= INGRESS) or outbound (`direction`= EGRESS) IP packets.

Attributes

DESTINATION_TYPE_CIDR_BLOCK A constant which can be used with the destination_type property of a UpdateSecurityRuleDetails.
DESTINATION_TYPE_NETWORK_SECURITY_GROUP A constant which can be used with the destination_type property of a UpdateSecurityRuleDetails.
DESTINATION_TYPE_SERVICE_CIDR_BLOCK A constant which can be used with the destination_type property of a UpdateSecurityRuleDetails.
DIRECTION_EGRESS A constant which can be used with the direction property of a UpdateSecurityRuleDetails.
DIRECTION_INGRESS A constant which can be used with the direction property of a UpdateSecurityRuleDetails.
SOURCE_TYPE_CIDR_BLOCK A constant which can be used with the source_type property of a UpdateSecurityRuleDetails.
SOURCE_TYPE_NETWORK_SECURITY_GROUP A constant which can be used with the source_type property of a UpdateSecurityRuleDetails.
SOURCE_TYPE_SERVICE_CIDR_BLOCK A constant which can be used with the source_type property of a UpdateSecurityRuleDetails.
description Gets the description of this UpdateSecurityRuleDetails.
destination Gets the destination of this UpdateSecurityRuleDetails.
destination_type Gets the destination_type of this UpdateSecurityRuleDetails.
direction [Required] Gets the direction of this UpdateSecurityRuleDetails.
icmp_options Gets the icmp_options of this UpdateSecurityRuleDetails.
id [Required] Gets the id of this UpdateSecurityRuleDetails.
is_stateless Gets the is_stateless of this UpdateSecurityRuleDetails.
protocol [Required] Gets the protocol of this UpdateSecurityRuleDetails.
source Gets the source of this UpdateSecurityRuleDetails.
source_type Gets the source_type of this UpdateSecurityRuleDetails.
tcp_options Gets the tcp_options of this UpdateSecurityRuleDetails.
udp_options Gets the udp_options of this UpdateSecurityRuleDetails.

Methods

__init__(**kwargs) Initializes a new UpdateSecurityRuleDetails object with values from keyword arguments.
DESTINATION_TYPE_CIDR_BLOCK = 'CIDR_BLOCK'

A constant which can be used with the destination_type property of a UpdateSecurityRuleDetails. This constant has a value of “CIDR_BLOCK”

DESTINATION_TYPE_NETWORK_SECURITY_GROUP = 'NETWORK_SECURITY_GROUP'

A constant which can be used with the destination_type property of a UpdateSecurityRuleDetails. This constant has a value of “NETWORK_SECURITY_GROUP”

DESTINATION_TYPE_SERVICE_CIDR_BLOCK = 'SERVICE_CIDR_BLOCK'

A constant which can be used with the destination_type property of a UpdateSecurityRuleDetails. This constant has a value of “SERVICE_CIDR_BLOCK”

DIRECTION_EGRESS = 'EGRESS'

A constant which can be used with the direction property of a UpdateSecurityRuleDetails. This constant has a value of “EGRESS”

DIRECTION_INGRESS = 'INGRESS'

A constant which can be used with the direction property of a UpdateSecurityRuleDetails. This constant has a value of “INGRESS”

SOURCE_TYPE_CIDR_BLOCK = 'CIDR_BLOCK'

A constant which can be used with the source_type property of a UpdateSecurityRuleDetails. This constant has a value of “CIDR_BLOCK”

SOURCE_TYPE_NETWORK_SECURITY_GROUP = 'NETWORK_SECURITY_GROUP'

A constant which can be used with the source_type property of a UpdateSecurityRuleDetails. This constant has a value of “NETWORK_SECURITY_GROUP”

SOURCE_TYPE_SERVICE_CIDR_BLOCK = 'SERVICE_CIDR_BLOCK'

A constant which can be used with the source_type property of a UpdateSecurityRuleDetails. This constant has a value of “SERVICE_CIDR_BLOCK”

__init__(**kwargs)

Initializes a new UpdateSecurityRuleDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • description (str) – The value to assign to the description property of this UpdateSecurityRuleDetails.
  • destination (str) – The value to assign to the destination property of this UpdateSecurityRuleDetails.
  • destination_type (str) – The value to assign to the destination_type property of this UpdateSecurityRuleDetails. Allowed values for this property are: “CIDR_BLOCK”, “SERVICE_CIDR_BLOCK”, “NETWORK_SECURITY_GROUP”
  • direction (str) – The value to assign to the direction property of this UpdateSecurityRuleDetails. Allowed values for this property are: “EGRESS”, “INGRESS”
  • icmp_options (oci.core.models.IcmpOptions) – The value to assign to the icmp_options property of this UpdateSecurityRuleDetails.
  • id (str) – The value to assign to the id property of this UpdateSecurityRuleDetails.
  • is_stateless (bool) – The value to assign to the is_stateless property of this UpdateSecurityRuleDetails.
  • protocol (str) – The value to assign to the protocol property of this UpdateSecurityRuleDetails.
  • source (str) – The value to assign to the source property of this UpdateSecurityRuleDetails.
  • source_type (str) – The value to assign to the source_type property of this UpdateSecurityRuleDetails. Allowed values for this property are: “CIDR_BLOCK”, “SERVICE_CIDR_BLOCK”, “NETWORK_SECURITY_GROUP”
  • tcp_options (oci.core.models.TcpOptions) – The value to assign to the tcp_options property of this UpdateSecurityRuleDetails.
  • udp_options (oci.core.models.UdpOptions) – The value to assign to the udp_options property of this UpdateSecurityRuleDetails.
description

Gets the description of this UpdateSecurityRuleDetails. An optional description of your choice for the rule. Avoid entering confidential information.

Returns:The description of this UpdateSecurityRuleDetails.
Return type:str
destination

Gets the destination of this UpdateSecurityRuleDetails. Conceptually, this is the range of IP addresses that a packet originating from the instance can go to.

Allowed values:

  • An IP address range in CIDR notation. For example: 192.168.1.0/24 or 2001:0db8:0123:45::/56 IPv6 addressing is supported for all commercial and government regions. See IPv6 Addresses.
  • The cidrBlock value for a Service, if you’re setting up a security rule for traffic destined for a particular Service through a service gateway. For example: oci-phx-objectstorage.
  • The OCID of a NetworkSecurityGroup in the same VCN. The value can be the NSG that the rule belongs to if the rule’s intent is to control traffic between VNICs in the same NSG.
Returns:The destination of this UpdateSecurityRuleDetails.
Return type:str
destination_type

Gets the destination_type of this UpdateSecurityRuleDetails. Type of destination for the rule. Required if direction = EGRESS.

Allowed values:

  • CIDR_BLOCK: If the rule’s destination is an IP address range in CIDR notation.
  • SERVICE_CIDR_BLOCK: If the rule’s destination is the cidrBlock value for a Service (the rule is for traffic destined for a particular Service through a service gateway).
  • NETWORK_SECURITY_GROUP: If the rule’s destination is the OCID of a NetworkSecurityGroup.

Allowed values for this property are: “CIDR_BLOCK”, “SERVICE_CIDR_BLOCK”, “NETWORK_SECURITY_GROUP”

Returns:The destination_type of this UpdateSecurityRuleDetails.
Return type:str
direction

[Required] Gets the direction of this UpdateSecurityRuleDetails. Direction of the security rule. Set to EGRESS for rules to allow outbound IP packets, or INGRESS for rules to allow inbound IP packets.

Allowed values for this property are: “EGRESS”, “INGRESS”

Returns:The direction of this UpdateSecurityRuleDetails.
Return type:str
icmp_options

Gets the icmp_options of this UpdateSecurityRuleDetails.

Returns:The icmp_options of this UpdateSecurityRuleDetails.
Return type:oci.core.models.IcmpOptions
id

[Required] Gets the id of this UpdateSecurityRuleDetails. The Oracle-assigned ID of the security rule that you want to update. You can’t change this value.

Example: 04ABEC

Returns:The id of this UpdateSecurityRuleDetails.
Return type:str
is_stateless

Gets the is_stateless of this UpdateSecurityRuleDetails. 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.

Returns:The is_stateless of this UpdateSecurityRuleDetails.
Return type:bool
protocol

[Required] Gets the protocol of this UpdateSecurityRuleDetails. 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”).

Returns:The protocol of this UpdateSecurityRuleDetails.
Return type:str
source

Gets the source of this UpdateSecurityRuleDetails. Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.

Allowed values:

  • An IP address range in CIDR notation. For example: 192.168.1.0/24 or 2001:0db8:0123:45::/56 IPv6 addressing is supported for all commercial and government regions. See IPv6 Addresses.
  • The cidrBlock value for a Service, if you’re setting up a security rule for traffic coming from a particular Service through a service gateway. For example: oci-phx-objectstorage.
  • The OCID of a NetworkSecurityGroup in the same VCN. The value can be the NSG that the rule belongs to if the rule’s intent is to control traffic between VNICs in the same NSG.
Returns:The source of this UpdateSecurityRuleDetails.
Return type:str
source_type

Gets the source_type of this UpdateSecurityRuleDetails. 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.

Allowed values for this property are: “CIDR_BLOCK”, “SERVICE_CIDR_BLOCK”, “NETWORK_SECURITY_GROUP”

Returns:The source_type of this UpdateSecurityRuleDetails.
Return type:str
tcp_options

Gets the tcp_options of this UpdateSecurityRuleDetails.

Returns:The tcp_options of this UpdateSecurityRuleDetails.
Return type:oci.core.models.TcpOptions
udp_options

Gets the udp_options of this UpdateSecurityRuleDetails.

Returns:The udp_options of this UpdateSecurityRuleDetails.
Return type:oci.core.models.UdpOptions