Amazon CodeCommit Codecommit Approval Rule Template API
The Codecommit Approval Rule Template API from Amazon CodeCommit — 8 operation(s) for codecommit approval rule template.
The Codecommit Approval Rule Template API from Amazon CodeCommit — 8 operation(s) for codecommit approval rule template.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/amazon-codecommit:amazon-codecommit-approval-rule-template-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.1.0
info:
title: AWS CodeCommit Approval Rule Template API
version: '2015-04-13'
description: Generated from AWS's published Smithy model for AWS CodeCommit. 8 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://codecommit.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/#AssociateApprovalRuleTemplateWithRepository:
post:
operationId: AssociateApprovalRuleTemplateWithRepository
summary: Associate Approval Rule Template With Repository
description: 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.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
type: string
'400':
description: ApprovalRuleTemplateDoesNotExistException; ApprovalRuleTemplateNameRequiredException; EncryptionKeyAccessDeniedException;
EncryptionKeyDisabledException; EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidApprovalRuleTemplateNameException;
InvalidRepositoryNameException; MaximumRuleTemplatesAssociatedWithRepositoryException; RepositoryDoesNotExistException;
RepositoryNameRequiredException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ApprovalRuleTemplateDoesNotExistException'
'500':
description: EncryptionIntegrityChecksFailedException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/EncryptionIntegrityChecksFailedException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.AssociateApprovalRuleTemplateWithRepository
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/AssociateApprovalRuleTemplateWithRepositoryInput'
tags:
- Approval Rule Template
/#BatchAssociateApprovalRuleTemplateWithRepositories:
post:
operationId: BatchAssociateApprovalRuleTemplateWithRepositories
summary: Batch Associate Approval Rule Template With Repositories
description: Creates an association between an approval rule template and one or more specified repositories.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/BatchAssociateApprovalRuleTemplateWithRepositoriesOutput'
'400':
description: ApprovalRuleTemplateDoesNotExistException; ApprovalRuleTemplateNameRequiredException; EncryptionKeyAccessDeniedException;
EncryptionKeyDisabledException; EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidApprovalRuleTemplateNameException;
MaximumRepositoryNamesExceededException; RepositoryNamesRequiredException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ApprovalRuleTemplateDoesNotExistException'
'500':
description: EncryptionIntegrityChecksFailedException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/EncryptionIntegrityChecksFailedException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.BatchAssociateApprovalRuleTemplateWithRepositories
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/BatchAssociateApprovalRuleTemplateWithRepositoriesInput'
tags:
- Approval Rule Template
/#BatchDisassociateApprovalRuleTemplateFromRepositories:
post:
operationId: BatchDisassociateApprovalRuleTemplateFromRepositories
summary: Batch Disassociate Approval Rule Template From Repositories
description: Removes the association between an approval rule template and one or more specified repositories.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput'
'400':
description: ApprovalRuleTemplateDoesNotExistException; ApprovalRuleTemplateNameRequiredException; EncryptionKeyAccessDeniedException;
EncryptionKeyDisabledException; EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidApprovalRuleTemplateNameException;
MaximumRepositoryNamesExceededException; RepositoryNamesRequiredException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ApprovalRuleTemplateDoesNotExistException'
'500':
description: EncryptionIntegrityChecksFailedException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/EncryptionIntegrityChecksFailedException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.BatchDisassociateApprovalRuleTemplateFromRepositories
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/BatchDisassociateApprovalRuleTemplateFromRepositoriesInput'
tags:
- Approval Rule Template
/#CreateApprovalRuleTemplate:
post:
operationId: CreateApprovalRuleTemplate
summary: Create Approval Rule Template
description: Creates a template for approval rules that can then be associated with one or more repositories in your
Amazon Web Services account. When you associate a template with a repository, CodeCommit creates an approval rule
that matches the conditions of the template for all pull requests that meet the conditions of the template. For more
information, see AssociateApprovalRuleTemplateWithRepository.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/CreateApprovalRuleTemplateOutput'
'400':
description: ApprovalRuleTemplateContentRequiredException; ApprovalRuleTemplateNameAlreadyExistsException; ApprovalRuleTemplateNameRequiredException;
InvalidApprovalRuleTemplateContentException; InvalidApprovalRuleTemplateDescriptionException; InvalidApprovalRuleTemplateNameException;
NumberOfRuleTemplatesExceededException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ApprovalRuleTemplateContentRequiredException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.CreateApprovalRuleTemplate
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/CreateApprovalRuleTemplateInput'
tags:
- Approval Rule Template
/#DeleteApprovalRuleTemplate:
post:
operationId: DeleteApprovalRuleTemplate
summary: Delete Approval Rule Template
description: Deletes a specified approval rule template. Deleting a template does not remove approval rules on pull
requests already created with the template.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DeleteApprovalRuleTemplateOutput'
'400':
description: ApprovalRuleTemplateInUseException; ApprovalRuleTemplateNameRequiredException; InvalidApprovalRuleTemplateNameException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ApprovalRuleTemplateInUseException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.DeleteApprovalRuleTemplate
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DeleteApprovalRuleTemplateInput'
tags:
- Approval Rule Template
/#DisassociateApprovalRuleTemplateFromRepository:
post:
operationId: DisassociateApprovalRuleTemplateFromRepository
summary: Disassociate Approval Rule Template From Repository
description: Removes the association between a template and a repository so that approval rules based on the template
are not automatically created when pull requests are created in the specified repository. This does not delete any
approval rules previously created for pull requests through the template association.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
type: string
'400':
description: ApprovalRuleTemplateDoesNotExistException; ApprovalRuleTemplateNameRequiredException; EncryptionKeyAccessDeniedException;
EncryptionKeyDisabledException; EncryptionKeyNotFoundException; EncryptionKeyUnavailableException; InvalidApprovalRuleTemplateNameException;
InvalidRepositoryNameException; RepositoryDoesNotExistException; RepositoryNameRequiredException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ApprovalRuleTemplateDoesNotExistException'
'500':
description: EncryptionIntegrityChecksFailedException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/EncryptionIntegrityChecksFailedException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.DisassociateApprovalRuleTemplateFromRepository
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/DisassociateApprovalRuleTemplateFromRepositoryInput'
tags:
- Approval Rule Template
/#GetApprovalRuleTemplate:
post:
operationId: GetApprovalRuleTemplate
summary: Get Approval Rule Template
description: Returns information about a specified approval rule template.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/GetApprovalRuleTemplateOutput'
'400':
description: ApprovalRuleTemplateDoesNotExistException; ApprovalRuleTemplateNameRequiredException; InvalidApprovalRuleTemplateNameException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ApprovalRuleTemplateDoesNotExistException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.GetApprovalRuleTemplate
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/GetApprovalRuleTemplateInput'
tags:
- Approval Rule Template
/#ListApprovalRuleTemplates:
post:
operationId: ListApprovalRuleTemplates
summary: List Approval Rule Templates
description: Lists all approval rule templates in the specified Amazon Web Services Region in your Amazon Web Services
account. If an Amazon Web Services Region is not specified, the Amazon Web Services Region where you are signed in
is used.
responses:
'200':
description: Success
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListApprovalRuleTemplatesOutput'
'400':
description: InvalidContinuationTokenException; InvalidMaxResultsException
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/InvalidContinuationTokenException'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- CodeCommit_20150413.ListApprovalRuleTemplates
requestBody:
required: true
content:
application/x-amz-json-1.1:
schema:
$ref: '#/components/schemas/ListApprovalRuleTemplatesInput'
tags:
- Approval Rule Template
components:
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: codecommit
schemas:
ApprovalRuleTemplate:
type: object
properties:
approvalRuleTemplateId:
type: string
description: The system-generated ID of the approval rule template.
approvalRuleTemplateName:
type: string
description: The name of the approval rule template.
approvalRuleTemplateDescription:
type: string
description: The description of the approval rule template.
approvalRuleTemplateContent:
type: string
description: The content of the approval rule template.
ruleContentSha256:
type: string
description: The SHA-256 hash signature for the content of the approval rule template.
lastModifiedDate:
type: string
format: date-time
description: The date the approval rule template was most recently changed, in timestamp format.
creationDate:
type: string
format: date-time
description: The date the approval rule template was created, in timestamp format.
lastModifiedUser:
type: string
description: The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
ApprovalRuleTemplateContentRequiredException:
type: object
properties:
message:
type: string
description: Any message associated with the exception.
ApprovalRuleTemplateDoesNotExistException:
type: object
properties:
message:
type: string
description: Any message associated with the exception.
ApprovalRuleTemplateInUseException:
type: object
properties:
message:
type: string
description: Any message associated with the exception.
AssociateApprovalRuleTemplateWithRepositoryInput:
type: object
properties:
approvalRuleTemplateName:
type: string
description: The name for the approval rule template.
repositoryName:
type: string
description: The name of the repository that you want to associate with the template.
required:
- approvalRuleTemplateName
- repositoryName
BatchAssociateApprovalRuleTemplateWithRepositoriesError:
type: object
properties:
repositoryName:
type: string
description: The name of the repository where the association was not made.
errorCode:
type: string
description: An error code that specifies whether the repository name was not valid or not found.
errorMessage:
type: string
description: An error message that provides details about why the repository name was not found or not valid.
BatchAssociateApprovalRuleTemplateWithRepositoriesInput:
type: object
properties:
approvalRuleTemplateName:
type: string
description: The name of the template you want to associate with one or more repositories.
repositoryNames:
type: array
items:
type: string
description: The names of the repositories you want to associate with the template. The length constraint limit
is for each string in the array. The array itself can be empty.
required:
- approvalRuleTemplateName
- repositoryNames
BatchAssociateApprovalRuleTemplateWithRepositoriesOutput:
type: object
properties:
associatedRepositoryNames:
type: array
items:
type: string
description: A list of names of the repositories that have been associated with the template.
errors:
type: array
items:
$ref: '#/components/schemas/BatchAssociateApprovalRuleTemplateWithRepositoriesError'
description: A list of any errors that might have occurred while attempting to create the association between the
template and the repositories.
required:
- associatedRepositoryNames
- errors
BatchDisassociateApprovalRuleTemplateFromRepositoriesError:
type: object
properties:
repositoryName:
type: string
description: The name of the repository where the association with the template was not able to be removed.
errorCode:
type: string
description: An error code that specifies whether the repository name was not valid or not found.
errorMessage:
type: string
description: An error message that provides details about why the repository name was either not found or not valid.
BatchDisassociateApprovalRuleTemplateFromRepositoriesInput:
type: object
properties:
approvalRuleTemplateName:
type: string
description: The name of the template that you want to disassociate from one or more repositories.
repositoryNames:
type: array
items:
type: string
description: The repository names that you want to disassociate from the approval rule template. The length constraint
limit is for each string in the array. The array itself can be empty.
required:
- approvalRuleTemplateName
- repositoryNames
BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput:
type: object
properties:
disassociatedRepositoryNames:
type: array
items:
type: string
description: A list of repository names that have had their association with the template removed.
errors:
type: array
items:
$ref: '#/components/schemas/BatchDisassociateApprovalRuleTemplateFromRepositoriesError'
description: A list of any errors that might have occurred while attempting to remove the association between the
template and the repositories.
required:
- disassociatedRepositoryNames
- errors
CreateApprovalRuleTemplateInput:
type: object
properties:
approvalRuleTemplateName:
type: string
description: The name of the approval rule template. Provide descriptive names, because this name is applied to
the approval rules created automatically in associated repositories.
approvalRuleTemplateContent:
type: string
description: 'The content of the approval rule that is created on pull requests in associated repositories. If you
specify one or more destination references (branches), approval rules are created in an associated repository
only if their destination references (branches) match those specified in the template. When you create the content
of the approval rule template, you can specify approvers in an approval pool in one of two ways: CodeCommitApprovers:
This option only requires an Amazon Web Services account and a resource. It can be used for both IAM users and
federated access users whose name matches the'
approvalRuleTemplateDescription:
type: string
description: The description of the approval rule template. Consider providing a description that explains what
this template does and when it might be appropriate to associate it with repositories.
required:
- approvalRuleTemplateName
- approvalRuleTemplateContent
CreateApprovalRuleTemplateOutput:
type: object
properties:
approvalRuleTemplate:
$ref: '#/components/schemas/ApprovalRuleTemplate'
required:
- approvalRuleTemplate
DeleteApprovalRuleTemplateInput:
type: object
properties:
approvalRuleTemplateName:
type: string
description: The name of the approval rule template to delete.
required:
- approvalRuleTemplateName
DeleteApprovalRuleTemplateOutput:
type: object
properties:
approvalRuleTemplateId:
type: string
description: The system-generated ID of the deleted approval rule template. If the template has been previously
deleted, the only response is a 200 OK.
required:
- approvalRuleTemplateId
DisassociateApprovalRuleTemplateFromRepositoryInput:
type: object
properties:
approvalRuleTemplateName:
type: string
description: The name of the approval rule template to disassociate from a specified repository.
repositoryName:
type: string
description: The name of the repository you want to disassociate from the template.
required:
- approvalRuleTemplateName
- repositoryName
EncryptionIntegrityChecksFailedException:
type: object
properties:
message:
type: string
description: Any message associated with the exception.
GetApprovalRuleTemplateInput:
type: object
properties:
approvalRuleTemplateName:
type: string
description: The name of the approval rule template for which you want to get information.
required:
- approvalRuleTemplateName
GetApprovalRuleTemplateOutput:
type: object
properties:
approvalRuleTemplate:
$ref: '#/components/schemas/ApprovalRuleTemplate'
required:
- approvalRuleTemplate
InvalidContinuationTokenException:
type: object
properties:
message:
type: string
description: Any message associated with the exception.
ListApprovalRuleTemplatesInput:
type: object
properties:
nextToken:
type: string
description: An enumeration token that, when provided in a request, returns the next batch of the results.
maxResults:
type: integer
description: A non-zero, non-negative integer used to limit the number of returned results.
ListApprovalRuleTemplatesOutput:
type: object
properties:
approvalRuleTemplateNames:
type: array
items:
type: string
description: The names of all the approval rule templates found in the Amazon Web Services Region for your Amazon
Web Services account.
nextToken:
type: string
description: An enumeration token that allows the operation to batch the next results of the operation.
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/codecommit/service/2015-04-13/codecommit-2015-04-13.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)