All Implemented Interfaces:
IConstruct, IDependable, IResource, IBranch,, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.078Z") @Stability(Experimental) public class Branch extends Resource implements IBranch
(experimental) An Amplify Console branch.


 App amplifyApp;
 Branch master = amplifyApp.addBranch("master"); // `id` will be used as repo branch name
 Branch dev = amplifyApp.addBranch("dev", BranchOptions.builder()
 dev.addEnvironment("STAGE", "dev");
  • Constructor Details

    • Branch

      protected Branch( objRef)
    • Branch

      protected Branch( initializationMode)
    • Branch

      @Stability(Experimental) public Branch(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull BranchProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromBranchName

      @Stability(Experimental) @NotNull public static IBranch fromBranchName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String branchName)
      (experimental) Import an existing branch.

      scope - This parameter is required.
      id - This parameter is required.
      branchName - This parameter is required.
    • addEnvironment

      @Stability(Experimental) @NotNull public Branch addEnvironment(@NotNull String name, @NotNull String value)
      (experimental) Adds an environment variable to this branch.

      All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information.

      name - This parameter is required.
      value - This parameter is required.
    • getArn

      @Stability(Experimental) @NotNull public String getArn()
      (experimental) The ARN of the branch.
    • getBranchName

      @Stability(Experimental) @NotNull public String getBranchName()
      (experimental) The name of the branch.
      Specified by:
      getBranchName in interface IBranch