Skip to content

register_user async

register_user(
    identity_type: IdentityType,
    email: String,
    user_role: UserRole,
    aws_account_id: AwsAccountId,
    namespace: Namespace,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    iam_arn: Optional[String] = None,
    session_name: Optional[RoleSessionName] = None,
    user_name: Optional[UserName] = None,
    custom_permissions_name: Optional[RoleName] = None,
    external_login_federation_provider_type: Optional[String] = None,
    custom_federation_provider_url: Optional[String] = None,
    external_login_id: Optional[String] = None,
    tags: Optional[TagList] = None,
) -> RegisterUserResponse

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.

Parameters:

  • identity_type (IdentityType) –

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

  • email (String) –

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

  • user_role (UserRole) –

    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.

  • iam_arn (Optional[String], default: None ) –

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

  • session_name (Optional[RoleSessionName], default: None ) –

    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.

  • aws_account_id (AwsAccountId) –

    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.

  • namespace (Namespace) –

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

  • user_name (Optional[UserName], default: None ) –

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

  • custom_permissions_name (Optional[RoleName], default: None ) –

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

  • external_login_federation_provider_type (Optional[String], default: None ) –

    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.

  • custom_federation_provider_url (Optional[String], default: None ) –

    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.

  • external_login_id (Optional[String], default: None ) –

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

  • tags (Optional[TagList], default: None ) –

    The tags to associate with the user.

Raises:

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def register_user(
    self,
    identity_type: "capo_quicksight.types.identity_type.IdentityType",
    email: "capo_quicksight.types.string.String",
    user_role: "capo_quicksight.types.user_role.UserRole",
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    namespace: "capo_quicksight.types.namespace.Namespace",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    iam_arn: Optional["capo_quicksight.types.string.String"] = None,
    session_name: Optional[
        "capo_quicksight.types.role_session_name.RoleSessionName"
    ] = None,
    user_name: Optional["capo_quicksight.types.user_name.UserName"] = None,
    custom_permissions_name: Optional[
        "capo_quicksight.types.role_name.RoleName"
    ] = None,
    external_login_federation_provider_type: Optional[
        "capo_quicksight.types.string.String"
    ] = None,
    custom_federation_provider_url: Optional[
        "capo_quicksight.types.string.String"
    ] = None,
    external_login_id: Optional["capo_quicksight.types.string.String"] = None,
    tags: Optional["capo_quicksight.types.tag_list.TagList"] = None,
) -> "capo_quicksight.types.register_user_response.RegisterUserResponse":
    """<p>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 <a href="https://docs.aws.amazon.com/quicksight/latest/user/managing-users.html#inviting-users"> Inviting users to access Quick Sight</a>.</p>

    Args:
        identity_type: <p>The identity type that your Quick Sight account uses to manage the identity of users.</p>
        email: <p>The email address of the user that you want to register.</p>
        user_role: <p>The Amazon Quick Sight role for the user. The user role can be one of the following:</p> <ul> <li> <p> <code>READER</code>: A user who has read-only access to dashboards.</p> </li> <li> <p> <code>AUTHOR</code>: A user who can create data sources, datasets, analyses, and dashboards.</p> </li> <li> <p> <code>ADMIN</code>: A user who is an author, who can also manage Amazon Quick Sight settings.</p> </li> <li> <p> <code>READER_PRO</code>: 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.</p> </li> <li> <p> <code>AUTHOR_PRO</code>: 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.</p> </li> <li> <p> <code>ADMIN_PRO</code>: Admin Pros are Author Pros who can also manage Amazon Quick Sight administrative settings. Admin Pro users are billed at Author Pro pricing.</p> </li> <li> <p> <code>RESTRICTED_READER</code>: This role isn't currently available for use.</p> </li> <li> <p> <code>RESTRICTED_AUTHOR</code>: This role isn't currently available for use.</p> </li> </ul>
        iam_arn: <p>The ARN of the IAM user or role that you are registering with Amazon Quick Sight. </p>
        session_name: <p>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 <a href="https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html"> <code>assume-role</code> </a> in the <i>CLI Reference.</i> </p>
        aws_account_id: <p>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.</p>
        namespace: <p>The namespace. Currently, you should set this to <code>default</code>.</p>
        user_name: <p>The Amazon Quick Sight user name that you want to create for the user you are registering.</p>
        custom_permissions_name: <p>(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:</p> <ul> <li> <p>Create and update data sources</p> </li> <li> <p>Create and update datasets</p> </li> <li> <p>Create and update email reports</p> </li> <li> <p>Subscribe to email reports</p> </li> </ul> <p>To add custom permissions to an existing user, use <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateUser.html">UpdateUser</a> </code> instead.</p> <p>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 <code>RegisterUser</code> API operation to assign the named set of permissions to a Quick Sight user. </p> <p>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).</p> <p>This feature is available only to Quick Sight Enterprise edition subscriptions.</p>
        external_login_federation_provider_type: <p>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.</p> <ul> <li> <p> <code>COGNITO</code>: Amazon Cognito. The provider URL is cognito-identity.amazonaws.com. When choosing the <code>COGNITO</code> provider type, don’t use the "CustomFederationProviderUrl" parameter which is only needed when the external provider is custom.</p> </li> <li> <p> <code>CUSTOM_OIDC</code>: Custom OpenID Connect (OIDC) provider. When choosing <code>CUSTOM_OIDC</code> type, use the <code>CustomFederationProviderUrl</code> parameter to provide the custom OIDC provider URL.</p> </li> </ul>
        custom_federation_provider_url: <p>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 <code>ExternalLoginFederationProviderType</code> parameter is set to <code>CUSTOM_OIDC</code>.</p>
        external_login_id: <p>The identity ID for a user in the external login provider.</p>
        tags: <p>The tags to associate with the user.</p>

    Raises:
        capo_quicksight.errors.access_denied_exception.AccessDeniedException: <p>You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.</p>
        capo_quicksight.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred.</p>
        capo_quicksight.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameters has a value that isn't valid.</p>
        capo_quicksight.errors.limit_exceeded_exception.LimitExceededException: <p>A limit is exceeded.</p>
        capo_quicksight.errors.precondition_not_met_exception.PreconditionNotMetException: <p>One or more preconditions aren't met.</p>
        capo_quicksight.errors.resource_exists_exception.ResourceExistsException: <p>The resource specified already exists. </p>
        capo_quicksight.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_quicksight.errors.resource_unavailable_exception.ResourceUnavailableException: <p>This resource is currently unavailable.</p>
        capo_quicksight.errors.throttling_exception.ThrottlingException: <p>Access is throttled.</p>
        capo_quicksight.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_quicksight.types.register_user_request.RegisterUserRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.register_user_response.RegisterUserResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.register_user

        (
            output,
            http_response,
        ) = await capo_quicksight._operations.quick_sight_20180401.register_user.async_register_user(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterUser")
    )
    input_: capo_quicksight.types.register_user_request.RegisterUserRequest = {
        "identity_type": identity_type,
        "email": email,
        "user_role": user_role,
        "aws_account_id": aws_account_id,
        "namespace": namespace,
    }
    if iam_arn is not None:
        input_["iam_arn"] = iam_arn
    if session_name is not None:
        input_["session_name"] = session_name
    if user_name is not None:
        input_["user_name"] = user_name
    if custom_permissions_name is not None:
        input_["custom_permissions_name"] = custom_permissions_name
    if external_login_federation_provider_type is not None:
        input_["external_login_federation_provider_type"] = (
            external_login_federation_provider_type
        )
    if custom_federation_provider_url is not None:
        input_["custom_federation_provider_url"] = custom_federation_provider_url
    if external_login_id is not None:
        input_["external_login_id"] = external_login_id
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output