CreateTheme - AmplifyUIBuilder

CreateTheme

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

Request Syntax

POST /app/appId/environment/environmentName/themes?clientToken=clientToken HTTP/1.1 Content-type: application/json { "name": "string", "overrides": [ { "key": "string", "value": { "children": [ "ThemeValues" ], "value": "string" } } ], "tags": { "string" : "string" }, "values": [ { "key": "string", "value": { "children": [ "ThemeValues" ], "value": "string" } } ] }

URI Request Parameters

The request uses the following URI parameters.

appId

The unique ID of the Amplify app associated with the theme.

Required: Yes

clientToken

The unique client token.

environmentName

The name of the backend environment that is a part of the Amplify app.

Required: Yes

Request Body

The request accepts the following data in JSON format.

name

The name of the theme.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: Yes

overrides

Describes the properties that can be overriden to customize an instance of the theme.

Type: Array of ThemeValues objects

Required: No

tags

One or more key-value pairs to use when tagging the theme data.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: (?!aws:)[a-zA-Z+-=._:/]+

Value Length Constraints: Minimum length of 1. Maximum length of 256.

Required: No

values

A list of key-value pairs that deļ¬nes the properties of the theme.

Type: Array of ThemeValues objects

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "appId": "string", "createdAt": "string", "environmentName": "string", "id": "string", "modifiedAt": "string", "name": "string", "overrides": [ { "key": "string", "value": { "children": [ "ThemeValues" ], "value": "string" } } ], "tags": { "string" : "string" }, "values": [ { "key": "string", "value": { "children": [ "ThemeValues" ], "value": "string" } } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

appId

The unique ID for the Amplify app associated with the theme.

Type: String

createdAt

The time that the theme was created.

Type: Timestamp

environmentName

The name of the backend environment that is a part of the Amplify app.

Type: String

id

The ID for the theme.

Type: String

modifiedAt

The time that the theme was modified.

Type: Timestamp

name

The name of the theme.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

overrides

Describes the properties that can be overriden to customize a theme.

Type: Array of ThemeValues objects

tags

One or more key-value pairs to use when tagging the theme.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: (?!aws:)[a-zA-Z+-=._:/]+

Value Length Constraints: Minimum length of 1. Maximum length of 256.

values

A list of key-value pairs that defines the properties of the theme.

Type: Array of ThemeValues objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

An internal error has occurred. Please retry your request.

HTTP Status Code: 500

InvalidParameterException

An invalid or out-of-range value was supplied for the input parameter.

HTTP Status Code: 400

ResourceConflictException

The resource specified in the request conflicts with an existing resource.

HTTP Status Code: 409

ServiceQuotaExceededException

You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your AWS account.

HTTP Status Code: 402

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: