AWS IoT Secure Tunneling

2019/11/25 - AWS IoT Secure Tunneling - 7 new api methods

Changes  This release adds support for IoT Secure Tunneling to remote access devices behind restricted firewalls.

OpenTunnel (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.open_tunnel(
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    destinationConfig={
        'thingName': 'string',
        'services': [
            'string',
        ]
    },
    timeoutConfig={
        'maxLifetimeTimeoutMinutes': 123
    }
)
type description

string

param description

A short text description of the tunnel.

type tags

list

param tags

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.

type destinationConfig

dict

param destinationConfig

The destination configuration for the OpenTunnel request.

  • thingName (string) -- [REQUIRED]

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

  • services (list) -- [REQUIRED]

    A list of service names that identity the target application. Currently, you can only specify a single name. The AWS 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 AWS IoT client instantiates the local proxy which uses this information to connect to the destination application.

    • (string) --

type timeoutConfig

dict

param timeoutConfig

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)

rtype

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. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id>

    • sourceAccessToken (string) --

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

    • destinationAccessToken (string) --

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

ListTunnels (new) Link ¶

List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.

See also: AWS API Documentation

Request Syntax

client.list_tunnels(
    thingName='string',
    maxResults=123,
    nextToken='string'
)
type thingName

string

param thingName

The name of the IoT thing associated with the destination device.

type maxResults

integer

param maxResults

The maximum number of results to return at once.

type nextToken

string

param nextToken

A token to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'tunnelSummaries': [
        {
            'tunnelId': 'string',
            'tunnelArn': 'string',
            'status': 'OPEN'|'CLOSED',
            'description': 'string',
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tunnelSummaries (list) --

      A short description of the tunnels in an AWS account.

      • (dict) --

        Information about the tunnel.

        • tunnelId (string) --

          The unique alpha-numeric identifier for the tunnel.

        • tunnelArn (string) --

          The Amazon Resource Name of the tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id>

        • status (string) --

          The status of a tunnel. Valid values are: Open and Closed.

        • description (string) --

          A description of the tunnel.

        • createdAt (datetime) --

          The time the tunnel was created.

        • lastUpdatedAt (datetime) --

          The time the tunnel was last updated.

    • nextToken (string) --

      A token to used to retrieve the next set of results.

TagResource (new) Link ¶

A resource tag.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource.

type tags

list

param tags

[REQUIRED]

The tags for the resource.

  • (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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeTunnel (new) Link ¶

Gets information about a tunnel identified by the unique tunnel id.

See also: AWS API Documentation

Request Syntax

client.describe_tunnel(
    tunnelId='string'
)
type tunnelId

string

param tunnelId

[REQUIRED]

The tunnel to describe.

rtype

dict

returns

Response Syntax

{
    'tunnel': {
        'tunnelId': 'string',
        'tunnelArn': 'string',
        'status': 'OPEN'|'CLOSED',
        'sourceConnectionState': {
            'status': 'CONNECTED'|'DISCONNECTED',
            'lastUpdatedAt': datetime(2015, 1, 1)
        },
        'destinationConnectionState': {
            'status': 'CONNECTED'|'DISCONNECTED',
            'lastUpdatedAt': datetime(2015, 1, 1)
        },
        'description': 'string',
        'destinationConfig': {
            'thingName': 'string',
            'services': [
                'string',
            ]
        },
        'timeoutConfig': {
            'maxLifetimeTimeoutMinutes': 123
        },
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'createdAt': datetime(2015, 1, 1),
        'lastUpdatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • tunnel (dict) --

      The tunnel being described.

      • tunnelId (string) --

        A unique alpha-numeric ID that identifies a tunnel.

      • tunnelArn (string) --

        The Amazon Resource Name (ARN) of a tunnel. The tunnel ARN format is arn:aws:tunnel:<region>:<account-id>:tunnel/<tunnel-id>

      • status (string) --

        The status of a tunnel. Valid values are: Open and Closed.

      • sourceConnectionState (dict) --

        The connection state of the source application.

        • status (string) --

          The connection status of the tunnel. Valid values are CONNECTED and DISCONNECTED .

        • lastUpdatedAt (datetime) --

          The last time the connection status was updated.

      • destinationConnectionState (dict) --

        The connection state of the destination application.

        • status (string) --

          The connection status of the tunnel. Valid values are CONNECTED and DISCONNECTED .

        • lastUpdatedAt (datetime) --

          The last time the connection status was updated.

      • description (string) --

        A description of the tunnel.

      • destinationConfig (dict) --

        The destination configuration that specifies the thing name of the destination device and a service name that the local proxy uses to connect to the destination application.

        • thingName (string) --

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

        • services (list) --

          A list of service names that identity the target application. Currently, you can only specify a single name. The AWS 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 AWS IoT client instantiates the local proxy which uses this information to connect to the destination application.

          • (string) --

      • timeoutConfig (dict) --

        Timeout configuration for the 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)

      • tags (list) --

        A list of tag metadata associated with the secure tunnel.

        • (dict) --

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

          • key (string) --

            The key of the tag.

          • value (string) --

            The value of the tag.

      • createdAt (datetime) --

        The time when the tunnel was created.

      • lastUpdatedAt (datetime) --

        The last time the tunnel was updated.

CloseTunnel (new) Link ¶

Closes a tunnel identified by the unique tunnel id. When a CloseTunnel request is received, we close the WebSocket connections between the client and proxy server so no data can be transmitted.

See also: AWS API Documentation

Request Syntax

client.close_tunnel(
    tunnelId='string',
    delete=True|False
)
type tunnelId

string

param tunnelId

[REQUIRED]

The ID of the tunnel to close.

type delete

boolean

param delete

When set to true, AWS IoT Secure Tunneling deletes the tunnel data immediately.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListTagsForResource (new) Link ¶

Lists the tags for the specified resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string'
)
type resourceArn

string

param resourceArn

[REQUIRED]

The resource ARN.

rtype

dict

returns

Response Syntax

{
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • tags (list) --

      The tags for the specified resource.

      • (dict) --

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

        • key (string) --

          The key of the tag.

        • value (string) --

          The value of the tag.

UntagResource (new) Link ¶

Removes a tag from a resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The resource ARN.

type tagKeys

list

param tagKeys

[REQUIRED]

The keys of the tags to remove.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --