update_approval_rule_template_content
async
¶
update_approval_rule_template_content(
approval_rule_template_name: ApprovalRuleTemplateName,
new_rule_content: ApprovalRuleTemplateContent,
*,
config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
existing_rule_content_sha256: Optional[RuleContentSha256] = None,
) -> UpdateApprovalRuleTemplateContentOutput
Updates the content of an approval rule template. You can change the number of required approvals, the membership of the approval rule, and whether an approval pool is defined.
Parameters:
-
approval_rule_template_name(ApprovalRuleTemplateName) –The name of the approval rule template where you want to update the content of the rule.
-
new_rule_content(ApprovalRuleTemplateContent) –The content that replaces the existing content of the rule. Content statements must be complete. You cannot provide only the changes.
-
existing_rule_content_sha256(Optional[RuleContentSha256], default:None) –The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.
Raises:
-
ApprovalRuleTemplateContentRequiredException–The content for the approval rule template is empty. You must provide some content for an approval rule template. The content cannot be null.
-
ApprovalRuleTemplateDoesNotExistException–The specified approval rule template does not exist. Verify that the name is correct and that you are signed in to the Amazon Web Services Region where the template was created, and then try again.
-
ApprovalRuleTemplateNameRequiredException–An approval rule template name is required, but was not specified.
-
InvalidApprovalRuleTemplateContentException–The content of the approval rule template is not valid.
-
InvalidApprovalRuleTemplateNameException–The name of the approval rule template is not valid. Template names must be between 1 and 100 valid characters in length. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
-
InvalidRuleContentSha256Exception–The SHA-256 hash signature for the rule content is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.