Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

update_approval_rule_template_content

update_approval_rule_template_content(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.update_approval_rule_template_content(
    approvalRuleTemplateName='string',
    newRuleContent='string',
    existingRuleContentSha256='string'
)
Parameters
  • approvalRuleTemplateName (string) --

    [REQUIRED]

    The name of the approval rule template where you want to update the content of the rule.

  • newRuleContent (string) --

    [REQUIRED]

    The content that replaces the existing content of the rule. Content statements must be complete. You cannot provide only the changes.

  • existingRuleContentSha256 (string) -- The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.
Return type

dict

Returns

Response Syntax

{
    'approvalRuleTemplate': {
        'approvalRuleTemplateId': 'string',
        'approvalRuleTemplateName': 'string',
        'approvalRuleTemplateDescription': 'string',
        'approvalRuleTemplateContent': 'string',
        'ruleContentSha256': 'string',
        'lastModifiedDate': datetime(2015, 1, 1),
        'creationDate': datetime(2015, 1, 1),
        'lastModifiedUser': 'string'
    }
}

Response Structure

  • (dict) --

    • approvalRuleTemplate (dict) --

      Returns information about an approval rule template.

      • approvalRuleTemplateId (string) --

        The system-generated ID of the approval rule template.

      • approvalRuleTemplateName (string) --

        The name of the approval rule template.

      • approvalRuleTemplateDescription (string) --

        The description of the approval rule template.

      • approvalRuleTemplateContent (string) --

        The content of the approval rule template.

      • ruleContentSha256 (string) --

        The SHA-256 hash signature for the content of the approval rule template.

      • lastModifiedDate (datetime) --

        The date the approval rule template was most recently changed, in timestamp format.

      • creationDate (datetime) --

        The date the approval rule template was created, in timestamp format.

      • lastModifiedUser (string) --

        The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.

Exceptions

  • CodeCommit.Client.exceptions.InvalidApprovalRuleTemplateNameException
  • CodeCommit.Client.exceptions.ApprovalRuleTemplateNameRequiredException
  • CodeCommit.Client.exceptions.ApprovalRuleTemplateDoesNotExistException
  • CodeCommit.Client.exceptions.InvalidApprovalRuleTemplateContentException
  • CodeCommit.Client.exceptions.InvalidRuleContentSha256Exception
  • CodeCommit.Client.exceptions.ApprovalRuleTemplateContentRequiredException