describeTheme method

Future<DescribeThemeResponse> describeTheme({
  1. required String awsAccountId,
  2. required String themeId,
  3. String? aliasName,
  4. int? versionNumber,
})

Describes a theme.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the theme that you're describing.

Parameter themeId : The ID for the theme.

Parameter aliasName : The alias of the theme that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the theme by providing the keyword $LATEST in the AliasName parameter. The keyword $PUBLISHED doesn't apply to themes.

Parameter versionNumber : The version number for the version to describe. If a VersionNumber parameter value isn't provided, the latest version of the theme is described.

Implementation

Future<DescribeThemeResponse> describeTheme({
  required String awsAccountId,
  required String themeId,
  String? aliasName,
  int? versionNumber,
}) async {
  _s.validateNumRange(
    'versionNumber',
    versionNumber,
    1,
    1152921504606846976,
  );
  final $query = <String, List<String>>{
    if (aliasName != null) 'alias-name': [aliasName],
    if (versionNumber != null) 'version-number': [versionNumber.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/themes/${Uri.encodeComponent(themeId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeThemeResponse.fromJson(response);
}