Skip to content
v2.273.0

Repository L2 construct ​

Provides a CodeCommit Repository.

Example ​

ts
declare const project: codebuild.PipelineProject;
const repository = new codecommit.Repository(this, 'MyRepository', {
  repositoryName: 'MyRepository',
});
const project = new codebuild.PipelineProject(this, 'MyProject');

const sourceOutput = new codepipeline.Artifact();
const sourceAction = new codepipeline_actions.CodeCommitSourceAction({
  actionName: 'CodeCommit',
  repository,
  output: sourceOutput,
});
const buildAction = new codepipeline_actions.CodeBuildAction({
  actionName: 'CodeBuild',
  project,
  input: sourceOutput,
  outputs: [new codepipeline.Artifact()], // optional
  executeBatchBuild: true, // optional, defaults to false
  combineBatchBuildArtifacts: true, // optional, defaults to false
});

new codepipeline.Pipeline(this, 'MyPipeline', {
  stages: [
    {
      stageName: 'Source',
      actions: [sourceAction],
    },
    {
      stageName: 'Build',
      actions: [buildAction],
    },
  ],
});
python
# project: codebuild.PipelineProject

repository = codecommit.Repository(self, "MyRepository",
    repository_name="MyRepository"
)
project = codebuild.PipelineProject(self, "MyProject")

source_output = codepipeline.Artifact()
source_action = codepipeline_actions.CodeCommitSourceAction(
    action_name="CodeCommit",
    repository=repository,
    output=source_output
)
build_action = codepipeline_actions.CodeBuildAction(
    action_name="CodeBuild",
    project=project,
    input=source_output,
    outputs=[codepipeline.Artifact()],  # optional
    execute_batch_build=True,  # optional, defaults to false
    combine_batch_build_artifacts=True
)

codepipeline.Pipeline(self, "MyPipeline",
    stages=[codepipeline.StageProps(
        stage_name="Source",
        actions=[source_action]
    ), codepipeline.StageProps(
        stage_name="Build",
        actions=[build_action]
    )
    ]
)
java
PipelineProject project;

Repository repository = Repository.Builder.create(this, "MyRepository")
        .repositoryName("MyRepository")
        .build();
PipelineProject project = new PipelineProject(this, "MyProject");

Artifact sourceOutput = new Artifact();
CodeCommitSourceAction sourceAction = CodeCommitSourceAction.Builder.create()
        .actionName("CodeCommit")
        .repository(repository)
        .output(sourceOutput)
        .build();
CodeBuildAction buildAction = CodeBuildAction.Builder.create()
        .actionName("CodeBuild")
        .project(project)
        .input(sourceOutput)
        .outputs(List.of(new Artifact())) // optional
        .executeBatchBuild(true) // optional, defaults to false
        .combineBatchBuildArtifacts(true)
        .build();

Pipeline.Builder.create(this, "MyPipeline")
        .stages(List.of(StageProps.builder()
                .stageName("Source")
                .actions(List.of(sourceAction))
                .build(), StageProps.builder()
                .stageName("Build")
                .actions(List.of(buildAction))
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
PipelineProject project;

var repository = new Repository(this, "MyRepository", new RepositoryProps {
    RepositoryName = "MyRepository"
});
var project = new PipelineProject(this, "MyProject");

var sourceOutput = new Artifact();
var sourceAction = new CodeCommitSourceAction(new CodeCommitSourceActionProps {
    ActionName = "CodeCommit",
    Repository = repository,
    Output = sourceOutput
});
var buildAction = new CodeBuildAction(new CodeBuildActionProps {
    ActionName = "CodeBuild",
    Project = project,
    Input = sourceOutput,
    Outputs = new [] { new Artifact() },  // optional
    ExecuteBatchBuild = true,  // optional, defaults to false
    CombineBatchBuildArtifacts = true
});

new Pipeline(this, "MyPipeline", new PipelineProps {
    Stages = new [] { new StageProps {
        StageName = "Source",
        Actions = new [] { sourceAction }
    }, new StageProps {
        StageName = "Build",
        Actions = new [] { buildAction }
    } }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var project PipelineProject

repository := codecommit.NewRepository(this, jsii.String("MyRepository"), &RepositoryProps{
	RepositoryName: jsii.String("MyRepository"),
})
project := codebuild.NewPipelineProject(this, jsii.String("MyProject"))

sourceOutput := codepipeline.NewArtifact()
sourceAction := codepipeline_actions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
	ActionName: jsii.String("CodeCommit"),
	Repository: Repository,
	Output: sourceOutput,
})
buildAction := codepipeline_actions.NewCodeBuildAction(&CodeBuildActionProps{
	ActionName: jsii.String("CodeBuild"),
	Project: Project,
	Input: sourceOutput,
	Outputs: []Artifact{
		codepipeline.NewArtifact(),
	},
	 // optional
	ExecuteBatchBuild: jsii.Boolean(true),
	 // optional, defaults to false
	CombineBatchBuildArtifacts: jsii.Boolean(true),
})

codepipeline.NewPipeline(this, jsii.String("MyPipeline"), &PipelineProps{
	Stages: []StageProps{
		&StageProps{
			StageName: jsii.String("Source"),
			Actions: []IAction{
				sourceAction,
			},
		},
		&StageProps{
			StageName: jsii.String("Build"),
			Actions: []IAction{
				buildAction,
			},
		},
	},
})

Initializer ​

ts
new Repository(scope: Construct, id: string, props: RepositoryProps)
python
Repository(scope: Construct, id: str, props: RepositoryProps)
java
new Repository(Construct scope, String id, RepositoryProps props)
csharp
new Repository(Construct scope, string id, RepositoryProps props)
go
NewRepository(Scope Construct, Id *string, Props RepositoryProps)

Construct Props ​

codeCodecodeCodecodeCodeCodeCodeCodeCode= No initialization (create empty …#
The contents with which to initialize the repository after it has been created.
default

Default: No initialization (create empty repo)

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= No description.#
A description of the repository.

Use the description to identify the purpose of the repository.

kmsKeyIKeyRefkms_keyIKeyRefkmsKeyIKeyRefKmsKeyIKeyRefKmsKeyIKeyRef= Use an AWS managed key#
The customer managed key used to encrypt and decrypt the data in repository.
repositoryNamestringrepository_namestrrepositoryNameStringRepositoryNamestringRepositoryName*stringrequired#
Name of the repository.

This property is required for all CodeCommit repositories.

Properties ​

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

Collection of grant methods for a Repository.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#
Uniquely identifies this class.
repositoryArnstringrepository_arnstrrepositoryArnStringRepositoryArnstringRepositoryArn*stringrequired#
The ARN of this Repository.
repositoryCloneUrlGrcstringrepository_clone_url_grcstrrepositoryCloneUrlGrcStringRepositoryCloneUrlGrcstringRepositoryCloneUrlGrc*stringrequired#
The HTTPS (GRC) clone URL.

HTTPS (GRC) is the protocol to use with git-remote-codecommit (GRC).

It is the recommended method for supporting connections made with federated access, identity providers, and temporary credentials.

repositoryCloneUrlHttpstringrepository_clone_url_httpstrrepositoryCloneUrlHttpStringRepositoryCloneUrlHttpstringRepositoryCloneUrlHttp*stringrequired#
The HTTP clone URL.
repositoryCloneUrlSshstringrepository_clone_url_sshstrrepositoryCloneUrlSshStringRepositoryCloneUrlSshstringRepositoryCloneUrlSsh*stringrequired#
The SSH clone URL.
repositoryNamestringrepository_namestrrepositoryNameStringRepositoryNamestringRepositoryName*stringrequired#
The human-visible name of this Repository.
repositoryRefRepositoryReferencerepository_refRepositoryReferencerepositoryRefRepositoryReferenceRepositoryRefRepositoryReferenceRepositoryRefRepositoryReferencerequired#
A reference to a Repository resource.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.

Methods ​

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Override the cross-stack reference strength for this resource.
notes · 1 parameter

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

bindAsNotificationRuleSource(_scope: Construct): NotificationRuleSourceConfigdef bind_as_notification_rule_source(self, _scope: Construct) -> NotificationRuleSourceConfigpublic NotificationRuleSourceConfig bindAsNotificationRuleSource(Construct _scope)public NotificationRuleSourceConfig BindAsNotificationRuleSource(Construct _scope)func BindAsNotificationRuleSource(_scope Construct) NotificationRuleSourceConfig#
Returns a source configuration for notification rule.
fromRepositoryArn(scope: Construct, id: string, repositoryArn: string): IRepository@staticmethod def from_repository_arn(scope: Construct, id: str, repository_arn: str) -> IRepositorypublic static IRepository fromRepositoryArn(Construct scope, String id, String repositoryArn)public static IRepository FromRepositoryArn(Construct scope, string id, string repositoryArn)func FromRepositoryArn(Scope Construct, Id *string, RepositoryArn *string) IRepositorystatic#
Imports a codecommit repository.
1 parameter

Parameters

  • repositoryArnrepository_arnrepositoryArnrepositoryArnRepositoryArn — (e.g. arn:aws:codecommit:us-east-1:123456789012:MyDemoRepo).
fromRepositoryName(scope: Construct, id: string, repositoryName: string): IRepository@staticmethod def from_repository_name(scope: Construct, id: str, repository_name: str) -> IRepositorypublic static IRepository fromRepositoryName(Construct scope, String id, String repositoryName)public static IRepository FromRepositoryName(Construct scope, string id, string repositoryName)func FromRepositoryName(Scope Construct, Id *string, RepositoryName *string) IRepositorystatic#
grant(grantee: IGrantable, ...actions: string[]): Grantdef grant(self, grantee: IGrantable, actions: str) -> Grantpublic Grant grant(IGrantable grantee, String actions)public Grant Grant(IGrantable grantee, string actions)func Grant(Grantee IGrantable, Actions *string) Grant#
[disable-awslint:no-grants].
grantPull(grantee: IGrantable): Grantdef grant_pull(self, grantee: IGrantable) -> Grantpublic Grant grantPull(IGrantable grantee)public Grant GrantPull(IGrantable grantee)func GrantPull(Grantee IGrantable) Grant#
The use of this method is discouraged. Please use `grants.pull()` instead.

[disable-awslint:no-grants]

grantPullPush(grantee: IGrantable): Grantdef grant_pull_push(self, grantee: IGrantable) -> Grantpublic Grant grantPullPush(IGrantable grantee)public Grant GrantPullPush(IGrantable grantee)func GrantPullPush(Grantee IGrantable) Grant#
The use of this method is discouraged. Please use `grants.pullPush()` instead.

[disable-awslint:no-grants]

grantRead(grantee: IGrantable): Grantdef grant_read(self, grantee: IGrantable) -> Grantpublic Grant grantRead(IGrantable grantee)public Grant GrantRead(IGrantable grantee)func GrantRead(Grantee IGrantable) Grant#
The use of this method is discouraged. Please use `grants.read()` instead.

[disable-awslint:no-grants]

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

isOwnedResource(construct: IConstruct): boolean@staticmethod def is_owned_resource(construct: IConstruct) -> boolpublic static Boolean isOwnedResource(IConstruct construct)public static bool IsOwnedResource(IConstruct construct)func IsOwnedResource(Construct IConstruct) *boolstatic#
Returns true if the construct was created by CDK, and false otherwise.
isResource(construct: IConstruct): boolean@staticmethod def is_resource(construct: IConstruct) -> boolpublic static Boolean isResource(IConstruct construct)public static bool IsResource(IConstruct construct)func IsResource(Construct IConstruct) *boolstatic#
Check whether the given construct is a Resource.
notifiyOnPullRequestMerged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notifiy_on_pull_request_merged(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifiyOnPullRequestMerged(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifiyOnPullRequestMerged(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifiyOnPullRequestMerged(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a pull request is merged.
notify(arn: string, options?: RepositoryTriggerOptions): Repository // chainabledef notify(self, arn: str, options: typing.Optional[RepositoryTriggerOptions] = None) -> Repositorypublic Repository notify(String arn, RepositoryTriggerOptions options)public Repository Notify(string arn, RepositoryTriggerOptions? options = null)func Notify(Arn *string, Options RepositoryTriggerOptions) Repository#
Create a trigger to notify another service to run actions on repository events.
2 parameters

Parameters

  • arnarnarnarnArn — Arn of the resource that repository events will notify.
  • optionsoptionsoptionsoptionsOptions — Trigger options to run actions.
notifyOn(id: string, target: INotificationRuleTarget, options: RepositoryNotifyOnOptions): INotificationRuledef notify_on(self, id: str, target: INotificationRuleTarget, options: RepositoryNotifyOnOptions) -> INotificationRulepublic INotificationRule notifyOn(String id, INotificationRuleTarget target, RepositoryNotifyOnOptions options)public INotificationRule NotifyOn(string id, INotificationRuleTarget target, RepositoryNotifyOnOptions options)func NotifyOn(Id *string, Target INotificationRuleTarget, Options RepositoryNotifyOnOptions) INotificationRule#
Defines a CodeStar Notification rule triggered when the project events specified by you are emitted. Similar to `onEvent` API.

You can also use the methods to define rules for the specific event emitted. e.g. notifyOnPullRequestCreated.

notifyOnApprovalRuleOverridden(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_approval_rule_overridden(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnApprovalRuleOverridden(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnApprovalRuleOverridden(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnApprovalRuleOverridden(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when an approval rule is overridden.
notifyOnApprovalStatusChanged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_approval_status_changed(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnApprovalStatusChanged(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnApprovalStatusChanged(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnApprovalStatusChanged(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when an approval status is changed.
notifyOnBranchOrTagCreated(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_branch_or_tag_created(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnBranchOrTagCreated(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnBranchOrTagCreated(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnBranchOrTagCreated(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a new branch or tag is created.
notifyOnBranchOrTagDeleted(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_branch_or_tag_deleted(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnBranchOrTagDeleted(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnBranchOrTagDeleted(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnBranchOrTagDeleted(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a branch or tag is deleted.
notifyOnPullRequestComment(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_pull_request_comment(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnPullRequestComment(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnPullRequestComment(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnPullRequestComment(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a comment is made on a pull request.
notifyOnPullRequestCreated(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_pull_request_created(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnPullRequestCreated(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnPullRequestCreated(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnPullRequestCreated(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a pull request is created.
notifyOnPullRequestMerged(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRuledef notify_on_pull_request_merged(self, id: str, target: INotificationRuleTarget, options: typing.Optional[NotificationRuleOptions] = None) -> INotificationRulepublic INotificationRule notifyOnPullRequestMerged(String id, INotificationRuleTarget target, NotificationRuleOptions options)public INotificationRule NotifyOnPullRequestMerged(string id, INotificationRuleTarget target, NotificationRuleOptions? options = null)func NotifyOnPullRequestMerged(Id *string, Target INotificationRuleTarget, Options NotificationRuleOptions) INotificationRule#
Defines a CodeStar Notification rule which triggers when a pull request is merged.
onCommentOnCommit(id: string, options?: OnEventOptions): Ruledef on_comment_on_commit(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onCommentOnCommit(String id, OnEventOptions options)public Rule OnCommentOnCommit(string id, OnEventOptions? options = null)func OnCommentOnCommit(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a comment is made on a commit.
onCommentOnPullRequest(id: string, options?: OnEventOptions): Ruledef on_comment_on_pull_request(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onCommentOnPullRequest(String id, OnEventOptions options)public Rule OnCommentOnPullRequest(string id, OnEventOptions? options = null)func OnCommentOnPullRequest(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
onCommit(id: string, options?: OnCommitOptions): Ruledef on_commit(self, id: str, options: typing.Optional[OnCommitOptions] = None) -> Rulepublic Rule onCommit(String id, OnCommitOptions options)public Rule OnCommit(string id, OnCommitOptions? options = null)func OnCommit(Id *string, Options OnCommitOptions) Rule#
Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
onEvent(id: string, options?: OnEventOptions): Ruledef on_event(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onEvent(String id, OnEventOptions options)public Rule OnEvent(string id, OnEventOptions? options = null)func OnEvent(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers for repository events.

Use rule.addEventPattern(pattern) to specify a filter.

onPullRequestStateChange(id: string, options?: OnEventOptions): Ruledef on_pull_request_state_change(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onPullRequestStateChange(String id, OnEventOptions options)public Rule OnPullRequestStateChange(string id, OnEventOptions? options = null)func OnPullRequestStateChange(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a pull request state is changed.
onReferenceCreated(id: string, options?: OnEventOptions): Ruledef on_reference_created(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onReferenceCreated(String id, OnEventOptions options)public Rule OnReferenceCreated(string id, OnEventOptions? options = null)func OnReferenceCreated(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a reference is created (i.e. a new branch/tag is created) to the repository.
onReferenceDeleted(id: string, options?: OnEventOptions): Ruledef on_reference_deleted(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onReferenceDeleted(String id, OnEventOptions options)public Rule OnReferenceDeleted(string id, OnEventOptions? options = null)func OnReferenceDeleted(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a reference is delete (i.e. a branch/tag is deleted) from the repository.
onReferenceUpdated(id: string, options?: OnEventOptions): Ruledef on_reference_updated(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onReferenceUpdated(String id, OnEventOptions options)public Rule OnReferenceUpdated(string id, OnEventOptions? options = null)func OnReferenceUpdated(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a reference is updated (i.e. a commit is pushed to an existing or new branch) from the repository.
onStateChange(id: string, options?: OnEventOptions): Ruledef on_state_change(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onStateChange(String id, OnEventOptions options)public Rule OnStateChange(string id, OnEventOptions? options = null)func OnStateChange(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule which triggers when a "CodeCommit Repository State Change" event occurs.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.