themes
Creates, updates, deletes, gets or lists a themes resource.
Overview
| Name | themes |
| Type | Resource |
| Id | aws.amplifyuibuilder.themes |
Fields
The following fields are returned by SELECT queries:
- get_theme
- list_themes
| Name | Datatype | Description |
|---|---|---|
id | string | The ID for the theme. |
name | string | The name of the theme. |
app_id | string | The unique ID for the Amplify app associated with the theme. |
created_at | string (date-time) | The time that the theme was created. |
environment_name | string | The name of the backend environment that is a part of the Amplify app. |
modified_at | string (date-time) | The time that the theme was modified. |
overrides | array | Describes the properties that can be overriden to customize a theme. |
tags | object | One or more key-value pairs to use when tagging the theme. |
values | array | A list of key-value pairs that defines the properties of the theme. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the theme. |
name | string | The name of the theme. |
app_id | string | The unique ID for the app associated with the theme summary. |
environment_name | string | The name of the backend environment that is part of the Amplify app. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_theme | select | app_id, environment_name, id, region | Returns an existing theme for an Amplify app. | |
list_themes | select | app_id, environment_name, region | nextToken, maxResults | Retrieves a list of themes for a specified Amplify app and backend environment. |
create_theme | insert | app_id, environment_name, region, themeToCreate | clientToken | Creates a theme to apply to the components in an Amplify app. |
update_theme | update | app_id, environment_name, id, region, updatedTheme | clientToken | Updates an existing theme. |
delete_theme | delete | app_id, environment_name, id, region | Deletes a theme from an Amplify app. | |
export_themes | exec | app_id, environment_name, region | nextToken | Exports 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.
| Name | Datatype | Description |
|---|---|---|
app_id | string | The unique ID of the Amplify app to export the themes to. |
environment_name | string | The name of the backend environment that is part of the Amplify app. |
id | string | The unique ID of the theme to delete. |
region | string | AWS region (default: us-east-1) |
clientToken | string | The unique client token. |
maxResults | integer | The maximum number of theme results to return in the response. |
nextToken | string | The token to request the next page of results. |
SELECT examples
- get_theme
- list_themes
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
;
Retrieves a list of themes for a specified Amplify app and backend environment.
SELECT
id,
name,
app_id,
environment_name
FROM aws.amplifyuibuilder.themes
WHERE app_id = '{{ app_id }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_theme
- Manifest
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
;
# Description fields are for documentation purposes
- name: themes
props:
- name: app_id
value: "{{ app_id }}"
description: Required parameter for the themes resource.
- name: environment_name
value: "{{ environment_name }}"
description: Required parameter for the themes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the themes resource.
- name: themeToCreate
description: |
Represents all of the information that is required to create a theme.
value:
name: "{{ name }}"
values:
- key: "{{ key }}"
value:
value: "{{ value }}"
children:
- key: "{{ key }}"
value:
value: "{{ value }}"
children: "{{ children }}"
overrides:
- key: "{{ key }}"
value:
value: "{{ value }}"
children:
- key: "{{ key }}"
value:
value: "{{ value }}"
children: "{{ children }}"
tags: "{{ tags }}"
- name: clientToken
value: "{{ clientToken }}"
description: The unique client token.
description: The unique client token.
UPDATE examples
- update_theme
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
- delete_theme
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
- export_themes
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 }}'
;