Skip to content

generate_embed_url_for_registered_user_with_identity async

generate_embed_url_for_registered_user_with_identity(
    aws_account_id: AwsAccountId,
    experience_configuration: RegisteredUserEmbeddingExperienceConfiguration,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    session_lifetime_in_minutes: Optional[SessionLifetimeInMinutes] = None,
    allowed_domains: Optional[StringList] = None,
) -> GenerateEmbedUrlForRegisteredUserWithIdentityResponse

Generates an embed URL that you can use to embed an Amazon Quick Sight experience in your website. This action can be used for any type of user that is registered in an Amazon Quick Sight account that uses IAM Identity Center for authentication. This API requires identity-enhanced IAM Role sessions for the authenticated user that the API call is being made for.

This API uses trusted identity propagation to ensure that an end user is authenticated and receives the embed URL that is specific to that user. The IAM Identity Center application that the user has logged into needs to have trusted Identity Propagation enabled for Amazon Quick Sight with the scope value set to quicksight:read. Before you use this action, make sure that you have configured the relevant Amazon Quick Sight resource and permissions.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID of the Amazon Web Services registered user.

  • session_lifetime_in_minutes (Optional[SessionLifetimeInMinutes], default: None ) –

    The validity of the session in minutes.

  • allowed_domains (Optional[StringList], default: None ) –

    A list of domains to be allowed to generate the embed URL.

Raises:

  • AccessDeniedException –

    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.

  • InternalFailureException –

    An internal failure occurred.

  • InvalidParameterValueException –

    One or more parameters has a value that isn't valid.

  • QuickSightUserNotFoundException –

    The user with the provided name isn't found. This error can happen in any operation that requires finding a user based on a provided user name, such as DeleteUser, DescribeUser, and so on.

  • ResourceNotFoundException –

    One or more resources can't be found.

  • SessionLifetimeInMinutesInvalidException –

    The number of minutes specified for the lifetime of a session isn't valid. The session lifetime must be 15-600 minutes.

  • ThrottlingException –

    Access is throttled.

  • UnsupportedPricingPlanException –

    This error indicates that you are calling an embedding operation in Amazon Quick Sight without the required pricing plan on your Amazon Web Services account. Before you can use embedding for anonymous users, a Quick Suite administrator needs to add capacity pricing to Quick Sight. You can do this on the Manage Quick Suite page.

    After capacity pricing is added, you can use the GetDashboardEmbedUrl API operation with the --identity-type ANONYMOUS option.

  • UnsupportedUserEditionException –

    This error indicates that you are calling an operation on an Amazon Quick Suite subscription where the edition doesn't include support for that operation. Amazon Quick Suite currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def generate_embed_url_for_registered_user_with_identity(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    experience_configuration: "capo_quicksight.types.registered_user_embedding_experience_configuration.RegisteredUserEmbeddingExperienceConfiguration",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    session_lifetime_in_minutes: Optional[
        "capo_quicksight.types.session_lifetime_in_minutes.SessionLifetimeInMinutes"
    ] = None,
    allowed_domains: Optional[
        "capo_quicksight.types.string_list.StringList"
    ] = None,
) -> "capo_quicksight.types.generate_embed_url_for_registered_user_with_identity_response.GenerateEmbedUrlForRegisteredUserWithIdentityResponse":
    """<p>Generates an embed URL that you can use to embed an Amazon Quick Sight experience in your website. This action can be used for any type of user that is registered in an Amazon Quick Sight account that uses IAM Identity Center for authentication. This API requires <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/trustedidentitypropagation-overview.html#types-identity-enhanced-iam-role-sessions">identity-enhanced IAM Role sessions</a> for the authenticated user that the API call is being made for.</p> <p>This API uses <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/trustedidentitypropagation.html">trusted identity propagation</a> to ensure that an end user is authenticated and receives the embed URL that is specific to that user. The IAM Identity Center application that the user has logged into needs to have <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/trustedidentitypropagation-using-customermanagedapps-specify-trusted-apps.html">trusted Identity Propagation enabled for Amazon Quick Sight</a> with the scope value set to <code>quicksight:read</code>. Before you use this action, make sure that you have configured the relevant Amazon Quick Sight resource and permissions.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services registered user.</p>
        session_lifetime_in_minutes: <p>The validity of the session in minutes.</p>
        allowed_domains: <p>A list of domains to be allowed to generate the embed URL.</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.quick_sight_user_not_found_exception.QuickSightUserNotFoundException: <p>The user with the provided name isn't found. This error can happen in any operation that requires finding a user based on a provided user name, such as <code>DeleteUser</code>, <code>DescribeUser</code>, and so on.</p>
        capo_quicksight.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_quicksight.errors.session_lifetime_in_minutes_invalid_exception.SessionLifetimeInMinutesInvalidException: <p>The number of minutes specified for the lifetime of a session isn't valid. The session lifetime must be 15-600 minutes.</p>
        capo_quicksight.errors.throttling_exception.ThrottlingException: <p>Access is throttled.</p>
        capo_quicksight.errors.unsupported_pricing_plan_exception.UnsupportedPricingPlanException: <p>This error indicates that you are calling an embedding operation in Amazon Quick Sight without the required pricing plan on your Amazon Web Services account. Before you can use embedding for anonymous users, a Quick Suite administrator needs to add capacity pricing to Quick Sight. You can do this on the <b>Manage Quick Suite</b> page. </p> <p>After capacity pricing is added, you can use the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GetDashboardEmbedUrl.html">GetDashboardEmbedUrl</a> </code> API operation with the <code>--identity-type ANONYMOUS</code> option.</p>
        capo_quicksight.errors.unsupported_user_edition_exception.UnsupportedUserEditionException: <p>This error indicates that you are calling an operation on an Amazon Quick Suite subscription where the edition doesn't include support for that operation. Amazon Quick Suite currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition.</p>
        capo_quicksight.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_quicksight.types.generate_embed_url_for_registered_user_with_identity_request.GenerateEmbedUrlForRegisteredUserWithIdentityRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.generate_embed_url_for_registered_user_with_identity_response.GenerateEmbedUrlForRegisteredUserWithIdentityResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.generate_embed_url_for_registered_user_with_identity

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

    def _redact_output(
        output: "capo_quicksight.types.generate_embed_url_for_registered_user_with_identity_response.GenerateEmbedUrlForRegisteredUserWithIdentityResponse",
    ) -> dict[str, Any]:
        import capo_quicksight.types.generate_embed_url_for_registered_user_with_identity_response

        return capo_quicksight.types.generate_embed_url_for_registered_user_with_identity_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GenerateEmbedUrlForRegisteredUserWithIdentity",
            redact_output=_redact_output,
        ),
    )
    input_: capo_quicksight.types.generate_embed_url_for_registered_user_with_identity_request.GenerateEmbedUrlForRegisteredUserWithIdentityRequest = {
        "aws_account_id": aws_account_id,
        "experience_configuration": experience_configuration,
    }
    if session_lifetime_in_minutes is not None:
        input_["session_lifetime_in_minutes"] = session_lifetime_in_minutes
    if allowed_domains is not None:
        input_["allowed_domains"] = allowed_domains

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