## AWS CodeCommit Construct Library
<!--BEGIN STABILITY BANNER-->---
![Stability: Stable](https://img.shields.io/badge/stability-Stable-success.svg?style=for-the-badge)
---
<!--END STABILITY BANNER-->
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](https://docs.aws.amazon.com/codecommit).
To add a CodeCommit Repository to your stack:
```python
# 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:
```python
# 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:
```python
# 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)
)
```
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | aws-cdk.aws-codecommit-1.32.0.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 97 浏览量
2022-02-10
03:28:58
上传
评论
收藏 50KB GZ 举报
温馨提示
共15个文件
txt:4个
py:3个
pkg-info:2个
资源来自pypi官网。 资源全名:aws-cdk.aws-codecommit-1.32.0.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
aws-cdk.aws-codecommit-1.32.0.tar.gz (15个子文件)
aws-cdk.aws-codecommit-1.32.0
MANIFEST.in 23B
PKG-INFO 3KB
pyproject.toml 110B
src
aws_cdk
aws_codecommit
aws_cdk.aws_codecommit.egg-info
PKG-INFO 3KB
requires.txt 128B
SOURCES.txt 478B
top_level.txt 8B
dependency_links.txt 1B
setup.cfg 38B
setup.py 2KB
README.md 2KB
共 15 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功