- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListAssociatedApprovalRuleTemplatesForRepositoryCommand
Lists all approval rule templates that are associated with a specified repository.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CodeCommitClient, ListAssociatedApprovalRuleTemplatesForRepositoryCommand } from "@aws-sdk/client-codecommit"; // ES Modules import
// const { CodeCommitClient, ListAssociatedApprovalRuleTemplatesForRepositoryCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import
const client = new CodeCommitClient(config);
const input = { // ListAssociatedApprovalRuleTemplatesForRepositoryInput
repositoryName: "STRING_VALUE", // required
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new ListAssociatedApprovalRuleTemplatesForRepositoryCommand(input);
const response = await client.send(command);
// { // ListAssociatedApprovalRuleTemplatesForRepositoryOutput
// approvalRuleTemplateNames: [ // ApprovalRuleTemplateNameList
// "STRING_VALUE",
// ],
// nextToken: "STRING_VALUE",
// };
ListAssociatedApprovalRuleTemplatesForRepositoryCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
repositoryName Required | string | undefined | The name of the repository for which you want to list all associated approval rule templates. |
maxResults | number | undefined | A non-zero, non-negative integer used to limit the number of returned results. |
nextToken | string | undefined | An enumeration token that, when provided in a request, returns the next batch of the results. |
ListAssociatedApprovalRuleTemplatesForRepositoryCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
approvalRuleTemplateNames | string[] | undefined | The names of all approval rule templates associated with the repository. |
nextToken | string | undefined | An enumeration token that allows the operation to batch the next results of the operation. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EncryptionIntegrityChecksFailedException | server | An encryption integrity check failed. |
EncryptionKeyAccessDeniedException | client | An encryption key could not be accessed. |
EncryptionKeyDisabledException | client | The encryption key is disabled. |
EncryptionKeyNotFoundException | client | No encryption key was found. |
EncryptionKeyUnavailableException | client | The encryption key is not available. |
InvalidContinuationTokenException | client | The specified continuation token is not valid. |
InvalidMaxResultsException | client | The specified number of maximum results is not valid. |
InvalidRepositoryNameException | client | A specified repository name is not valid. This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist. |
RepositoryDoesNotExistException | client | The specified repository does not exist. |
RepositoryNameRequiredException | client | A repository name is required, but was not specified. |
CodeCommitServiceException | Base exception class for all service exceptions from CodeCommit service. |