createThemeAlias method

Future<CreateThemeAliasResponse> createThemeAlias({
  1. required String aliasName,
  2. required String awsAccountId,
  3. required String themeId,
  4. required int themeVersionNumber,
})

Creates a theme alias for a theme.

May throw ConflictException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException. May throw InternalFailureException.

Parameter aliasName : The name that you want to give to the theme alias that you are creating. The alias name can't begin with a $. Alias names that start with $ are reserved by Amazon QuickSight.

Parameter awsAccountId : The ID of the AWS account that contains the theme for the new theme alias.

Parameter themeId : An ID for the theme alias.

Parameter themeVersionNumber : The version number of the theme.

Implementation

Future<CreateThemeAliasResponse> createThemeAlias({
  required String aliasName,
  required String awsAccountId,
  required String themeId,
  required int themeVersionNumber,
}) async {
  ArgumentError.checkNotNull(aliasName, 'aliasName');
  _s.validateStringLength(
    'aliasName',
    aliasName,
    1,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(themeId, 'themeId');
  _s.validateStringLength(
    'themeId',
    themeId,
    1,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(themeVersionNumber, 'themeVersionNumber');
  _s.validateNumRange(
    'themeVersionNumber',
    themeVersionNumber,
    1,
    1152921504606846976,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'ThemeVersionNumber': themeVersionNumber,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/themes/${Uri.encodeComponent(themeId)}/aliases/${Uri.encodeComponent(aliasName)}',
    exceptionFnMap: _exceptionFns,
  );
  return CreateThemeAliasResponse.fromJson(response);
}