CDK Constructs for AWS CodeCommit
Project description
AWS CodeCommit Construct Library
---AWS CodeCommit is a version control service that enables you to privately store and manage Git repositories in the AWS cloud.
For further information on CodeCommit, see the AWS CodeCommit documentation.
To add a CodeCommit Repository to your stack:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_cdk.aws_codecommit as codecommit
repo = codecommit.Repository(self, "Repository",
repository_name="MyRepositoryName",
description="Some description."
)
To add an Amazon SNS trigger to your repository:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
# trigger is established for all repository actions on all branches by default.
repo.notify("arn:aws:sns:*:123456789012:my_topic")
Events
CodeCommit repositories emit Amazon CloudWatch events for certain activities.
Use the repo.onXxx
methods to define rules that trigger on these events
and invoke targets as a result:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
# starts a CodeBuild project when a commit is pushed to the "master" branch of the repo
repo.on_commit("CommitToMaster",
target=targets.CodeBuildProject(project),
branches=["master"]
)
# publishes a message to an Amazon SNS topic when a comment is made on a pull request
rule = repo.on_comment_on_pull_request("CommentOnPullRequest",
target=targets.SnsTopic(my_topic)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for aws-cdk.aws-codecommit-1.33.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd30fcc53de67ce61fba1e1c716086922d0431e8c9c63cc27b9e4403d71b94cd |
|
MD5 | 30fbeeee2552d2fe39fa4206cc3bcea1 |
|
BLAKE2b-256 | 62c2427322966fe9b07754a60b1cd5ac0b3c084ae9b04c996dd1d9d3a29be512 |
Close
Hashes for aws_cdk.aws_codecommit-1.33.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 365e6691640c0c9511232429f8798e40918f339e4bc6f14921a33f91776c7a3b |
|
MD5 | 7771e27f58f8b226a79c8f24c55addcc |
|
BLAKE2b-256 | 416ac4b46726ff974fa7fb5a22224ec6766d182863aaf80f38bb2d30fb3d8556 |