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.51.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b178f938d71b191d6685b65c3f130ab47ad637997970bf748e83e335f044d08 |
|
MD5 | 40a76891ca115f00e224a0235466e6a7 |
|
BLAKE2b-256 | 1b413c8567273ee1951b7c8ef97c049394beaba19f47856c9678af5e09dacf1c |
Close
Hashes for aws_cdk.aws_codecommit-1.51.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28227533e576d695ba1aa35c42336e8a447fd406c28b08b1fc4d7944792a7c6d |
|
MD5 | 51ea82202a19d7f356d98003c2676bfb |
|
BLAKE2b-256 | 50a53deef0c54633c86268b88b380fc3d331a3ab2f7a60070ac96513d4c9d368 |