Interface CodeCommitSourceActionProps
- All Superinterfaces:
CommonActionProps,CommonAwsActionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CodeCommitSourceActionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:37.007Z")
@Stability(Stable)
public interface CodeCommitSourceActionProps
extends software.amazon.jsii.JsiiSerializable, CommonAwsActionProps
Construction properties of the
CodeCommitSourceAction CodeCommit source CodePipeline Action.
Example:
// Source stage: read from repository
Repository repo = Repository.Builder.create(stack, "TemplateRepo")
.repositoryName("template-repo")
.build();
Artifact sourceOutput = new Artifact("SourceArtifact");
CodeCommitSourceAction source = CodeCommitSourceAction.Builder.create()
.actionName("Source")
.repository(repo)
.output(sourceOutput)
.trigger(CodeCommitTrigger.POLL)
.build();
Map<String, Object> sourceStage = Map.of(
"stageName", "Source",
"actions", List.of(source));
// Deployment stage: create and deploy changeset with manual approval
String stackName = "OurStack";
String changeSetName = "StagedChangeSet";
Map<String, Object> prodStage = Map.of(
"stageName", "Deploy",
"actions", List.of(
CloudFormationCreateReplaceChangeSetAction.Builder.create()
.actionName("PrepareChanges")
.stackName(stackName)
.changeSetName(changeSetName)
.adminPermissions(true)
.templatePath(sourceOutput.atPath("template.yaml"))
.runOrder(1)
.build(),
ManualApprovalAction.Builder.create()
.actionName("ApproveChanges")
.runOrder(2)
.build(),
CloudFormationExecuteChangeSetAction.Builder.create()
.actionName("ExecuteChanges")
.stackName(stackName)
.changeSetName(changeSetName)
.runOrder(3)
.build()));
Pipeline.Builder.create(stack, "Pipeline")
.crossAccountKeys(true)
.stages(List.of(sourceStage, prodStage))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCodeCommitSourceActionPropsstatic final classAn implementation forCodeCommitSourceActionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringDefault: 'master'default BooleanWhether the output should be the contents of the repository (which is the default), or a link that allows CodeBuild to clone the repository before building.default ICustomEventRuleYou can pass acustomEventRuleto set up a custom event rule for the CodeCommit source action.default IRoleRole to be used by on commit event rule.The CodeCommit repository.default CodeCommitTriggerHow should CodePipeline detect source changes for this Action.Methods inherited from interface software.amazon.awscdk.services.codepipeline.CommonActionProps
getActionName, getRunOrder, getVariablesNamespaceMethods inherited from interface software.amazon.awscdk.services.codepipeline.CommonAwsActionProps
getRoleMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getOutput
-
getRepository
The CodeCommit repository. -
getBranch
Default: 'master' -
getCodeBuildCloneOutput
Whether the output should be the contents of the repository (which is the default), or a link that allows CodeBuild to clone the repository before building.Note: if this option is true, then only CodeBuild actions can use the resulting
output.Default: false
- See Also:
-
getCustomEventRule
You can pass acustomEventRuleto set up a custom event rule for the CodeCommit source action.You must provide the
eventPatternandtargetproperties in thecustomEventRuleobject. Check whicheventPatternto use: https://docs.aws.amazon.com/codecommit/latest/userguide/monitoring-events.htmlDefault: Event rule which is triggered by CodeCommit repository on commit
-
getEventRole
Role to be used by on commit event rule.Used only when trigger value is CodeCommitTrigger.EVENTS.
Default: a new role will be created.
-
getTrigger
How should CodePipeline detect source changes for this Action.Default: CodeCommitTrigger.EVENTS
-
builder
-