computing / Client / nifty_create_nat_rule

nifty_create_nat_rule

computing.Client.nifty_create_nat_rule(**kwargs)

NATテーブルに適用するNATルール情報を作成する。

NATテーブルを指定するためには、NATテーブルIDが必要です。

See also: NIFCLOUD API Documentation

Request Syntax

response = client.nifty_create_nat_rule(
    Description='string',
    Destination={
        'Port': 123
    },
    InboundInterface={
        'NetworkId': 'string',
        'NetworkName': 'string'
    },
    NatTableId='string',
    NatType='snat'|'dnat',
    OutboundInterface={
        'NetworkId': 'string',
        'NetworkName': 'string'
    },
    Protocol='ALL'|'TCP'|'UDP'|'TCP_UDP'|'ICMP',
    RuleNumber='string',
    Source={
        'Address': 'string',
        'Port': 123
    },
    Translation={
        'Address': 'string',
        'Port': 123
    }
)
Parameters:
  • Description (string) –

  • Destination (dict) –

    • Port (integer) –

  • InboundInterface (dict) –

    • NetworkId (string) –

    • NetworkName (string) –

  • NatTableId (string) – [REQUIRED]

  • NatType (string) – [REQUIRED]

  • OutboundInterface (dict) –

    • NetworkId (string) –

    • NetworkName (string) –

  • Protocol (string) – [REQUIRED]

  • RuleNumber (string) – [REQUIRED]

  • Source (dict) –

    • Address (string) –

    • Port (integer) –

  • Translation (dict) –

    • Address (string) –

    • Port (integer) –

Return type:

dict

Returns:

Response Syntax

{
    'NatRule': {
        'Description': 'string',
        'Destination': {
            'Port': 123
        },
        'InboundInterface': {
            'NetworkId': 'string',
            'NetworkName': 'string'
        },
        'NatType': 'string',
        'OutboundInterface': {
            'NetworkId': 'string',
            'NetworkName': 'string'
        },
        'Protocol': 'string',
        'RuleNumber': 'string',
        'Source': {
            'Address': 'string',
            'Port': 123
        },
        'Translation': {
            'Address': 'string',
            'Port': 123
        }
    },
    'NatTableId': 'string',
    'RequestId': 'string'
}

Response Structure

  • (dict) –

    • NatRule (dict) –

      • Description (string) –

      • Destination (dict) –

        • Port (integer) –

      • InboundInterface (dict) –

        • NetworkId (string) –

        • NetworkName (string) –

      • NatType (string) –

      • OutboundInterface (dict) –

        • NetworkId (string) –

        • NetworkName (string) –

      • Protocol (string) –

      • RuleNumber (string) –

      • Source (dict) –

        • Address (string) –

        • Port (integer) –

      • Translation (dict) –

        • Address (string) –

        • Port (integer) –

    • NatTableId (string) –

    • RequestId (string) –