open_tunnel

IoTSecureTunneling.Client.open_tunnel(**kwargs)

Creates a new tunnel, and returns two client access tokens for clients to use to connect to the IoT Secure Tunneling proxy server.

Requires permission to access the OpenTunnel action.

See also: AWS API Documentation

Request Syntax

response = client.open_tunnel(
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    destinationConfig={
        'thingName': 'string',
        'services': [
            'string',
        ]
    },
    timeoutConfig={
        'maxLifetimeTimeoutMinutes': 123
    }
)
Parameters
  • description (string) -- A short text description of the tunnel.
  • tags (list) --

    A collection of tag metadata.

    • (dict) --

      An arbitary key/value pair used to add searchable metadata to secure tunnel resources.

      • key (string) -- [REQUIRED]

        The key of the tag.

      • value (string) -- [REQUIRED]

        The value of the tag.

  • destinationConfig (dict) --

    The destination configuration for the OpenTunnel request.

    • thingName (string) --

      The name of the IoT thing to which you want to connect.

    • services (list) -- [REQUIRED]

      A list of service names that identify the target application. The IoT client running on the destination device reads this value and uses it to look up a port or an IP address and a port. The IoT client instantiates the local proxy, which uses this information to connect to the destination application.

      • (string) --
  • timeoutConfig (dict) --

    Timeout configuration for a tunnel.

    • maxLifetimeTimeoutMinutes (integer) --

      The maximum amount of time (in minutes) a tunnel can remain open. If not specified, maxLifetimeTimeoutMinutes defaults to 720 minutes. Valid values are from 1 minute to 12 hours (720 minutes)

Return type

dict

Returns

Response Syntax

{
    'tunnelId': 'string',
    'tunnelArn': 'string',
    'sourceAccessToken': 'string',
    'destinationAccessToken': 'string'
}

Response Structure

  • (dict) --

    • tunnelId (string) --

      A unique alpha-numeric tunnel ID.

    • tunnelArn (string) --

      The Amazon Resource Name for the tunnel.

    • sourceAccessToken (string) --

      The access token the source local proxy uses to connect to IoT Secure Tunneling.

    • destinationAccessToken (string) --

      The access token the destination local proxy uses to connect to IoT Secure Tunneling.

Exceptions

  • IoTSecureTunneling.Client.exceptions.LimitExceededException