CodeCommit / Client / associate_approval_rule_template_with_repository

associate_approval_rule_template_with_repository#

CodeCommit.Client.associate_approval_rule_template_with_repository(**kwargs)#

Creates an association between an approval rule template and a specified repository. Then, the next time a pull request is created in the repository where the destination reference (if specified) matches the destination reference (branch) for the pull request, an approval rule that matches the template conditions is automatically created for that pull request. If no destination references are specified in the template, an approval rule that matches the template contents is created for all pull requests in that repository.

See also: AWS API Documentation

Request Syntax

response = client.associate_approval_rule_template_with_repository(
    approvalRuleTemplateName='string',
    repositoryName='string'
)
Parameters:
  • approvalRuleTemplateName (string) –

    [REQUIRED]

    The name for the approval rule template.

  • repositoryName (string) –

    [REQUIRED]

    The name of the repository that you want to associate with the template.

Returns:

None

Exceptions

  • CodeCommit.Client.exceptions.ApprovalRuleTemplateNameRequiredException

  • CodeCommit.Client.exceptions.InvalidApprovalRuleTemplateNameException

  • CodeCommit.Client.exceptions.ApprovalRuleTemplateDoesNotExistException

  • CodeCommit.Client.exceptions.MaximumRuleTemplatesAssociatedWithRepositoryException

  • CodeCommit.Client.exceptions.RepositoryNameRequiredException

  • CodeCommit.Client.exceptions.InvalidRepositoryNameException

  • CodeCommit.Client.exceptions.RepositoryDoesNotExistException

  • CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException

  • CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException

  • CodeCommit.Client.exceptions.EncryptionKeyDisabledException

  • CodeCommit.Client.exceptions.EncryptionKeyNotFoundException

  • CodeCommit.Client.exceptions.EncryptionKeyUnavailableException