computing / Client / create_vpn_connection

create_vpn_connection

computing.Client.create_vpn_connection(**kwargs)

VPNコネクションを新規作成します。

拠点間VPN設定(拠点間VPNゲートウェイとカスタマーゲートウェイ間)を行います。

トンネルモードを「Managed」に指定した場合、以下の項目は指定ができません。

  • NiftyTunnel.TunnelId、NiftyTunnel.PeerTunnelId、NiftyTunnel.SessionId、NiftyTunnel.PeerSessionId、NiftyTunnel.SourcePort、NiftyTunnel.DestinationPort

またトンネルモードが「Unmanaged」でかつカプセル化が「IP」の場合は、以下の項目は指定ができません。

  • NiftyTunnel.SourcePort、NiftyTunnel.DestinationPort

またトンネルタイプが設定されていない場合は、MTUサイズは指定ができません。

指定した拠点間VPNゲートウェイがバックアップを保持している場合は、パラメーター「Agreement」に「true」を設定し、バックアップを解除する必要があります。バックアップを保持しているかどうかはAPI「DescribeVpnGateways」のレスポンス値「isBackup」で確認できます。

See also: NIFCLOUD API Documentation

Request Syntax

response = client.create_vpn_connection(
    Agreement=True|False,
    CustomerGatewayId='string',
    NiftyCustomerGatewayName='string',
    NiftyIpsecConfiguration={
        'DiffieHellmanGroup': 123,
        'EncapsulatingSecurityPayloadLifetime': 123,
        'EncryptionAlgorithm': 'AES128'|'AES256'|'3DES',
        'HashAlgorithm': 'SHA1'|'MD5'|'SHA256'|'SHA384'|'SHA512',
        'InternetKeyExchange': 'IKEv1'|'IKEv2',
        'InternetKeyExchangeLifetime': 123,
        'PreSharedKey': 'string'
    },
    NiftyTunnel={
        'DestinationPort': 'string',
        'Encapsulation': 'IP'|'UDP',
        'Mode': 'Unmanaged'|'Managed',
        'PeerSessionId': 'string',
        'PeerTunnelId': 'string',
        'SessionId': 'string',
        'SourcePort': 'string',
        'TunnelId': 'string',
        'Type': 'L2TPv3'
    },
    NiftyVpnConnectionDescription='string',
    NiftyVpnConnectionMtu='string',
    NiftyVpnGatewayName='string',
    Type='IPsec'|'L2TPv3 / IPsec'|'IPsec VTI',
    VpnGatewayId='string'
)
Parameters:
  • Agreement (boolean) –

  • CustomerGatewayId (string) –

  • NiftyCustomerGatewayName (string) –

  • NiftyIpsecConfiguration (dict) –

    • DiffieHellmanGroup (integer) –

    • EncapsulatingSecurityPayloadLifetime (integer) –

    • EncryptionAlgorithm (string) –

    • HashAlgorithm (string) –

    • InternetKeyExchange (string) –

    • InternetKeyExchangeLifetime (integer) –

    • PreSharedKey (string) –

  • NiftyTunnel (dict) –

    • DestinationPort (string) –

    • Encapsulation (string) –

    • Mode (string) –

    • PeerSessionId (string) –

    • PeerTunnelId (string) –

    • SessionId (string) –

    • SourcePort (string) –

    • TunnelId (string) –

    • Type (string) –

  • NiftyVpnConnectionDescription (string) –

  • NiftyVpnConnectionMtu (string) –

  • NiftyVpnGatewayName (string) –

  • Type (string) – [REQUIRED]

  • VpnGatewayId (string) –

Return type:

dict

Returns:

Response Syntax

{
    'RequestId': 'string',
    'VpnConnection': {
        'CreatedTime': datetime(2015, 1, 1),
        'CustomerGatewayId': 'string',
        'NiftyCustomerGatewayName': 'string',
        'NiftyIpsecConfiguration': {
            'DiffieHellmanGroup': 123,
            'EncapsulatingSecurityPayloadLifetime': 123,
            'EncryptionAlgorithm': 'string',
            'HashingAlgorithm': 'string',
            'InternetKeyExchange': 'string',
            'InternetKeyExchangeLifetime': 123,
            'Mtu': 'string',
            'PreSharedKey': 'string'
        },
        'NiftyTunnel': {
            'DestinationPort': 'string',
            'Encapsulation': 'string',
            'Mode': 'string',
            'PeerSessionId': 'string',
            'PeerTunnelId': 'string',
            'SessionId': 'string',
            'SourcePort': 'string',
            'TunnelId': 'string',
            'Type': 'string'
        },
        'NiftyVpnConnectionDescription': 'string',
        'NiftyVpnGatewayName': 'string',
        'State': 'string',
        'TagSet': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'Type': 'string',
        'VgwTelemetry': [
            {
                'AcceptedRouteCount': 123,
                'LastStatusChange': datetime(2015, 1, 1),
                'OutsideIpAddress': 'string',
                'Status': 'string',
                'StatusMessage': 'string'
            },
        ],
        'VpnConnectionId': 'string',
        'VpnGatewayId': 'string'
    }
}

Response Structure

  • (dict) –

    • RequestId (string) –

    • VpnConnection (dict) –

      • CreatedTime (datetime) –

      • CustomerGatewayId (string) –

      • NiftyCustomerGatewayName (string) –

      • NiftyIpsecConfiguration (dict) –

        • DiffieHellmanGroup (integer) –

        • EncapsulatingSecurityPayloadLifetime (integer) –

        • EncryptionAlgorithm (string) –

        • HashingAlgorithm (string) –

        • InternetKeyExchange (string) –

        • InternetKeyExchangeLifetime (integer) –

        • Mtu (string) –

        • PreSharedKey (string) –

      • NiftyTunnel (dict) –

        • DestinationPort (string) –

        • Encapsulation (string) –

        • Mode (string) –

        • PeerSessionId (string) –

        • PeerTunnelId (string) –

        • SessionId (string) –

        • SourcePort (string) –

        • TunnelId (string) –

        • Type (string) –

      • NiftyVpnConnectionDescription (string) –

      • NiftyVpnGatewayName (string) –

      • State (string) –

      • TagSet (list) –

        • (dict) –

          • Key (string) –

          • Value (string) –

      • Type (string) –

      • VgwTelemetry (list) –

        • (dict) –

          • AcceptedRouteCount (integer) –

          • LastStatusChange (datetime) –

          • OutsideIpAddress (string) –

          • Status (string) –

          • StatusMessage (string) –

      • VpnConnectionId (string) –

      • VpnGatewayId (string) –