computing / Client / authorize_security_group_ingress
authorize_security_group_ingress
- computing.Client.authorize_security_group_ingress(**kwargs)
指定したファイアウォールグループへ許可ルールを追加します。
ファイアウォールグループを指定するためには、ファイアウォールグループ名が必要です。
許可ルールの許可プロトコルがTCPかUDPの場合、許可ポートの指定が必要です。ポートを単一指定する際は、許可開始ポートのみを指定します。ポートを範囲指定する際は、許可終了ポートには許可開始ポートの値以上を指定します。
許可ルールの追加には、時間がかかることがあります。API「DescribeSecurityGroups」のレスポンス値「groupStatus」でファイアウォールグループのステータスを確認できます。
また、ファイアウォールグループのステータスが「適用済み」の場合、追加した許可ルールが正しくファイアウォールグループに反映されているかの確認が必要です。
同じくAPI「DescribeSecurityGroups」のレスポンス値「ipPermissions」または「groups」で確認できます。
See also: NIFCLOUD API Documentation
Request Syntax
response = client.authorize_security_group_ingress( GroupName='string', IpPermissions=[ { 'Description': 'string', 'FromPort': 123, 'InOut': 'IN'|'OUT', 'IpProtocol': 'ANY'|'TCP'|'UDP'|'ICMP'|'SSH'|'HTTP'|'HTTPS'|'RDP'|'GRE'|'ESP'|'AH'|'VRRP'|'L2TP'|'ICMPv6-all', 'ListOfRequestGroups': [ { 'GroupName': 'string', 'UserId': 'string' }, ], 'ListOfRequestIpRanges': [ { 'CidrIp': 'string' }, ], 'ToPort': 123 }, ], UserId='string' )
- Parameters:
GroupName (string) – [REQUIRED]
IpPermissions (list) –
(dict) –
Description (string) –
FromPort (integer) –
InOut (string) –
IpProtocol (string) –
ListOfRequestGroups (list) –
(dict) –
GroupName (string) –
UserId (string) –
ListOfRequestIpRanges (list) –
(dict) –
CidrIp (string) –
ToPort (integer) –
UserId (string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'RequestId': 'string', 'Return': True|False }
Response Structure
(dict) –
RequestId (string) –
Return (boolean) –