

# AWS IoT Secure Tunneling
<a name="API_Operations_AWS_IoT_Secure_Tunneling"></a>

The following actions are supported by AWS IoT Secure Tunneling:
+  [CloseTunnel](API_iot-secure-tunneling_CloseTunnel.md) 
+  [DescribeTunnel](API_iot-secure-tunneling_DescribeTunnel.md) 
+  [ListTagsForResource](API_iot-secure-tunneling_ListTagsForResource.md) 
+  [ListTunnels](API_iot-secure-tunneling_ListTunnels.md) 
+  [OpenTunnel](API_iot-secure-tunneling_OpenTunnel.md) 
+  [RotateTunnelAccessToken](API_iot-secure-tunneling_RotateTunnelAccessToken.md) 
+  [TagResource](API_iot-secure-tunneling_TagResource.md) 
+  [UntagResource](API_iot-secure-tunneling_UntagResource.md) 

# CloseTunnel
<a name="API_iot-secure-tunneling_CloseTunnel"></a>

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.

Requires permission to access the [CloseTunnel](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Request Syntax
<a name="API_iot-secure-tunneling_CloseTunnel_RequestSyntax"></a>

```
{
   "delete": boolean,
   "tunnelId": "string"
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_CloseTunnel_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [delete](#API_iot-secure-tunneling_CloseTunnel_RequestSyntax) **   <a name="iot-iot-secure-tunneling_CloseTunnel-request-delete"></a>
When set to true, AWS IoT Secure Tunneling deletes the tunnel data immediately.  
Type: Boolean  
Required: No

 ** [tunnelId](#API_iot-secure-tunneling_CloseTunnel_RequestSyntax) **   <a name="iot-iot-secure-tunneling_CloseTunnel-request-tunnelId"></a>
The ID of the tunnel to close.  
Type: String  
Pattern: `[a-zA-Z0-9_\-+=:]{1,128}`   
Required: Yes

## Response Elements
<a name="API_iot-secure-tunneling_CloseTunnel_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_iot-secure-tunneling_CloseTunnel_Errors"></a>

 ** ResourceNotFoundException **   
Thrown when an operation is attempted on a resource that does not exist.  
HTTP Status Code: 400

## See Also
<a name="API_iot-secure-tunneling_CloseTunnel_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/CloseTunnel) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/CloseTunnel) 

# DescribeTunnel
<a name="API_iot-secure-tunneling_DescribeTunnel"></a>

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

Requires permission to access the [DescribeTunnel](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Request Syntax
<a name="API_iot-secure-tunneling_DescribeTunnel_RequestSyntax"></a>

```
{
   "tunnelId": "string"
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_DescribeTunnel_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [tunnelId](#API_iot-secure-tunneling_DescribeTunnel_RequestSyntax) **   <a name="iot-iot-secure-tunneling_DescribeTunnel-request-tunnelId"></a>
The tunnel to describe.  
Type: String  
Pattern: `[a-zA-Z0-9_\-+=:]{1,128}`   
Required: Yes

## Response Syntax
<a name="API_iot-secure-tunneling_DescribeTunnel_ResponseSyntax"></a>

```
{
   "tunnel": { 
      "createdAt": number,
      "description": "string",
      "destinationConfig": { 
         "services": [ "string" ],
         "thingName": "string"
      },
      "destinationConnectionState": { 
         "lastUpdatedAt": number,
         "status": "string"
      },
      "lastUpdatedAt": number,
      "sourceConnectionState": { 
         "lastUpdatedAt": number,
         "status": "string"
      },
      "status": "string",
      "tags": [ 
         { 
            "key": "string",
            "value": "string"
         }
      ],
      "timeoutConfig": { 
         "maxLifetimeTimeoutMinutes": number
      },
      "tunnelArn": "string",
      "tunnelId": "string"
   }
}
```

## Response Elements
<a name="API_iot-secure-tunneling_DescribeTunnel_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [tunnel](#API_iot-secure-tunneling_DescribeTunnel_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_DescribeTunnel-response-tunnel"></a>
The tunnel being described.  
Type: [Tunnel](API_iot-secure-tunneling_Tunnel.md) object

## Errors
<a name="API_iot-secure-tunneling_DescribeTunnel_Errors"></a>

 ** ResourceNotFoundException **   
Thrown when an operation is attempted on a resource that does not exist.  
HTTP Status Code: 400

## See Also
<a name="API_iot-secure-tunneling_DescribeTunnel_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/DescribeTunnel) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/DescribeTunnel) 

# ListTagsForResource
<a name="API_iot-secure-tunneling_ListTagsForResource"></a>

Lists the tags for the specified resource.

## Request Syntax
<a name="API_iot-secure-tunneling_ListTagsForResource_RequestSyntax"></a>

```
{
   "resourceArn": "string"
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_ListTagsForResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [resourceArn](#API_iot-secure-tunneling_ListTagsForResource_RequestSyntax) **   <a name="iot-iot-secure-tunneling_ListTagsForResource-request-resourceArn"></a>
The resource ARN.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1011.  
Required: Yes

## Response Syntax
<a name="API_iot-secure-tunneling_ListTagsForResource_ResponseSyntax"></a>

```
{
   "tags": [ 
      { 
         "key": "string",
         "value": "string"
      }
   ]
}
```

## Response Elements
<a name="API_iot-secure-tunneling_ListTagsForResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [tags](#API_iot-secure-tunneling_ListTagsForResource_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_ListTagsForResource-response-tags"></a>
The tags for the specified resource.  
Type: Array of [Tag](API_iot-secure-tunneling_Tag.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 200 items.

## Errors
<a name="API_iot-secure-tunneling_ListTagsForResource_Errors"></a>

 ** ResourceNotFoundException **   
Thrown when an operation is attempted on a resource that does not exist.  
HTTP Status Code: 400

## See Also
<a name="API_iot-secure-tunneling_ListTagsForResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/ListTagsForResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/ListTagsForResource) 

# ListTunnels
<a name="API_iot-secure-tunneling_ListTunnels"></a>

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

Requires permission to access the [ListTunnels](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Request Syntax
<a name="API_iot-secure-tunneling_ListTunnels_RequestSyntax"></a>

```
{
   "maxResults": number,
   "nextToken": "string",
   "thingName": "string"
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_ListTunnels_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [maxResults](#API_iot-secure-tunneling_ListTunnels_RequestSyntax) **   <a name="iot-iot-secure-tunneling_ListTunnels-request-maxResults"></a>
The maximum number of results to return at once.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [nextToken](#API_iot-secure-tunneling_ListTunnels_RequestSyntax) **   <a name="iot-iot-secure-tunneling_ListTunnels-request-nextToken"></a>
To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.  
Type: String  
Pattern: `[a-zA-Z0-9_=-]{1,4096}`   
Required: No

 ** [thingName](#API_iot-secure-tunneling_ListTunnels_RequestSyntax) **   <a name="iot-iot-secure-tunneling_ListTunnels-request-thingName"></a>
The name of the IoT thing associated with the destination device.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[a-zA-Z0-9:_-]+`   
Required: No

## Response Syntax
<a name="API_iot-secure-tunneling_ListTunnels_ResponseSyntax"></a>

```
{
   "nextToken": "string",
   "tunnelSummaries": [ 
      { 
         "createdAt": number,
         "description": "string",
         "lastUpdatedAt": number,
         "status": "string",
         "tunnelArn": "string",
         "tunnelId": "string"
      }
   ]
}
```

## Response Elements
<a name="API_iot-secure-tunneling_ListTunnels_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_iot-secure-tunneling_ListTunnels_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_ListTunnels-response-nextToken"></a>
The token to use to get the next set of results, or null if there are no additional results.  
Type: String  
Pattern: `[a-zA-Z0-9_=-]{1,4096}` 

 ** [tunnelSummaries](#API_iot-secure-tunneling_ListTunnels_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_ListTunnels-response-tunnelSummaries"></a>
A short description of the tunnels in an AWS account.  
Type: Array of [TunnelSummary](API_iot-secure-tunneling_TunnelSummary.md) objects

## See Also
<a name="API_iot-secure-tunneling_ListTunnels_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/ListTunnels) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/ListTunnels) 

# OpenTunnel
<a name="API_iot-secure-tunneling_OpenTunnel"></a>

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

Requires permission to access the [OpenTunnel](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Request Syntax
<a name="API_iot-secure-tunneling_OpenTunnel_RequestSyntax"></a>

```
{
   "description": "string",
   "destinationConfig": { 
      "services": [ "string" ],
      "thingName": "string"
   },
   "tags": [ 
      { 
         "key": "string",
         "value": "string"
      }
   ],
   "timeoutConfig": { 
      "maxLifetimeTimeoutMinutes": number
   }
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_OpenTunnel_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [description](#API_iot-secure-tunneling_OpenTunnel_RequestSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-request-description"></a>
A short text description of the tunnel.   
Type: String  
Pattern: `[^\p{C}]{1,2048}`   
Required: No

 ** [destinationConfig](#API_iot-secure-tunneling_OpenTunnel_RequestSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-request-destinationConfig"></a>
The destination configuration for the OpenTunnel request.  
Type: [DestinationConfig](API_iot-secure-tunneling_DestinationConfig.md) object  
Required: No

 ** [tags](#API_iot-secure-tunneling_OpenTunnel_RequestSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-request-tags"></a>
A collection of tag metadata.  
Type: Array of [Tag](API_iot-secure-tunneling_Tag.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 200 items.  
Required: No

 ** [timeoutConfig](#API_iot-secure-tunneling_OpenTunnel_RequestSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-request-timeoutConfig"></a>
Timeout configuration for a tunnel.  
Type: [TimeoutConfig](API_iot-secure-tunneling_TimeoutConfig.md) object  
Required: No

## Response Syntax
<a name="API_iot-secure-tunneling_OpenTunnel_ResponseSyntax"></a>

```
{
   "destinationAccessToken": "string",
   "sourceAccessToken": "string",
   "tunnelArn": "string",
   "tunnelId": "string"
}
```

## Response Elements
<a name="API_iot-secure-tunneling_OpenTunnel_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [destinationAccessToken](#API_iot-secure-tunneling_OpenTunnel_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-response-destinationAccessToken"></a>
The access token the destination local proxy uses to connect to AWS IoT Secure Tunneling.  
Type: String

 ** [sourceAccessToken](#API_iot-secure-tunneling_OpenTunnel_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-response-sourceAccessToken"></a>
The access token the source local proxy uses to connect to AWS IoT Secure Tunneling.  
Type: String

 ** [tunnelArn](#API_iot-secure-tunneling_OpenTunnel_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-response-tunnelArn"></a>
The Amazon Resource Name for the tunnel.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1600.

 ** [tunnelId](#API_iot-secure-tunneling_OpenTunnel_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_OpenTunnel-response-tunnelId"></a>
A unique alpha-numeric tunnel ID.  
Type: String  
Pattern: `[a-zA-Z0-9_\-+=:]{1,128}` 

## Errors
<a name="API_iot-secure-tunneling_OpenTunnel_Errors"></a>

 ** LimitExceededException **   
Thrown when a tunnel limit is exceeded.  
HTTP Status Code: 400

## See Also
<a name="API_iot-secure-tunneling_OpenTunnel_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/OpenTunnel) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/OpenTunnel) 

# RotateTunnelAccessToken
<a name="API_iot-secure-tunneling_RotateTunnelAccessToken"></a>

Revokes the current client access token (CAT) and returns new CAT for clients to use when reconnecting to secure tunneling to access the same tunnel.

Requires permission to access the [RotateTunnelAccessToken](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

**Note**  
Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel duration is 12 hours and the tunnel has already been open for 4 hours. When you rotate the access tokens, the new tokens that are generated can only be used for the remaining 8 hours.

## Request Syntax
<a name="API_iot-secure-tunneling_RotateTunnelAccessToken_RequestSyntax"></a>

```
{
   "clientMode": "string",
   "destinationConfig": { 
      "services": [ "string" ],
      "thingName": "string"
   },
   "tunnelId": "string"
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_RotateTunnelAccessToken_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [clientMode](#API_iot-secure-tunneling_RotateTunnelAccessToken_RequestSyntax) **   <a name="iot-iot-secure-tunneling_RotateTunnelAccessToken-request-clientMode"></a>
The mode of the client that will use the client token, which can be either the source or destination, or both source and destination.  
Type: String  
Valid Values: `SOURCE | DESTINATION | ALL`   
Required: Yes

 ** [destinationConfig](#API_iot-secure-tunneling_RotateTunnelAccessToken_RequestSyntax) **   <a name="iot-iot-secure-tunneling_RotateTunnelAccessToken-request-destinationConfig"></a>
The destination configuration. You can not use `DestinationConfig` with source `clientMode`.  
Type: [DestinationConfig](API_iot-secure-tunneling_DestinationConfig.md) object  
Required: No

 ** [tunnelId](#API_iot-secure-tunneling_RotateTunnelAccessToken_RequestSyntax) **   <a name="iot-iot-secure-tunneling_RotateTunnelAccessToken-request-tunnelId"></a>
The tunnel for which you want to rotate the access tokens.  
Type: String  
Pattern: `[a-zA-Z0-9_\-+=:]{1,128}`   
Required: Yes

## Response Syntax
<a name="API_iot-secure-tunneling_RotateTunnelAccessToken_ResponseSyntax"></a>

```
{
   "destinationAccessToken": "string",
   "sourceAccessToken": "string",
   "tunnelArn": "string"
}
```

## Response Elements
<a name="API_iot-secure-tunneling_RotateTunnelAccessToken_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [destinationAccessToken](#API_iot-secure-tunneling_RotateTunnelAccessToken_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_RotateTunnelAccessToken-response-destinationAccessToken"></a>
The client access token that the destination local proxy uses to connect to AWS IoT Secure Tunneling.  
Type: String

 ** [sourceAccessToken](#API_iot-secure-tunneling_RotateTunnelAccessToken_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_RotateTunnelAccessToken-response-sourceAccessToken"></a>
The client access token that the source local proxy uses to connect to AWS IoT Secure Tunneling.  
Type: String

 ** [tunnelArn](#API_iot-secure-tunneling_RotateTunnelAccessToken_ResponseSyntax) **   <a name="iot-iot-secure-tunneling_RotateTunnelAccessToken-response-tunnelArn"></a>
The Amazon Resource Name for the tunnel.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1600.

## Errors
<a name="API_iot-secure-tunneling_RotateTunnelAccessToken_Errors"></a>

 ** ResourceNotFoundException **   
Thrown when an operation is attempted on a resource that does not exist.  
HTTP Status Code: 400

## See Also
<a name="API_iot-secure-tunneling_RotateTunnelAccessToken_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/RotateTunnelAccessToken) 

# TagResource
<a name="API_iot-secure-tunneling_TagResource"></a>

A resource tag.

## Request Syntax
<a name="API_iot-secure-tunneling_TagResource_RequestSyntax"></a>

```
{
   "resourceArn": "string",
   "tags": [ 
      { 
         "key": "string",
         "value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_TagResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [resourceArn](#API_iot-secure-tunneling_TagResource_RequestSyntax) **   <a name="iot-iot-secure-tunneling_TagResource-request-resourceArn"></a>
The ARN of the resource.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1011.  
Required: Yes

 ** [tags](#API_iot-secure-tunneling_TagResource_RequestSyntax) **   <a name="iot-iot-secure-tunneling_TagResource-request-tags"></a>
The tags for the resource.  
Type: Array of [Tag](API_iot-secure-tunneling_Tag.md) objects  
Array Members: Minimum number of 1 item. Maximum number of 200 items.  
Required: Yes

## Response Elements
<a name="API_iot-secure-tunneling_TagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_iot-secure-tunneling_TagResource_Errors"></a>

 ** ResourceNotFoundException **   
Thrown when an operation is attempted on a resource that does not exist.  
HTTP Status Code: 400

## See Also
<a name="API_iot-secure-tunneling_TagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/TagResource) 

# UntagResource
<a name="API_iot-secure-tunneling_UntagResource"></a>

Removes a tag from a resource.

## Request Syntax
<a name="API_iot-secure-tunneling_UntagResource_RequestSyntax"></a>

```
{
   "resourceArn": "string",
   "tagKeys": [ "string" ]
}
```

## Request Parameters
<a name="API_iot-secure-tunneling_UntagResource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [resourceArn](#API_iot-secure-tunneling_UntagResource_RequestSyntax) **   <a name="iot-iot-secure-tunneling_UntagResource-request-resourceArn"></a>
The resource ARN.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1011.  
Required: Yes

 ** [tagKeys](#API_iot-secure-tunneling_UntagResource_RequestSyntax) **   <a name="iot-iot-secure-tunneling_UntagResource-request-tagKeys"></a>
The keys of the tags to remove.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 200 items.  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`   
Required: Yes

## Response Elements
<a name="API_iot-secure-tunneling_UntagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_iot-secure-tunneling_UntagResource_Errors"></a>

 ** ResourceNotFoundException **   
Thrown when an operation is attempted on a resource that does not exist.  
HTTP Status Code: 400

## See Also
<a name="API_iot-secure-tunneling_UntagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/iotsecuretunneling-2018-10-05/UntagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/iotsecuretunneling-2018-10-05/UntagResource) 