Skip to content

create_account_customization async

create_account_customization(
    aws_account_id: AwsAccountId,
    account_customization: AccountCustomization,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    namespace: Optional[Namespace] = None,
    tags: Optional[TagList] = None,
) -> CreateAccountCustomizationResponse

Creates Amazon Quick Sight customizations. Currently, you can add a custom default theme by using the CreateAccountCustomization or UpdateAccountCustomization API operation. To further customize Amazon Quick Sight by removing Amazon Quick Sight sample assets and videos for all new users, see Customizing Quick Sight in the Amazon Quick Sight User Guide.

You can create customizations for your Amazon Web Services account or, if you specify a namespace, for a Quick Sight namespace instead. Customizations that apply to a namespace always override customizations that apply to an Amazon Web Services account. To find out which customizations apply, use the DescribeAccountCustomization API operation.

Before you use the CreateAccountCustomization API operation to add a theme as the namespace default, make sure that you first share the theme with the namespace. If you don't share it with the namespace, the theme isn't visible to your users even if you make it the default theme. To check if the theme is shared, view the current permissions by using the DescribeThemePermissions API operation. To share the theme, grant permissions by using the UpdateThemePermissions API operation.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID for the Amazon Web Services account that you want to customize Quick Sight for.

  • namespace (Optional[Namespace], default: None ) –

    The Quick Sight namespace that you want to add customizations to.

  • account_customization (AccountCustomization) –

    The Quick Sight customizations you're adding. You can add these to an Amazon Web Services account and a QuickSight namespace.

    For example, you can add a default theme by setting AccountCustomization to the midnight theme: "AccountCustomization": { "DefaultTheme": "arn:aws:quicksight::aws:theme/MIDNIGHT" }. Or, you can add a custom theme by specifying "AccountCustomization": { "DefaultTheme": "arn:aws:quicksight:us-west-2:111122223333:theme/bdb844d0-0fe9-4d9d-b520-0fe602d93639" }.

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

    A list of the tags that you want to attach to this resource.

Raises:

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def create_account_customization(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    account_customization: "capo_quicksight.types.account_customization.AccountCustomization",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    namespace: Optional["capo_quicksight.types.namespace.Namespace"] = None,
    tags: Optional["capo_quicksight.types.tag_list.TagList"] = None,
) -> "capo_quicksight.types.create_account_customization_response.CreateAccountCustomizationResponse":
    """<p>Creates Amazon Quick Sight customizations. Currently, you can add a custom default theme by using the <code>CreateAccountCustomization</code> or <code>UpdateAccountCustomization</code> API operation. To further customize Amazon Quick Sight by removing Amazon Quick Sight sample assets and videos for all new users, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/customizing-quicksight.html">Customizing Quick Sight</a> in the <i>Amazon Quick Sight User Guide.</i> </p> <p>You can create customizations for your Amazon Web Services account or, if you specify a namespace, for a Quick Sight namespace instead. Customizations that apply to a namespace always override customizations that apply to an Amazon Web Services account. To find out which customizations apply, use the <code>DescribeAccountCustomization</code> API operation.</p> <p>Before you use the <code>CreateAccountCustomization</code> API operation to add a theme as the namespace default, make sure that you first share the theme with the namespace. If you don't share it with the namespace, the theme isn't visible to your users even if you make it the default theme. To check if the theme is shared, view the current permissions by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeThemePermissions.html">DescribeThemePermissions</a> </code> API operation. To share the theme, grant permissions by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateThemePermissions.html">UpdateThemePermissions</a> </code> API operation. </p>

    Args:
        aws_account_id: <p>The ID for the Amazon Web Services account that you want to customize Quick Sight for.</p>
        namespace: <p>The Quick Sight namespace that you want to add customizations to.</p>
        account_customization: <p>The Quick Sight customizations you're adding. You can add these to an Amazon Web Services account and a QuickSight namespace. </p> <p>For example, you can add a default theme by setting <code>AccountCustomization</code> to the midnight theme: <code>"AccountCustomization": { "DefaultTheme": "arn:aws:quicksight::aws:theme/MIDNIGHT" }</code>. Or, you can add a custom theme by specifying <code>"AccountCustomization": { "DefaultTheme": "arn:aws:quicksight:us-west-2:111122223333:theme/bdb844d0-0fe9-4d9d-b520-0fe602d93639" }</code>. </p>
        tags: <p>A list of the tags that you want to attach to this resource.</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.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_customization_request.CreateAccountCustomizationRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.create_account_customization_response.CreateAccountCustomizationResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.create_account_customization

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAccountCustomization")
    )
    input_: capo_quicksight.types.create_account_customization_request.CreateAccountCustomizationRequest = {
        "aws_account_id": aws_account_id,
        "account_customization": account_customization,
    }
    if namespace is not None:
        input_["namespace"] = namespace
    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