Skip to content

/AWS1/IF_QST=>REGISTERUSER()

About RegisterUser

Creates an Amazon Quick Sight user whose identity is associated with the Identity and Access Management (IAM) identity or role specified in the request. When you register a new user from the Quick Sight API, Quick Sight generates a registration URL. The user accesses this registration URL to create their account. Quick Sight doesn't send a registration email to users who are registered from the Quick Sight API. If you want new users to receive a registration email, then add those users in the Quick Sight console. For more information on registering a new user in the Quick Sight console, see Inviting users to access Quick Sight.

Method Signature

METHODS /AWS1/IF_QST~REGISTERUSER
  IMPORTING
    !IV_IDENTITYTYPE TYPE /AWS1/QSTIDENTITYTYPE OPTIONAL
    !IV_EMAIL TYPE /AWS1/QSTSTRING OPTIONAL
    !IV_USERROLE TYPE /AWS1/QSTUSERROLE OPTIONAL
    !IV_IAMARN TYPE /AWS1/QSTSTRING OPTIONAL
    !IV_SESSIONNAME TYPE /AWS1/QSTROLESESSIONNAME OPTIONAL
    !IV_AWSACCOUNTID TYPE /AWS1/QSTAWSACCOUNTID OPTIONAL
    !IV_NAMESPACE TYPE /AWS1/QSTNAMESPACE OPTIONAL
    !IV_USERNAME TYPE /AWS1/QSTUSERNAME OPTIONAL
    !IV_CUSTOMPERMISSIONSNAME TYPE /AWS1/QSTROLENAME OPTIONAL
    !IV_EXTERNALLOGINFEDR8NPVDR00 TYPE /AWS1/QSTSTRING OPTIONAL
    !IV_CUSTOMFEDR8NPROVIDERURL TYPE /AWS1/QSTSTRING OPTIONAL
    !IV_EXTERNALLOGINID TYPE /AWS1/QSTSTRING OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_QSTTAG=>TT_TAGLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_qstreguserresponse
  RAISING
    /AWS1/CX_QSTACCESSDENIEDEX
    /AWS1/CX_QSTINTERNALFAILUREEX
    /AWS1/CX_QSTINVPARAMVALUEEX
    /AWS1/CX_QSTLIMITEXCEEDEDEX
    /AWS1/CX_QSTPRECONDNOTMETEX
    /AWS1/CX_QSTRESOURCEEXISTSEX
    /AWS1/CX_QSTRESOURCENOTFOUNDEX
    /AWS1/CX_QSTRESOURCEUNAVAILEX
    /AWS1/CX_QSTTHROTTLINGEX
    /AWS1/CX_QSTCLIENTEXC
    /AWS1/CX_QSTSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_identitytype TYPE /AWS1/QSTIDENTITYTYPE /AWS1/QSTIDENTITYTYPE

The identity type that your Quick Sight account uses to manage the identity of users.

iv_email TYPE /AWS1/QSTSTRING /AWS1/QSTSTRING

The email address of the user that you want to register.

iv_userrole TYPE /AWS1/QSTUSERROLE /AWS1/QSTUSERROLE

The Amazon Quick Sight role for the user. The user role can be one of the following:

  • READER: A user who has read-only access to dashboards.

  • AUTHOR: A user who can create data sources, datasets, analyses, and dashboards.

  • ADMIN: A user who is an author, who can also manage Amazon Quick Sight settings.

  • READER_PRO: Reader Pro adds Generative BI capabilities to the Reader role. Reader Pros have access to Amazon Q in Quick Sight, can build stories with Amazon Q, and can generate executive summaries from dashboards.

  • AUTHOR_PRO: Author Pro adds Generative BI capabilities to the Author role. Author Pros can author dashboards with natural language with Amazon Q, build stories with Amazon Q, create Topics for Q&A, and generate executive summaries from dashboards.

  • ADMIN_PRO: Admin Pros are Author Pros who can also manage Amazon Quick Sight administrative settings. Admin Pro users are billed at Author Pro pricing.

  • RESTRICTED_READER: This role isn't currently available for use.

  • RESTRICTED_AUTHOR: This role isn't currently available for use.

iv_awsaccountid TYPE /AWS1/QSTAWSACCOUNTID /AWS1/QSTAWSACCOUNTID

The ID for the Amazon Web Services account that the user is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.

iv_namespace TYPE /AWS1/QSTNAMESPACE /AWS1/QSTNAMESPACE

The namespace. Currently, you should set this to default.

Optional arguments:

iv_iamarn TYPE /AWS1/QSTSTRING /AWS1/QSTSTRING

The ARN of the IAM user or role that you are registering with Amazon Quick Sight.

iv_sessionname TYPE /AWS1/QSTROLESESSIONNAME /AWS1/QSTROLESESSIONNAME

You need to use this parameter only when you register one or more users using an assumed IAM role. You don't need to provide the session name for other scenarios, for example when you are registering an IAM user or an Amazon Quick Sight user. You can register multiple users using the same IAM role if each user has a different session name. For more information on assuming IAM roles, see assume-role in the CLI Reference.

iv_username TYPE /AWS1/QSTUSERNAME /AWS1/QSTUSERNAME

The Amazon Quick Sight user name that you want to create for the user you are registering.

iv_custompermissionsname TYPE /AWS1/QSTROLENAME /AWS1/QSTROLENAME

(Enterprise edition only) The name of the custom permissions profile that you want to assign to this user. Customized permissions allows you to control a user's access by restricting access the following operations:

  • Create and update data sources

  • Create and update datasets

  • Create and update email reports

  • Subscribe to email reports

To add custom permissions to an existing user, use UpdateUser instead.

A set of custom permissions includes any combination of these restrictions. Currently, you need to create the profile names for custom permission sets by using the Quick Sight console. Then, you use the RegisterUser API operation to assign the named set of permissions to a Quick Sight user.

Quick Sight custom permissions are applied through IAM policies. Therefore, they override the permissions typically granted by assigning Quick Sight users to one of the default security cohorts in Quick Sight (admin, author, reader, admin pro, author pro, reader pro).

This feature is available only to Quick Sight Enterprise edition subscriptions.

iv_externalloginfedr8npvdr00 TYPE /AWS1/QSTSTRING /AWS1/QSTSTRING

The type of supported external login provider that provides identity to let a user federate into Amazon Quick Sight with an associated Identity and Access Management(IAM) role. The type of supported external login provider can be one of the following.

  • COGNITO: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the COGNITO provider type, don’t use the "CustomFederationProviderUrl" parameter which is only needed when the external provider is custom.

  • CUSTOM_OIDC: Custom OpenID Connect (OIDC) provider. When choosing CUSTOM_OIDC type, use the CustomFederationProviderUrl parameter to provide the custom OIDC provider URL.

iv_customfedr8nproviderurl TYPE /AWS1/QSTSTRING /AWS1/QSTSTRING

The URL of the custom OpenID Connect (OIDC) provider that provides identity to let a user federate into Quick Sight with an associated Identity and Access Management(IAM) role. This parameter should only be used when ExternalLoginFederationProviderType parameter is set to CUSTOM_OIDC.

iv_externalloginid TYPE /AWS1/QSTSTRING /AWS1/QSTSTRING

The identity ID for a user in the external login provider.

it_tags TYPE /AWS1/CL_QSTTAG=>TT_TAGLIST TT_TAGLIST

The tags to associate with the user.

RETURNING

oo_output TYPE REF TO /aws1/cl_qstreguserresponse /AWS1/CL_QSTREGUSERRESPONSE

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->registeruser(
  it_tags = VALUE /aws1/cl_qsttag=>tt_taglist(
    (
      new /aws1/cl_qsttag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_awsaccountid = |string|
  iv_customfedr8nproviderurl = |string|
  iv_custompermissionsname = |string|
  iv_email = |string|
  iv_externalloginfedr8npvdr00 = |string|
  iv_externalloginid = |string|
  iv_iamarn = |string|
  iv_identitytype = |string|
  iv_namespace = |string|
  iv_sessionname = |string|
  iv_username = |string|
  iv_userrole = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_user = lo_result->get_user( ).
  IF lo_user IS NOT INITIAL.
    lv_arn = lo_user->get_arn( ).
    lv_username = lo_user->get_username( ).
    lv_string = lo_user->get_email( ).
    lv_userrole = lo_user->get_role( ).
    lv_identitytype = lo_user->get_identitytype( ).
    lv_boolean = lo_user->get_active( ).
    lv_string = lo_user->get_principalid( ).
    lv_rolename = lo_user->get_custompermissionsname( ).
    lv_string = lo_user->get_externalloginfedr8npvd00( ).
    lv_string = lo_user->get_externalloginfedr8npvd01( ).
    lv_string = lo_user->get_externalloginid( ).
  ENDIF.
  lv_string = lo_result->get_userinvitationurl( ).
  lv_string = lo_result->get_requestid( ).
  lv_statuscode = lo_result->get_status( ).
ENDIF.