Skip to main content

themes

Creates, updates, deletes, gets or lists a themes resource.

Overview

Namethemes
TypeResource
Idaws.amplifyuibuilder.themes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID for the theme.
namestringThe name of the theme.
app_idstringThe unique ID for the Amplify app associated with the theme.
created_atstring (date-time)The time that the theme was created.
environment_namestringThe name of the backend environment that is a part of the Amplify app.
modified_atstring (date-time)The time that the theme was modified.
overridesarrayDescribes the properties that can be overriden to customize a theme.
tagsobjectOne or more key-value pairs to use when tagging the theme.
valuesarrayA list of key-value pairs that defines the properties of the theme.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_themeselectapp_id, environment_name, id, regionReturns an existing theme for an Amplify app.
list_themesselectapp_id, environment_name, regionnextToken, maxResultsRetrieves a list of themes for a specified Amplify app and backend environment.
create_themeinsertapp_id, environment_name, region, themeToCreateclientTokenCreates a theme to apply to the components in an Amplify app.
update_themeupdateapp_id, environment_name, id, region, updatedThemeclientTokenUpdates an existing theme.
delete_themedeleteapp_id, environment_name, id, regionDeletes a theme from an Amplify app.
export_themesexecapp_id, environment_name, regionnextTokenExports theme configurations to code that is ready to integrate into an Amplify app.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
app_idstringThe unique ID of the Amplify app to export the themes to.
environment_namestringThe name of the backend environment that is part of the Amplify app.
idstringThe unique ID of the theme to delete.
regionstringAWS region (default: us-east-1)
clientTokenstringThe unique client token.
maxResultsintegerThe maximum number of theme results to return in the response.
nextTokenstringThe token to request the next page of results.

SELECT examples

Returns an existing theme for an Amplify app.

SELECT
id,
name,
app_id,
created_at,
environment_name,
modified_at,
overrides,
tags,
values
FROM aws.amplifyuibuilder.themes
WHERE app_id = '{{ app_id }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a theme to apply to the components in an Amplify app.

INSERT INTO aws.amplifyuibuilder.themes (
themeToCreate,
app_id,
environment_name,
region,
clientToken
)
SELECT
'{{ themeToCreate }}' /* required */,
'{{ app_id }}',
'{{ environment_name }}',
'{{ region }}',
'{{ clientToken }}'
RETURNING
entity
;

UPDATE examples

Updates an existing theme.

UPDATE aws.amplifyuibuilder.themes
SET
updatedTheme = '{{ updatedTheme }}'
WHERE
app_id = '{{ app_id }}' --required
AND environment_name = '{{ environment_name }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND updatedTheme = '{{ updatedTheme }}' --required
AND clientToken = '{{ clientToken}}'
RETURNING
entity;

DELETE examples

Deletes a theme from an Amplify app.

DELETE FROM aws.amplifyuibuilder.themes
WHERE app_id = '{{ app_id }}' --required
AND environment_name = '{{ environment_name }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Exports theme configurations to code that is ready to integrate into an Amplify app.

EXEC aws.amplifyuibuilder.themes.export_themes
@app_id='{{ app_id }}' --required,
@environment_name='{{ environment_name }}' --required,
@region='{{ region }}' --required,
@nextToken='{{ nextToken }}'
;