Skip to content

Amazon Quick Suite - Setting Background Color for Text Boxes from CloudFormation

0

When you create a text box in an Amazon Quick Suite Analysis using the console, you can then then format the text box to set the background color.

Enter image description here

If you then use the CLI command to describe-analysis-definition (In YAML) to get this information out (to use in CloudFormation to create your analysis as IaC, you get the following CF snippet:

          TextBoxes:
          - Content: "<text-box>\n  <block align=\"center\">\n    <inline background-color=\"#ff0000\">\n
              \     <b>Example Text Box</b>\n    </inline>\n  </block>\n</text-box>"

When you create the Analysis using this CloudFormation snipped you get the following Analysis view:

Enter image description here

Is there anyway to define this text-box information in the HTML embedded within CloudFormation to be able to define this as you deploy your Analysis?

1 Answer
-1

Yes, you can define the background color for text boxes in Amazon QuickSight using HTML-like markup embedded within your CloudFormation template.

As shown in your example, the background color is defined using the background-color attribute within the <inline> tag in the Content property of the SheetTextBox. The format follows this pattern:

<text-box>
<block align="center">
<inline background-color="#ff0000">
<b>Example Text Box</b>
</inline>
</block>
</text-box>

When creating a QuickSight Analysis or Template using CloudFormation, you can include this HTML-like markup in the Content property of the SheetTextBox. The Content property accepts a string with a maximum length of 150,000 characters, giving you plenty of room to define complex text formatting.

To implement this in your CloudFormation template, include the TextBoxes section with the properly formatted Content property. The SheetTextBoxId is required and must be unique within the context of your analysis or template.

This approach allows you to define text box styling, including background colors, as part of your Infrastructure as Code deployment.
Sources
AWS::QuickSight::Analysis SheetTextBox - AWS CloudFormation
AWS::QuickSight::Template SheetTextBox - AWS CloudFormation

answered 7 days ago
  • This does not answer the initial question. This provides the 'red' background color for the text, but not the 'green' background color for the text-box.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.