generate_quicksight_console_url

QuicksightApi.generate_quicksight_console_url(role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Generate a QuickSight console federation URL

Returns an AWS federation sign-in URL that opens the QuickSight console (https://quicksight.aws.amazon.com/) as the authenticated Amorphic user. The caller needs verticals.view on the supplied role_id. The user must exist in Amorphic and already be registered in QuickSight as {IAMRole}/{user_id}. The Lambda assumes that IAM role for 3600 seconds, requests a federation SigninToken (session duration 3598 seconds), and returns the login URL in Message. The federation URL must be used within 15 minutes of token issue. This Lambda maps InvalidInputException and UnauthorizedUserException to HTTP 400. Unhandled exceptions (including “User is not registered in BI Application”) map to HTTP 500. Example: GET /quicksight/preSignedURL

Parameters:
  • role_id (str) – Amorphic role ID used to authorize the request. Must grant verticals.view. The caller must belong to the role. (required)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

GenerateUrlResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /quicksight/preSignedURL

Parameter examples

Name

In

Example

role_id

header

"custom-role-123e4567-e89b-12d3-a456-426614174000"

Success (HTTP 200)

Federation URL in Message. There is no QSConsoleURL field; the URL is the Message string.

Request / response example

{
  "Message": "https://signin.aws.amazon.com/federation?Action=login&Issuer=Example.org&Destination=https%3A%2F%2Fquicksight.aws.amazon.com%2F&SigninToken=..."
}

Errors

Documented error codes: GE-1003, AUTH-1001, RTE-1001, EMF-1001.

HTTP 400

InvalidInputException (including GE-1003 for an invalid Amorphic user) or UnauthorizedUserException. Body is {“Message”: “<CODE> - <text>”}.

notValidUser

{
  "Message": "GE-1003 - User jane.doe is not valid user."
}

missingRole

{
  "Message": "AUTH-1001 - Missing role information in event header"
}

HTTP 500

GenericFailure, InconsistentMetadata, or unhandled exception. User not registered in QuickSight raises a bare Exception and is mapped to HTTP 500 as RTE-1001 via EMF-1001.

notRegistered

{
  "Message": "RTE-1001 - User is not registered in BI Application."
}