CloneRepository

class aws_cdk.aws_cloud9.CloneRepository(*args: Any, **kwargs)

Bases: object

(experimental) The class for different repository providers.

Stability

experimental

ExampleMetadata

infused

Example:

import aws_cdk.aws_codecommit as codecommit

# create a new Cloud9 environment and clone the two repositories
# vpc: ec2.Vpc


# create a codecommit repository to clone into the cloud9 environment
repo_new = codecommit.Repository(self, "RepoNew",
    repository_name="new-repo"
)

# import an existing codecommit repository to clone into the cloud9 environment
repo_existing = codecommit.Repository.from_repository_name(self, "RepoExisting", "existing-repo")
cloud9.Ec2Environment(self, "C9Env",
    vpc=vpc,
    cloned_repositories=[
        cloud9.CloneRepository.from_code_commit(repo_new, "/src/new-repo"),
        cloud9.CloneRepository.from_code_commit(repo_existing, "/src/existing-repo")
    ]
)

Attributes

path_component

experimental

Type

stability

Return type

str

repository_url

experimental

Type

stability

Return type

str

Static Methods

classmethod from_code_commit(repository, path)

(experimental) import repository to cloud9 environment from AWS CodeCommit.

Parameters
  • repository (IRepository) – the codecommit repository to clone from.

  • path (str) – the target path in cloud9 environment.

Stability

experimental

Return type

CloneRepository