updateTemplateAlias method
Updates the template alias of a template.
May throw ThrottlingException. May throw ResourceNotFoundException. May throw ConflictException. May throw UnsupportedUserEditionException. May throw ConflictException. May throw InternalFailureException.
Parameter aliasName
:
The alias of the template that you want to update. If you name a specific
alias, you update the version that the alias points to. You can specify
the latest version of the template by providing the keyword
$LATEST
in the AliasName
parameter. The keyword
$PUBLISHED
doesn't apply to templates.
Parameter awsAccountId
:
The ID of the AWS account that contains the template alias that you're
updating.
Parameter templateId
:
The ID for the template.
Parameter templateVersionNumber
:
The version number of the template.
Implementation
Future<UpdateTemplateAliasResponse> updateTemplateAlias({
required String aliasName,
required String awsAccountId,
required String templateId,
required int templateVersionNumber,
}) 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(templateId, 'templateId');
_s.validateStringLength(
'templateId',
templateId,
1,
2048,
isRequired: true,
);
ArgumentError.checkNotNull(templateVersionNumber, 'templateVersionNumber');
_s.validateNumRange(
'templateVersionNumber',
templateVersionNumber,
1,
1152921504606846976,
isRequired: true,
);
final $payload = <String, dynamic>{
'TemplateVersionNumber': templateVersionNumber,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/templates/${Uri.encodeComponent(templateId)}/aliases/${Uri.encodeComponent(aliasName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateTemplateAliasResponse.fromJson(response);
}