Skip to content
v2.277.0

CodeCommitSourceOptions Struct ​

Configuration options for a CodeCommit source.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { pipelines } from 'aws-cdk-lib';

declare const role: iam.Role;
const codeCommitSourceOptions: pipelines.CodeCommitSourceOptions = {
  actionName: 'actionName',
  codeBuildCloneOutput: false,
  eventRole: role,
  trigger: codepipeline_actions.CodeCommitTrigger.NONE,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codepipeline_actions as codepipeline_actions
from aws_cdk import aws_iam as iam
from aws_cdk import pipelines

# role: iam.Role

code_commit_source_options = pipelines.CodeCommitSourceOptions(
    action_name="actionName",
    code_build_clone_output=False,
    event_role=role,
    trigger=codepipeline_actions.CodeCommitTrigger.NONE
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codepipeline.actions.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.pipelines.*;

Role role;

CodeCommitSourceOptions codeCommitSourceOptions = CodeCommitSourceOptions.builder()
        .actionName("actionName")
        .codeBuildCloneOutput(false)
        .eventRole(role)
        .trigger(CodeCommitTrigger.NONE)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodePipeline.Actions;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.Pipelines;

Role role;

var codeCommitSourceOptions = new CodeCommitSourceOptions {
    ActionName = "actionName",
    CodeBuildCloneOutput = false,
    EventRole = role,
    Trigger = CodeCommitTrigger.NONE
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var role Role

codeCommitSourceOptions := &CodeCommitSourceOptions{
	ActionName: jsii.String("actionName"),
	CodeBuildCloneOutput: jsii.Boolean(false),
	EventRole: role,
	Trigger: awscdk.Aws_codepipeline_actions.CodeCommitTrigger_NONE,
}

Properties ​

actionNameoptionalstringaction_nameoptionalstractionNameoptionalStringActionNameoptionalstringActionNameoptional*string #
The action name used for this source in the CodePipeline.

Default: The repository name

codeBuildCloneOutputoptionalbooleancode_build_clone_outputoptionalboolcodeBuildCloneOutputoptionalBooleanCodeBuildCloneOutputoptionalboolCodeBuildCloneOutputoptional*bool = false #
If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files).

This provides access to repository history, and retains symlinks (symlinks would otherwise be removed by CodePipeline).

Note: if this option is true, only CodeBuild jobs can use the output artifact.

eventRoleoptionalIRoleevent_roleoptionalIRoleeventRoleoptionalIRoleEventRoleoptionalIRoleEventRoleoptionalIRole #
Role to be used by on commit event rule.

Default: a new role will be created.

Used only when trigger value is CodeCommitTrigger.EVENTS.

triggeroptionalCodeCommitTriggertriggeroptionalCodeCommitTriggertriggeroptionalCodeCommitTriggerTriggeroptionalCodeCommitTriggerTriggeroptionalCodeCommitTrigger = CodeCommitTrigger.EVENTS #
How should CodePipeline detect source changes for this Action.