CreatePresignedNotebookUrlCommand

Gets an authentication token and the URL at which the notebook can be accessed. During programmatic access, CreatePresignedNotebookUrl must be called every 10 minutes to refresh the authentication token. For information about granting programmatic access, see Grant programmatic access .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AthenaClient, CreatePresignedNotebookUrlCommand } from "@aws-sdk/client-athena"; // ES Modules import
// const { AthenaClient, CreatePresignedNotebookUrlCommand } = require("@aws-sdk/client-athena"); // CommonJS import
const client = new AthenaClient(config);
const input = { // CreatePresignedNotebookUrlRequest
  SessionId: "STRING_VALUE", // required
};
const command = new CreatePresignedNotebookUrlCommand(input);
const response = await client.send(command);
// { // CreatePresignedNotebookUrlResponse
//   NotebookUrl: "STRING_VALUE", // required
//   AuthToken: "STRING_VALUE", // required
//   AuthTokenExpirationTime: Number("long"), // required
// };

CreatePresignedNotebookUrlCommand Input

Parameter
Type
Description
SessionId
Required
string | undefined

The session ID.

CreatePresignedNotebookUrlCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
AuthToken
Required
string | undefined

The authentication token for the notebook.

AuthTokenExpirationTime
Required
number | undefined

The UTC epoch time when the authentication token expires.

NotebookUrl
Required
string | undefined

The URL of the notebook. The URL includes the authentication token and notebook file name and points directly to the opened notebook.

Throws

Name
Fault
Details
InternalServerException
server

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException
client

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException
client

A resource, such as a workgroup, was not found.

AthenaServiceException
Base exception class for all service exceptions from Athena service.