java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.amplify.alpha.Branch
All Implemented Interfaces:
IResource, IBranch, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:15.551Z") @Stability(Experimental) public class Branch extends Resource implements IBranch
(experimental) An Amplify Console branch.

Example:

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

    • Branch

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

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

      @Stability(Experimental) public Branch(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull BranchProps props)
      Parameters:
      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.

      Parameters:
      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.

      Parameters:
      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