software.amazon.awscdk.services.cloud9.alpha.CloneRepository Maven / Gradle / Ivy
Show all versions of cloud9-alpha Show documentation
package software.amazon.awscdk.services.cloud9.alpha;
/**
* (experimental) The class for different repository providers.
*
* Example:
*
*
* import software.amazon.awscdk.services.codecommit.*;
* // create a new Cloud9 environment and clone the two repositories
* Vpc vpc;
* // create a codecommit repository to clone into the cloud9 environment
* Repository repoNew = Repository.Builder.create(this, "RepoNew")
* .repositoryName("new-repo")
* .build();
* // import an existing codecommit repository to clone into the cloud9 environment
* IRepository repoExisting = Repository.fromRepositoryName(this, "RepoExisting", "existing-repo");
* Ec2Environment.Builder.create(this, "C9Env")
* .vpc(vpc)
* .clonedRepositories(List.of(CloneRepository.fromCodeCommit(repoNew, "/src/new-repo"), CloneRepository.fromCodeCommit(repoExisting, "/src/existing-repo")))
* .imageId(ImageId.AMAZON_LINUX_2)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-18T22:17:05.952Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.cloud9.alpha.$Module.class, fqn = "@aws-cdk/aws-cloud9-alpha.CloneRepository")
public class CloneRepository extends software.amazon.jsii.JsiiObject {
protected CloneRepository(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CloneRepository(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* (experimental) import repository to cloud9 environment from AWS CodeCommit.
*
* @param repository the codecommit repository to clone from. This parameter is required.
* @param path the target path in cloud9 environment. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloud9.alpha.CloneRepository fromCodeCommit(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codecommit.IRepository repository, final @org.jetbrains.annotations.NotNull java.lang.String path) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.cloud9.alpha.CloneRepository.class, "fromCodeCommit", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloud9.alpha.CloneRepository.class), new Object[] { java.util.Objects.requireNonNull(repository, "repository is required"), java.util.Objects.requireNonNull(path, "path is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getPathComponent() {
return software.amazon.jsii.Kernel.get(this, "pathComponent", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getRepositoryUrl() {
return software.amazon.jsii.Kernel.get(this, "repositoryUrl", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
}