Namespace Amazon.CDK.AWS.CodeStar
AWS::CodeStar Construct Library
---AWS CDK v1 has reached End-of-Support on 2023-06-01.
This package is no longer being updated, and users should migrate to AWS CDK v2.
For more information on how to migrate, see the Migrating to AWS CDK v2 guide.
GitHub Repository
To create a new GitHub Repository and commit the assets from S3 bucket into the repository after it is created:
using Amazon.CDK.AWS.CodeStar;
using Amazon.CDK.AWS.S3;
new GitHubRepository(this, "GitHubRepo", new GitHubRepositoryProps {
Owner = "aws",
RepositoryName = "aws-cdk",
AccessToken = SecretValue.SecretsManager("my-github-token", new SecretsManagerSecretOptions {
JsonField = "token"
}),
ContentsBucket = Bucket.FromBucketName(this, "Bucket", "bucket-name"),
ContentsKey = "import.zip"
});
Update or Delete the GitHubRepository
At this moment, updates to the GitHubRepository
are not supported and the repository will not be deleted upon the deletion of the CloudFormation stack. You will need to update or delete the GitHub repository manually.
Classes
CfnGitHubRepository | A CloudFormation |
CfnGitHubRepository.CodeProperty | The |
CfnGitHubRepository.S3Property | The |
CfnGitHubRepositoryProps | Properties for defining a |
GitHubRepository | (experimental) The GitHubRepository resource. |
GitHubRepositoryProps | (experimental) Construction properties of {@link GitHubRepository}. |
RepositoryVisibility | (experimental) Visibility of the GitHubRepository. |
Interfaces
CfnGitHubRepository.ICodeProperty | The |
CfnGitHubRepository.IS3Property | The |
ICfnGitHubRepositoryProps | Properties for defining a |
IGitHubRepository | (experimental) GitHubRepository resource interface. |
IGitHubRepositoryProps | (experimental) Construction properties of {@link GitHubRepository}. |