java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codecommit.Code
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.234Z") @Stability(Stable) public abstract class Code extends software.amazon.jsii.JsiiObject
Represents the contents to initialize the repository with.

Example:

 Repository repo = Repository.Builder.create(this, "Repository")
         .repositoryName("MyRepositoryName")
         .code(Code.fromDirectory(join(__dirname, "directory/"), "develop"))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    Code(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Code(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract CodeConfig
    bind(software.constructs.Construct scope)
    This method is called after a repository is passed this instance of Code in its 'code' property.
    static Code
    Code from user-supplied asset.
    static Code
    fromAsset(Asset asset, String branch)
    Code from user-supplied asset.
    static Code
    fromDirectory(String directoryPath)
    Code from directory.
    static Code
    fromDirectory(String directoryPath, String branch)
    Code from directory.
    static Code
    fromZipFile(String filePath)
    Code from preexisting ZIP file.
    static Code
    fromZipFile(String filePath, String branch)
    Code from preexisting ZIP file.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Code

      protected Code(software.amazon.jsii.JsiiObjectRef objRef)
    • Code

      protected Code(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Code

      @Stability(Stable) protected Code()
  • Method Details

    • fromAsset

      @Stability(Stable) @NotNull public static Code fromAsset(@NotNull Asset asset, @Nullable String branch)
      Code from user-supplied asset.

      Parameters:
      asset - pre-existing asset. This parameter is required.
      branch - the name of the branch to create in the repository.
    • fromAsset

      @Stability(Stable) @NotNull public static Code fromAsset(@NotNull Asset asset)
      Code from user-supplied asset.

      Parameters:
      asset - pre-existing asset. This parameter is required.
    • fromDirectory

      @Stability(Stable) @NotNull public static Code fromDirectory(@NotNull String directoryPath, @Nullable String branch)
      Code from directory.

      Parameters:
      directoryPath - the path to the local directory containing the contents to initialize the repository with. This parameter is required.
      branch - the name of the branch to create in the repository.
    • fromDirectory

      @Stability(Stable) @NotNull public static Code fromDirectory(@NotNull String directoryPath)
      Code from directory.

      Parameters:
      directoryPath - the path to the local directory containing the contents to initialize the repository with. This parameter is required.
    • fromZipFile

      @Stability(Stable) @NotNull public static Code fromZipFile(@NotNull String filePath, @Nullable String branch)
      Code from preexisting ZIP file.

      Parameters:
      filePath - the path to the local ZIP file containing the contents to initialize the repository with. This parameter is required.
      branch - the name of the branch to create in the repository.
    • fromZipFile

      @Stability(Stable) @NotNull public static Code fromZipFile(@NotNull String filePath)
      Code from preexisting ZIP file.

      Parameters:
      filePath - the path to the local ZIP file containing the contents to initialize the repository with. This parameter is required.
    • bind

      @Stability(Stable) @NotNull public abstract CodeConfig bind(@NotNull software.constructs.Construct scope)
      This method is called after a repository is passed this instance of Code in its 'code' property.

      Parameters:
      scope - the binding scope. This parameter is required.