@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.527Z") @Stability(value=Stable) public enum CodeCommitTrigger extends Enum<CodeCommitTrigger>
This is the type of the {@link CodeCommitSourceAction.trigger} property.
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")
.stages(List.of(sourceStage, prodStage))
.build();
| Enum Constant and Description |
|---|
EVENTS
CodePipeline will use CloudWatch Events to be notified of changes.
|
NONE
The Action will never detect changes - the Pipeline it's part of will only begin a run when explicitly started.
|
POLL
CodePipeline will poll the repository to detect changes.
|
| Modifier and Type | Method and Description |
|---|---|
static CodeCommitTrigger |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CodeCommitTrigger[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final CodeCommitTrigger NONE
@Stability(value=Stable) public static final CodeCommitTrigger POLL
@Stability(value=Stable) public static final CodeCommitTrigger EVENTS
This is the default method of detecting changes.
public static CodeCommitTrigger[] values()
for (CodeCommitTrigger c : CodeCommitTrigger.values()) System.out.println(c);
public static CodeCommitTrigger valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.