AddSecurityRuleDetails¶
- class oci.vn_monitoring.models.AddSecurityRuleDetails(**kwargs)¶
Bases:
objectA rule for allowing inbound (INGRESS) or outbound (EGRESS) IP packets.
Attributes:
A constant which can be used with the destination_type property of a AddSecurityRuleDetails.
A constant which can be used with the destination_type property of a AddSecurityRuleDetails.
A constant which can be used with the destination_type property of a AddSecurityRuleDetails.
A constant which can be used with the direction property of a AddSecurityRuleDetails.
A constant which can be used with the direction property of a AddSecurityRuleDetails.
A constant which can be used with the source_type property of a AddSecurityRuleDetails.
A constant which can be used with the source_type property of a AddSecurityRuleDetails.
A constant which can be used with the source_type property of a AddSecurityRuleDetails.
Gets the description of this AddSecurityRuleDetails.
Gets the destination of this AddSecurityRuleDetails.
Gets the destination_type of this AddSecurityRuleDetails.
[Required] Gets the direction of this AddSecurityRuleDetails.
Gets the icmp_options of this AddSecurityRuleDetails.
Gets the is_stateless of this AddSecurityRuleDetails.
[Required] Gets the protocol of this AddSecurityRuleDetails.
Gets the source of this AddSecurityRuleDetails.
Gets the source_type of this AddSecurityRuleDetails.
Gets the tcp_options of this AddSecurityRuleDetails.
Gets the udp_options of this AddSecurityRuleDetails.
Methods:
__init__(**kwargs)Initializes a new AddSecurityRuleDetails 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 AddSecurityRuleDetails. 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 AddSecurityRuleDetails. 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 AddSecurityRuleDetails. This constant has a value of “SERVICE_CIDR_BLOCK”
- DIRECTION_EGRESS = 'EGRESS'¶
A constant which can be used with the direction property of a AddSecurityRuleDetails. This constant has a value of “EGRESS”
- DIRECTION_INGRESS = 'INGRESS'¶
A constant which can be used with the direction property of a AddSecurityRuleDetails. 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 AddSecurityRuleDetails. 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 AddSecurityRuleDetails. 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 AddSecurityRuleDetails. This constant has a value of “SERVICE_CIDR_BLOCK”
- __init__(**kwargs)¶
Initializes a new AddSecurityRuleDetails 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 AddSecurityRuleDetails.
destination (str) – The value to assign to the destination property of this AddSecurityRuleDetails.
destination_type (str) – The value to assign to the destination_type property of this AddSecurityRuleDetails. 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 AddSecurityRuleDetails. Allowed values for this property are: “EGRESS”, “INGRESS”
icmp_options (oci.vn_monitoring.models.IcmpOptions) – The value to assign to the icmp_options property of this AddSecurityRuleDetails.
is_stateless (bool) – The value to assign to the is_stateless property of this AddSecurityRuleDetails.
protocol (str) – The value to assign to the protocol property of this AddSecurityRuleDetails.
source (str) – The value to assign to the source property of this AddSecurityRuleDetails.
source_type (str) – The value to assign to the source_type property of this AddSecurityRuleDetails. Allowed values for this property are: “CIDR_BLOCK”, “SERVICE_CIDR_BLOCK”, “NETWORK_SECURITY_GROUP”
tcp_options (oci.vn_monitoring.models.TcpOptions) – The value to assign to the tcp_options property of this AddSecurityRuleDetails.
udp_options (oci.vn_monitoring.models.UdpOptions) – The value to assign to the udp_options property of this AddSecurityRuleDetails.
- property description¶
Gets the description of this AddSecurityRuleDetails. An optional description of your choice for the rule. Avoid entering confidential information.
- Returns
The description of this AddSecurityRuleDetails.
- Return type
str
- property destination¶
Gets the destination of this AddSecurityRuleDetails. 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
NetworkSecurityGroupin 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 AddSecurityRuleDetails.
- Return type
str
- property destination_type¶
Gets the destination_type of this AddSecurityRuleDetails. 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 AddSecurityRuleDetails.
- Return type
str
- property direction¶
[Required] Gets the direction of this AddSecurityRuleDetails. 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 AddSecurityRuleDetails.
- Return type
str
- property icmp_options¶
Gets the icmp_options of this AddSecurityRuleDetails.
- Returns
The icmp_options of this AddSecurityRuleDetails.
- Return type
- property is_stateless¶
Gets the is_stateless of this AddSecurityRuleDetails. 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 AddSecurityRuleDetails.
- Return type
bool
- property protocol¶
[Required] Gets the protocol of this AddSecurityRuleDetails. 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 AddSecurityRuleDetails.
- Return type
str
- property source¶
Gets the source of this AddSecurityRuleDetails. 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
NetworkSecurityGroupin 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 AddSecurityRuleDetails.
- Return type
str
- property source_type¶
Gets the source_type of this AddSecurityRuleDetails. 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 AddSecurityRuleDetails.
- Return type
str
- property tcp_options¶
Gets the tcp_options of this AddSecurityRuleDetails.
- Returns
The tcp_options of this AddSecurityRuleDetails.
- Return type
- property udp_options¶
Gets the udp_options of this AddSecurityRuleDetails.
- Returns
The udp_options of this AddSecurityRuleDetails.
- Return type