openstack.network.v2.security_group_rule¶
SecurityGroupRule 类¶
SecurityGroupRule 类继承自 Resource。
- class openstack.network.v2.security_group_rule.SecurityGroupRule(_synchronized=False, connection=None, **attrs)¶
基础资源
- 参数:
_synchronized (bool) – 这不打算直接使用。请参阅
new()和existing()。connection (openstack.connection.Connection) – 对正在使用的 Connection 的引用。默认为 None,允许在单元测试中等情况下使用不带活动 Connection 的 Resource 对象。Resource 代码中对
self._connection的使用应使用 None 检查进行保护。
- resource_key = 'security_group_rule'¶
资源的单数形式的键。
- resources_key = 'security_group_rules'¶
资源的复数形式的键。
- base_path = '/security-group-rules'¶
此资源的 URI 的基本部分。
- allow_create = True¶
允许对此资源进行创建操作。
- allow_fetch = True¶
允许对此资源进行获取操作。
- allow_commit = False¶
允许对此资源进行更新操作。
- allow_delete = True¶
允许对此资源进行删除操作。
- allow_list = True¶
允许对此资源进行列表操作。
- created_at¶
创建安全组规则的时间戳。
- description¶
安全组规则的描述。
- direction¶
ingress或egress:安全组规则应用的的方向。对于计算实例,入站安全组规则应用于该实例的传入流量。出站规则应用于离开实例的流量。
- ether_type¶
必须为 IPv4 或 IPv6,并且以 CIDR 表示的地址必须与入站或出站规则匹配。
- port_range_max¶
安全组规则匹配的端口范围中的最大端口号。port_range_min 属性限制了 port_range_max 属性。如果协议是 ICMP,则此值必须是 ICMP 类型。
- port_range_min¶
安全组规则匹配的端口范围中的最小端口号。如果协议是 TCP 或 UDP,则此值必须小于或等于 port_range_max 属性的值。如果协议是 ICMP,则此值必须是 ICMP 类型。
- project_id¶
此安全组规则关联的项目 ID。
- protocol¶
安全组规则匹配的协议。有效值为
null、tcp、udp和icmp。
- remote_group_id¶
要与此安全组规则关联的远程安全组 ID。您可以指定
remote_group_id或remote_address_group_id或remote_ip_prefix。
- remote_address_group_id¶
要与此安全组规则关联的远程地址组 ID。您可以指定
remote_group_id或remote_address_group_id或remote_ip_prefix。
- remote_ip_prefix¶
要与此安全组规则关联的远程 IP 前缀。您可以指定
remote_group_id或remote_address_group_id或remote_ip_prefix。此属性根据方向将指定的 IP 前缀匹配为 IP 数据包的源或目标 IP 地址。
- security_group_id¶
要与此安全组规则关联的安全组 ID。
- tenant_id¶
此安全组规则关联的项目 ID。
- updated_at¶
上次更新安全组规则的时间戳。