updateApprovalRuleTemplateDescription method
Updates the description for a specified approval rule template.
May throw InvalidApprovalRuleTemplateNameException. May throw ApprovalRuleTemplateNameRequiredException. May throw ApprovalRuleTemplateDoesNotExistException. May throw InvalidApprovalRuleTemplateDescriptionException.
Parameter approvalRuleTemplateDescription
:
The updated description of the approval rule template.
Parameter approvalRuleTemplateName
:
The name of the template for which you want to update the description.
Implementation
Future<UpdateApprovalRuleTemplateDescriptionOutput>
updateApprovalRuleTemplateDescription({
required String approvalRuleTemplateDescription,
required String approvalRuleTemplateName,
}) async {
ArgumentError.checkNotNull(
approvalRuleTemplateDescription, 'approvalRuleTemplateDescription');
_s.validateStringLength(
'approvalRuleTemplateDescription',
approvalRuleTemplateDescription,
0,
1000,
isRequired: true,
);
ArgumentError.checkNotNull(
approvalRuleTemplateName, 'approvalRuleTemplateName');
_s.validateStringLength(
'approvalRuleTemplateName',
approvalRuleTemplateName,
1,
100,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'CodeCommit_20150413.UpdateApprovalRuleTemplateDescription'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'approvalRuleTemplateDescription': approvalRuleTemplateDescription,
'approvalRuleTemplateName': approvalRuleTemplateName,
},
);
return UpdateApprovalRuleTemplateDescriptionOutput.fromJson(
jsonResponse.body);
}