class CloneRepository
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Cloud9.CloneRepository |
![]() | software.amazon.awscdk.services.cloud9.CloneRepository |
![]() | aws_cdk.aws_cloud9.CloneRepository |
![]() | @aws-cdk/aws-cloud9 » CloneRepository |
The class for different repository providers.
Example
import * as codecommit from '@aws-cdk/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'),
],
});
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.