Skip to content

create_account_subscription async

create_account_subscription(
    authentication_method: AuthenticationMethodOption,
    aws_account_id: AwsAccountId,
    account_name: AccountName,
    notification_email: String,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    edition: Optional[Edition] = None,
    active_directory_name: Optional[String] = None,
    realm: Optional[String] = None,
    directory_id: Optional[String] = None,
    admin_group: Optional[GroupsList] = None,
    author_group: Optional[GroupsList] = None,
    reader_group: Optional[GroupsList] = None,
    admin_pro_group: Optional[GroupsList] = None,
    author_pro_group: Optional[GroupsList] = None,
    reader_pro_group: Optional[GroupsList] = None,
    first_name: Optional[String] = None,
    last_name: Optional[String] = None,
    email_address: Optional[String] = None,
    contact_number: Optional[String] = None,
    iam_identity_center_instance_arn: Optional[String] = None,
) -> CreateAccountSubscriptionResponse

Creates an Amazon Quick Sight account, or subscribes to Amazon Quick Sight Q.

The Amazon Web Services Region for the account is derived from what is configured in the CLI or SDK.

Before you use this operation, make sure that you can connect to an existing Amazon Web Services account. If you don't have an Amazon Web Services account, see Sign up for Amazon Web Services in the Amazon Quick Sight User Guide. The person who signs up for Amazon Quick Sight needs to have the correct Identity and Access Management (IAM) permissions. For more information, see IAM Policy Examples for Amazon Quick Sight in the Amazon Quick Sight User Guide.

If your IAM policy includes both the Subscribe and CreateAccountSubscription actions, make sure that both actions are set to Allow. If either action is set to Deny, the Deny action prevails and your API call fails.

You can't pass an existing IAM role to access other Amazon Web Services services using this API operation. To pass your existing IAM role to Amazon Quick Sight, see Passing IAM roles to Amazon Quick Sight in the Amazon Quick Sight User Guide.

You can't set default resource access on the new account from the Amazon Quick Sight API. Instead, add default resource access from the Amazon Quick Sight console. For more information about setting default resource access to Amazon Web Services services, see Setting default resource access to Amazon Web Services services in the Amazon Quick Sight User Guide.

Parameters:

  • edition (Optional[Edition], default: None ) –

    The edition of Amazon Quick Sight that you want your account to have. Currently, you can choose from ENTERPRISE or ENTERPRISE_AND_Q.

    If you choose ENTERPRISE_AND_Q, the following parameters are required:

    • FirstName

    • LastName

    • EmailAddress

    • ContactNumber

  • authentication_method (AuthenticationMethodOption) –

    The method that you want to use to authenticate your Quick Sight account.

    If you choose ACTIVE_DIRECTORY, provide an ActiveDirectoryName and an AdminGroup associated with your Active Directory.

    If you choose IAM_IDENTITY_CENTER, provide an AdminGroup associated with your IAM Identity Center account.

  • aws_account_id (AwsAccountId) –

    The Amazon Web Services account ID of the account that you're using to create your Quick Sight account.

  • account_name (AccountName) –

    The name of your Amazon Quick Sight account. This name is unique over all of Amazon Web Services, and it appears only when users sign in. You can't change AccountName value after the Amazon Quick Sight account is created.

  • notification_email (String) –

    The email address that you want Quick Sight to send notifications to regarding your Quick Sight account or Quick Sight subscription.

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

    The name of your Active Directory. This field is required if ACTIVE_DIRECTORY is the selected authentication method of the new Quick Sight account.

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

    The realm of the Active Directory that is associated with your Quick Sight account. This field is required if ACTIVE_DIRECTORY is the selected authentication method of the new Quick Sight account.

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

    The ID of the Active Directory that is associated with your Quick Sight account.

  • admin_group (Optional[GroupsList], default: None ) –

    The admin group associated with your Active Directory or IAM Identity Center account. Either this field or the AdminProGroup field is required if ACTIVE_DIRECTORY or IAM_IDENTITY_CENTER is the selected authentication method of the new Quick Sight account.

    For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.

  • author_group (Optional[GroupsList], default: None ) –

    The author group associated with your Active Directory or IAM Identity Center account.

    For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.

  • reader_group (Optional[GroupsList], default: None ) –

    The reader group associated with your Active Directory or IAM Identity Center account.

    For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.

  • admin_pro_group (Optional[GroupsList], default: None ) –

    The admin pro group associated with your Active Directory or IAM Identity Center account. Either this field or the AdminGroup field is required if ACTIVE_DIRECTORY or IAM_IDENTITY_CENTER is the selected authentication method of the new Quick Sight account.

    For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.

  • author_pro_group (Optional[GroupsList], default: None ) –

    The author pro group associated with your Active Directory or IAM Identity Center account.

    For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.

  • reader_pro_group (Optional[GroupsList], default: None ) –

    The reader pro group associated with your Active Directory or IAM Identity Center account.

    For more information about using IAM Identity Center in Amazon Quick Sight, see Using IAM Identity Center with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see Using Active Directory with Amazon Quick Sight Enterprise Edition in the Amazon Quick Sight User Guide.

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

    The first name of the author of the Amazon Quick Sight account to use for future communications. This field is required if ENTERPPRISE_AND_Q is the selected edition of the new Amazon Quick Sight account.

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

    The last name of the author of the Amazon Quick Sight account to use for future communications. This field is required if ENTERPPRISE_AND_Q is the selected edition of the new Amazon Quick Sight account.

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

    The email address of the author of the Amazon Quick Sight account to use for future communications. This field is required if ENTERPPRISE_AND_Q is the selected edition of the new Amazon Quick Sight account.

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

    A 10-digit phone number for the author of the Amazon Quick Sight account to use for future communications. This field is required if ENTERPPRISE_AND_Q is the selected edition of the new Amazon Quick Sight account.

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

    The Amazon Resource Name (ARN) for the IAM Identity Center instance.

Raises:

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def create_account_subscription(
    self,
    authentication_method: "capo_quicksight.types.authentication_method_option.AuthenticationMethodOption",
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    account_name: "capo_quicksight.types.account_name.AccountName",
    notification_email: "capo_quicksight.types.string.String",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    edition: Optional["capo_quicksight.types.edition.Edition"] = None,
    active_directory_name: Optional["capo_quicksight.types.string.String"] = None,
    realm: Optional["capo_quicksight.types.string.String"] = None,
    directory_id: Optional["capo_quicksight.types.string.String"] = None,
    admin_group: Optional["capo_quicksight.types.groups_list.GroupsList"] = None,
    author_group: Optional["capo_quicksight.types.groups_list.GroupsList"] = None,
    reader_group: Optional["capo_quicksight.types.groups_list.GroupsList"] = None,
    admin_pro_group: Optional[
        "capo_quicksight.types.groups_list.GroupsList"
    ] = None,
    author_pro_group: Optional[
        "capo_quicksight.types.groups_list.GroupsList"
    ] = None,
    reader_pro_group: Optional[
        "capo_quicksight.types.groups_list.GroupsList"
    ] = None,
    first_name: Optional["capo_quicksight.types.string.String"] = None,
    last_name: Optional["capo_quicksight.types.string.String"] = None,
    email_address: Optional["capo_quicksight.types.string.String"] = None,
    contact_number: Optional["capo_quicksight.types.string.String"] = None,
    iam_identity_center_instance_arn: Optional[
        "capo_quicksight.types.string.String"
    ] = None,
) -> "capo_quicksight.types.create_account_subscription_response.CreateAccountSubscriptionResponse":
    """<p>Creates an Amazon Quick Sight account, or subscribes to Amazon Quick Sight Q.</p> <p>The Amazon Web Services Region for the account is derived from what is configured in the CLI or SDK.</p> <p>Before you use this operation, make sure that you can connect to an existing Amazon Web Services account. If you don't have an Amazon Web Services account, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/setting-up-aws-sign-up.html">Sign up for Amazon Web Services</a> in the <i>Amazon Quick Sight User Guide</i>. The person who signs up for Amazon Quick Sight needs to have the correct Identity and Access Management (IAM) permissions. For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/iam-policy-examples.html">IAM Policy Examples for Amazon Quick Sight</a> in the <i>Amazon Quick Sight User Guide</i>.</p> <p>If your IAM policy includes both the <code>Subscribe</code> and <code>CreateAccountSubscription</code> actions, make sure that both actions are set to <code>Allow</code>. If either action is set to <code>Deny</code>, the <code>Deny</code> action prevails and your API call fails.</p> <p>You can't pass an existing IAM role to access other Amazon Web Services services using this API operation. To pass your existing IAM role to Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/security_iam_service-with-iam.html#security-create-iam-role">Passing IAM roles to Amazon Quick Sight</a> in the <i>Amazon Quick Sight User Guide</i>.</p> <p>You can't set default resource access on the new account from the Amazon Quick Sight API. Instead, add default resource access from the Amazon Quick Sight console. For more information about setting default resource access to Amazon Web Services services, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/scoping-policies-defaults.html">Setting default resource access to Amazon Web Services services</a> in the <i>Amazon Quick Sight User Guide</i>.</p>

    Args:
        edition: <p>The edition of Amazon Quick Sight that you want your account to have. Currently, you can choose from <code>ENTERPRISE</code> or <code>ENTERPRISE_AND_Q</code>.</p> <p>If you choose <code>ENTERPRISE_AND_Q</code>, the following parameters are required:</p> <ul> <li> <p> <code>FirstName</code> </p> </li> <li> <p> <code>LastName</code> </p> </li> <li> <p> <code>EmailAddress</code> </p> </li> <li> <p> <code>ContactNumber</code> </p> </li> </ul>
        authentication_method: <p>The method that you want to use to authenticate your Quick Sight account.</p> <p>If you choose <code>ACTIVE_DIRECTORY</code>, provide an <code>ActiveDirectoryName</code> and an <code>AdminGroup</code> associated with your Active Directory.</p> <p>If you choose <code>IAM_IDENTITY_CENTER</code>, provide an <code>AdminGroup</code> associated with your IAM Identity Center account.</p>
        aws_account_id: <p>The Amazon Web Services account ID of the account that you're using to create your Quick Sight account.</p>
        account_name: <p>The name of your Amazon Quick Sight account. This name is unique over all of Amazon Web Services, and it appears only when users sign in. You can't change <code>AccountName</code> value after the Amazon Quick Sight account is created.</p>
        notification_email: <p>The email address that you want Quick Sight to send notifications to regarding your Quick Sight account or Quick Sight subscription.</p>
        active_directory_name: <p>The name of your Active Directory. This field is required if <code>ACTIVE_DIRECTORY</code> is the selected authentication method of the new Quick Sight account.</p>
        realm: <p>The realm of the Active Directory that is associated with your Quick Sight account. This field is required if <code>ACTIVE_DIRECTORY</code> is the selected authentication method of the new Quick Sight account.</p>
        directory_id: <p>The ID of the Active Directory that is associated with your Quick Sight account.</p>
        admin_group: <p>The admin group associated with your Active Directory or IAM Identity Center account. Either this field or the <code>AdminProGroup</code> field is required if <code>ACTIVE_DIRECTORY</code> or <code>IAM_IDENTITY_CENTER</code> is the selected authentication method of the new Quick Sight account.</p> <p>For more information about using IAM Identity Center in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html">Using IAM Identity Center with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html">Using Active Directory with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide.</p>
        author_group: <p>The author group associated with your Active Directory or IAM Identity Center account.</p> <p>For more information about using IAM Identity Center in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html">Using IAM Identity Center with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html">Using Active Directory with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide.</p>
        reader_group: <p>The reader group associated with your Active Directory or IAM Identity Center account.</p> <p>For more information about using IAM Identity Center in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html">Using IAM Identity Center with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html">Using Active Directory with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide.</p>
        admin_pro_group: <p>The admin pro group associated with your Active Directory or IAM Identity Center account. Either this field or the <code>AdminGroup</code> field is required if <code>ACTIVE_DIRECTORY</code> or <code>IAM_IDENTITY_CENTER</code> is the selected authentication method of the new Quick Sight account.</p> <p>For more information about using IAM Identity Center in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html">Using IAM Identity Center with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html">Using Active Directory with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide.</p>
        author_pro_group: <p>The author pro group associated with your Active Directory or IAM Identity Center account.</p> <p>For more information about using IAM Identity Center in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html">Using IAM Identity Center with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html">Using Active Directory with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide.</p>
        reader_pro_group: <p>The reader pro group associated with your Active Directory or IAM Identity Center account.</p> <p>For more information about using IAM Identity Center in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/sec-identity-management-identity-center.html">Using IAM Identity Center with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide. For more information about using Active Directory in Amazon Quick Sight, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/aws-directory-service.html">Using Active Directory with Amazon Quick Sight Enterprise Edition</a> in the Amazon Quick Sight User Guide.</p>
        first_name: <p>The first name of the author of the Amazon Quick Sight account to use for future communications. This field is required if <code>ENTERPPRISE_AND_Q</code> is the selected edition of the new Amazon Quick Sight account.</p>
        last_name: <p>The last name of the author of the Amazon Quick Sight account to use for future communications. This field is required if <code>ENTERPPRISE_AND_Q</code> is the selected edition of the new Amazon Quick Sight account.</p>
        email_address: <p>The email address of the author of the Amazon Quick Sight account to use for future communications. This field is required if <code>ENTERPPRISE_AND_Q</code> is the selected edition of the new Amazon Quick Sight account.</p>
        contact_number: <p>A 10-digit phone number for the author of the Amazon Quick Sight account to use for future communications. This field is required if <code>ENTERPPRISE_AND_Q</code> is the selected edition of the new Amazon Quick Sight account.</p>
        iam_identity_center_instance_arn: <p>The Amazon Resource Name (ARN) for the IAM Identity Center instance.</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.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</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.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.create_account_subscription_request.CreateAccountSubscriptionRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.create_account_subscription_response.CreateAccountSubscriptionResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.create_account_subscription

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAccountSubscription")
    )
    input_: capo_quicksight.types.create_account_subscription_request.CreateAccountSubscriptionRequest = {
        "authentication_method": authentication_method,
        "aws_account_id": aws_account_id,
        "account_name": account_name,
        "notification_email": notification_email,
    }
    if edition is not None:
        input_["edition"] = edition
    if active_directory_name is not None:
        input_["active_directory_name"] = active_directory_name
    if realm is not None:
        input_["realm"] = realm
    if directory_id is not None:
        input_["directory_id"] = directory_id
    if admin_group is not None:
        input_["admin_group"] = admin_group
    if author_group is not None:
        input_["author_group"] = author_group
    if reader_group is not None:
        input_["reader_group"] = reader_group
    if admin_pro_group is not None:
        input_["admin_pro_group"] = admin_pro_group
    if author_pro_group is not None:
        input_["author_pro_group"] = author_pro_group
    if reader_pro_group is not None:
        input_["reader_pro_group"] = reader_pro_group
    if first_name is not None:
        input_["first_name"] = first_name
    if last_name is not None:
        input_["last_name"] = last_name
    if email_address is not None:
        input_["email_address"] = email_address
    if contact_number is not None:
        input_["contact_number"] = contact_number
    if iam_identity_center_instance_arn is not None:
        input_["iam_identity_center_instance_arn"] = (
            iam_identity_center_instance_arn
        )

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