- 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.
GetApprovalRuleTemplateCommand
Returns information about a specified approval rule template.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CodeCommitClient, GetApprovalRuleTemplateCommand } from "@aws-sdk/client-codecommit"; // ES Modules import
// const { CodeCommitClient, GetApprovalRuleTemplateCommand } = require("@aws-sdk/client-codecommit"); // CommonJS import
const client = new CodeCommitClient(config);
const input = { // GetApprovalRuleTemplateInput
approvalRuleTemplateName: "STRING_VALUE", // required
};
const command = new GetApprovalRuleTemplateCommand(input);
const response = await client.send(command);
// { // GetApprovalRuleTemplateOutput
// approvalRuleTemplate: { // ApprovalRuleTemplate
// approvalRuleTemplateId: "STRING_VALUE",
// approvalRuleTemplateName: "STRING_VALUE",
// approvalRuleTemplateDescription: "STRING_VALUE",
// approvalRuleTemplateContent: "STRING_VALUE",
// ruleContentSha256: "STRING_VALUE",
// lastModifiedDate: new Date("TIMESTAMP"),
// creationDate: new Date("TIMESTAMP"),
// lastModifiedUser: "STRING_VALUE",
// },
// };
GetApprovalRuleTemplateCommand Input
See GetApprovalRuleTemplateCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
approvalRuleTemplateName Required | string | undefined | The name of the approval rule template for which you want to get information. |
GetApprovalRuleTemplateCommand Output
See GetApprovalRuleTemplateCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
approvalRuleTemplate Required | ApprovalRuleTemplate | undefined | The content and structure of the approval rule template. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ApprovalRuleTemplateDoesNotExistException | client | 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 | client | An approval rule template name is required, but was not specified. |
InvalidApprovalRuleTemplateNameException | client | 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. |
CodeCommitServiceException | Base exception class for all service exceptions from CodeCommit service. |