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.41.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 009566d771570f43e9062e7bcfe15906a9b52e9dcac48869f64afbde078e7c06 |
|
MD5 | 42b4d19cead2b381e190a6cfda2d11cb |
|
BLAKE2b-256 | 44c55069d7f42affa977f9164bb1681dd827b4e2252a9a7b0780417ee6757cf3 |
Close
Hashes for aws_cdk.aws_codecommit-1.41.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f33c10b449b9b4d672d8bd0653a5c03b557625d490703329448a31b4df41c94 |
|
MD5 | a1c67bde2819ad9d9496f03059d3a89c |
|
BLAKE2b-256 | 69b7c647808d59dd350bbb74e051fcb541295b3d9bb50b2af631dff45dbbf022 |