class CloneRepository
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Cloud9.Alpha.CloneRepository |
Go | github.com/aws/aws-cdk-go/awscdkcloud9alpha/v2#CloneRepository |
Java | software.amazon.awscdk.services.cloud9.alpha.CloneRepository |
Python | aws_cdk.aws_cloud9_alpha.CloneRepository |
TypeScript (source) | @aws-cdk/aws-cloud9-alpha ยป CloneRepository |
The class for different repository providers.
Example
import * as codecommit from 'aws-cdk-lib/aws-codecommit';
// create a codecommit repository to clone into the cloud9 environment
const repoNew = new codecommit.Repository(this, 'RepoNew', {
repositoryName: 'new-repo',
});
// import an existing codecommit repository to clone into the cloud9 environment
const repoExisting = codecommit.Repository.fromRepositoryName(this, 'RepoExisting', 'existing-repo');
// create a new Cloud9 environment and clone the two repositories
declare const vpc: ec2.Vpc;
new cloud9.Ec2Environment(this, 'C9Env', {
vpc,
clonedRepositories: [
cloud9.CloneRepository.fromCodeCommit(repoNew, '/src/new-repo'),
cloud9.CloneRepository.fromCodeCommit(repoExisting, '/src/existing-repo'),
],
imageId: cloud9.ImageId.AMAZON_LINUX_2,
});
Properties
| Name | Type | Description |
|---|---|---|
| path | string | |
| repository | string |
pathComponent
Type:
string
repositoryUrl
Type:
string
Methods
| Name | Description |
|---|---|
| static from | import repository to cloud9 environment from AWS CodeCommit. |
static fromCodeCommit(repository, path)
public static fromCodeCommit(repository: IRepository, path: string): CloneRepository
Parameters
- repository
IRepositoryโ the codecommit repository to clone from. - path
stringโ the target path in cloud9 environment.
Returns
import repository to cloud9 environment from AWS CodeCommit.

.NET
Go
Java
Python
TypeScript (