aws.amplify.Branch
Explore with Pulumi AI
Provides an Amplify Branch resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.amplify.App("example", {name: "app"});
const master = new aws.amplify.Branch("master", {
    appId: example.id,
    branchName: "master",
    framework: "React",
    stage: "PRODUCTION",
    environmentVariables: {
        REACT_APP_API_SERVER: "https://api.example.com",
    },
});
import pulumi
import pulumi_aws as aws
example = aws.amplify.App("example", name="app")
master = aws.amplify.Branch("master",
    app_id=example.id,
    branch_name="master",
    framework="React",
    stage="PRODUCTION",
    environment_variables={
        "REACT_APP_API_SERVER": "https://api.example.com",
    })
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := amplify.NewApp(ctx, "example", &lify.AppArgs{
			Name: pulumi.String("app"),
		})
		if err != nil {
			return err
		}
		_, err = amplify.NewBranch(ctx, "master", &lify.BranchArgs{
			AppId:      example.ID(),
			BranchName: pulumi.String("master"),
			Framework:  pulumi.String("React"),
			Stage:      pulumi.String("PRODUCTION"),
			EnvironmentVariables: pulumi.StringMap{
				"REACT_APP_API_SERVER": pulumi.String("https://api.example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = new Aws.Amplify.App("example", new()
    {
        Name = "app",
    });
    var master = new Aws.Amplify.Branch("master", new()
    {
        AppId = example.Id,
        BranchName = "master",
        Framework = "React",
        Stage = "PRODUCTION",
        EnvironmentVariables = 
        {
            { "REACT_APP_API_SERVER", "https://api.example.com" },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.amplify.App;
import com.pulumi.aws.amplify.AppArgs;
import com.pulumi.aws.amplify.Branch;
import com.pulumi.aws.amplify.BranchArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new App("example", AppArgs.builder()
            .name("app")
            .build());
        var master = new Branch("master", BranchArgs.builder()
            .appId(example.id())
            .branchName("master")
            .framework("React")
            .stage("PRODUCTION")
            .environmentVariables(Map.of("REACT_APP_API_SERVER", "https://api.example.com"))
            .build());
    }
}
resources:
  example:
    type: aws:amplify:App
    properties:
      name: app
  master:
    type: aws:amplify:Branch
    properties:
      appId: ${example.id}
      branchName: master
      framework: React
      stage: PRODUCTION
      environmentVariables:
        REACT_APP_API_SERVER: https://api.example.com
Basic Authentication
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const example = new aws.amplify.App("example", {name: "app"});
const master = new aws.amplify.Branch("master", {
    appId: example.id,
    branchName: "master",
    enableBasicAuth: true,
    basicAuthCredentials: std.base64encode({
        input: "username:password",
    }).then(invoke => invoke.result),
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
example = aws.amplify.App("example", name="app")
master = aws.amplify.Branch("master",
    app_id=example.id,
    branch_name="master",
    enable_basic_auth=True,
    basic_auth_credentials=std.base64encode(input="username:password").result)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := amplify.NewApp(ctx, "example", &lify.AppArgs{
			Name: pulumi.String("app"),
		})
		if err != nil {
			return err
		}
		invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
			Input: "username:password",
		}, nil)
		if err != nil {
			return err
		}
		_, err = amplify.NewBranch(ctx, "master", &lify.BranchArgs{
			AppId:                example.ID(),
			BranchName:           pulumi.String("master"),
			EnableBasicAuth:      pulumi.Bool(true),
			BasicAuthCredentials: pulumi.String(invokeBase64encode.Result),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() => 
{
    var example = new Aws.Amplify.App("example", new()
    {
        Name = "app",
    });
    var master = new Aws.Amplify.Branch("master", new()
    {
        AppId = example.Id,
        BranchName = "master",
        EnableBasicAuth = true,
        BasicAuthCredentials = Std.Base64encode.Invoke(new()
        {
            Input = "username:password",
        }).Apply(invoke => invoke.Result),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.amplify.App;
import com.pulumi.aws.amplify.AppArgs;
import com.pulumi.aws.amplify.Branch;
import com.pulumi.aws.amplify.BranchArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new App("example", AppArgs.builder()
            .name("app")
            .build());
        var master = new Branch("master", BranchArgs.builder()
            .appId(example.id())
            .branchName("master")
            .enableBasicAuth(true)
            .basicAuthCredentials(StdFunctions.base64encode(Base64encodeArgs.builder()
                .input("username:password")
                .build()).result())
            .build());
    }
}
resources:
  example:
    type: aws:amplify:App
    properties:
      name: app
  master:
    type: aws:amplify:Branch
    properties:
      appId: ${example.id}
      branchName: master
      enableBasicAuth: true
      basicAuthCredentials:
        fn::invoke:
          function: std:base64encode
          arguments:
            input: username:password
          return: result
Notifications
Amplify Console uses EventBridge (formerly known as CloudWatch Events) and SNS for email notifications. To implement the same functionality, you need to set enable_notification in a aws.amplify.Branch resource, as well as creating an EventBridge Rule, an SNS topic, and SNS subscriptions.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.amplify.App("example", {name: "app"});
const master = new aws.amplify.Branch("master", {
    appId: example.id,
    branchName: "master",
    enableNotification: true,
});
// EventBridge Rule for Amplify notifications
const amplifyAppMasterEventRule = new aws.cloudwatch.EventRule("amplify_app_master", {
    name: pulumi.interpolate`amplify-${app.id}-${master.branchName}-branch-notification`,
    description: pulumi.interpolate`AWS Amplify build notifications for :  App: ${app.id} Branch: ${master.branchName}`,
    eventPattern: pulumi.jsonStringify({
        detail: {
            appId: [example.id],
            branchName: [master.branchName],
            jobStatus: [
                "SUCCEED",
                "FAILED",
                "STARTED",
            ],
        },
        "detail-type": ["Amplify Deployment Status Change"],
        source: ["aws.amplify"],
    }),
});
// SNS Topic for Amplify notifications
const amplifyAppMasterTopic = new aws.sns.Topic("amplify_app_master", {name: pulumi.interpolate`amplify-${app.id}_${master.branchName}`});
const amplifyAppMasterEventTarget = new aws.cloudwatch.EventTarget("amplify_app_master", {
    rule: amplifyAppMasterEventRule.name,
    targetId: master.branchName,
    arn: amplifyAppMasterTopic.arn,
    inputTransformer: {
        inputPaths: {
            jobId: "$.detail.jobId",
            appId: "$.detail.appId",
            region: "$.region",
            branch: "$.detail.branchName",
            status: "$.detail.jobStatus",
        },
        inputTemplate: "\"Build notification from the AWS Amplify Console for app: https://<branch>.<appId>.amplifyapp.com/. Your build status is <status>. Go to https://console.aws.amazon.com/amplify/home?region=<region>#<appId>/<branch>/<jobId> to view details on your build. \"",
    },
});
const amplifyAppMaster = pulumi.all([master.arn, amplifyAppMasterTopic.arn]).apply(([masterArn, amplifyAppMasterTopicArn]) => aws.iam.getPolicyDocumentOutput({
    statements: [{
        sid: `Allow_Publish_Events ${masterArn}`,
        effect: "Allow",
        actions: ["SNS:Publish"],
        principals: [{
            type: "Service",
            identifiers: ["events.amazonaws.com"],
        }],
        resources: [amplifyAppMasterTopicArn],
    }],
}));
const amplifyAppMasterTopicPolicy = new aws.sns.TopicPolicy("amplify_app_master", {
    arn: amplifyAppMasterTopic.arn,
    policy: amplifyAppMaster.apply(amplifyAppMaster => amplifyAppMaster.json),
});
const _this = new aws.sns.TopicSubscription("this", {
    topic: amplifyAppMasterTopic.arn,
    protocol: "email",
    endpoint: "user@acme.com",
});
import pulumi
import json
import pulumi_aws as aws
example = aws.amplify.App("example", name="app")
master = aws.amplify.Branch("master",
    app_id=example.id,
    branch_name="master",
    enable_notification=True)
# EventBridge Rule for Amplify notifications
amplify_app_master_event_rule = aws.cloudwatch.EventRule("amplify_app_master",
    name=master.branch_name.apply(lambda branch_name: f"amplify-{app['id']}-{branch_name}-branch-notification"),
    description=master.branch_name.apply(lambda branch_name: f"AWS Amplify build notifications for :  App: {app['id']} Branch: {branch_name}"),
    event_pattern=pulumi.Output.json_dumps({
        "detail": {
            "appId": [example.id],
            "branchName": [master.branch_name],
            "jobStatus": [
                "SUCCEED",
                "FAILED",
                "STARTED",
            ],
        },
        "detail-type": ["Amplify Deployment Status Change"],
        "source": ["aws.amplify"],
    }))
# SNS Topic for Amplify notifications
amplify_app_master_topic = aws.sns.Topic("amplify_app_master", name=master.branch_name.apply(lambda branch_name: f"amplify-{app['id']}_{branch_name}"))
amplify_app_master_event_target = aws.cloudwatch.EventTarget("amplify_app_master",
    rule=amplify_app_master_event_rule.name,
    target_id=master.branch_name,
    arn=amplify_app_master_topic.arn,
    input_transformer={
        "input_paths": {
            "jobId": "$.detail.jobId",
            "appId": "$.detail.appId",
            "region": "$.region",
            "branch": "$.detail.branchName",
            "status": "$.detail.jobStatus",
        },
        "input_template": "\"Build notification from the AWS Amplify Console for app: https://<branch>.<appId>.amplifyapp.com/. Your build status is <status>. Go to https://console.aws.amazon.com/amplify/home?region=<region>#<appId>/<branch>/<jobId> to view details on your build. \"",
    })
amplify_app_master = pulumi.Output.all(
    masterArn=master.arn,
    amplifyAppMasterTopicArn=amplify_app_master_topic.arn
).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[{
    "sid": f"Allow_Publish_Events {resolved_outputs['masterArn']}",
    "effect": "Allow",
    "actions": ["SNS:Publish"],
    "principals": [{
        "type": "Service",
        "identifiers": ["events.amazonaws.com"],
    }],
    "resources": [%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)],
}]))
amplify_app_master_topic_policy = aws.sns.TopicPolicy("amplify_app_master",
    arn=amplify_app_master_topic.arn,
    policy=amplify_app_master.json)
this = aws.sns.TopicSubscription("this",
    topic=amplify_app_master_topic.arn,
    protocol="email",
    endpoint="user@acme.com")
package main
import (
	"encoding/json"
	"fmt"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := amplify.NewApp(ctx, "example", &lify.AppArgs{
Name: pulumi.String("app"),
})
if err != nil {
return err
}
master, err := amplify.NewBranch(ctx, "master", &lify.BranchArgs{
AppId: example.ID(),
BranchName: pulumi.String("master"),
EnableNotification: pulumi.Bool(true),
})
if err != nil {
return err
}
// EventBridge Rule for Amplify notifications
amplifyAppMasterEventRule, err := cloudwatch.NewEventRule(ctx, "amplify_app_master", &cloudwatch.EventRuleArgs{
Name: master.BranchName.ApplyT(func(branchName string) (string, error) {
return fmt.Sprintf("amplify-%v-%v-branch-notification", app.Id, branchName), nil
}).(pulumi.StringOutput),
Description: master.BranchName.ApplyT(func(branchName string) (string, error) {
return fmt.Sprintf("AWS Amplify build notifications for :  App: %v Branch: %v", app.Id, branchName), nil
}).(pulumi.StringOutput),
EventPattern: pulumi.All(example.ID(),master.BranchName).ApplyT(func(_args []interface{}) (string, error) {
id := _args[0].(string)
branchName := _args[1].(string)
var _zero string
tmpJSON0, err := json.Marshal(map[string]interface{}{
"detail": map[string]interface{}{
"appId": []string{
id,
},
"branchName": []string{
branchName,
},
"jobStatus": []string{
"SUCCEED",
"FAILED",
"STARTED",
},
},
"detail-type": []string{
"Amplify Deployment Status Change",
},
"source": []string{
"aws.amplify",
},
})
if err != nil {
return _zero, err
}
json0 := string(tmpJSON0)
return json0, nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
// SNS Topic for Amplify notifications
amplifyAppMasterTopic, err := sns.NewTopic(ctx, "amplify_app_master", &sns.TopicArgs{
Name: master.BranchName.ApplyT(func(branchName string) (string, error) {
return fmt.Sprintf("amplify-%v_%v", app.Id, branchName), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_, err = cloudwatch.NewEventTarget(ctx, "amplify_app_master", &cloudwatch.EventTargetArgs{
Rule: amplifyAppMasterEventRule.Name,
TargetId: master.BranchName,
Arn: amplifyAppMasterTopic.Arn,
InputTransformer: &cloudwatch.EventTargetInputTransformerArgs{
InputPaths: pulumi.StringMap{
"jobId": pulumi.String("$.detail.jobId"),
"appId": pulumi.String("$.detail.appId"),
"region": pulumi.String("$.region"),
"branch": pulumi.String("$.detail.branchName"),
"status": pulumi.String("$.detail.jobStatus"),
},
InputTemplate: pulumi.String("\"Build notification from the AWS Amplify Console for app: https://<branch>.<appId>.amplifyapp.com/. Your build status is <status>. Go to https://console.aws.amazon.com/amplify/home?region=<region>#<appId>/<branch>/<jobId> to view details on your build. \""),
},
})
if err != nil {
return err
}
amplifyAppMaster := pulumi.All(master.Arn,amplifyAppMasterTopic.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {
masterArn := _args[0].(string)
amplifyAppMasterTopicArn := _args[1].(string)
return iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
Statements: []iam.GetPolicyDocumentStatement{
{
Sid: fmt.Sprintf("Allow_Publish_Events %v", masterArn),
Effect: "Allow",
Actions: []string{
"SNS:Publish",
},
Principals: []iam.GetPolicyDocumentStatementPrincipal{
{
Type: "Service",
Identifiers: []string{
"events.amazonaws.com",
},
},
},
Resources: interface{}{
amplifyAppMasterTopicArn,
},
},
},
}, nil))), nil
}).(iam.GetPolicyDocumentResultOutput)
_, err = sns.NewTopicPolicy(ctx, "amplify_app_master", &sns.TopicPolicyArgs{
Arn: amplifyAppMasterTopic.Arn,
Policy: pulumi.String(amplifyAppMaster.ApplyT(func(amplifyAppMaster iam.GetPolicyDocumentResult) (*string, error) {
return &lifyAppMaster.Json, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
_, err = sns.NewTopicSubscription(ctx, "this", &sns.TopicSubscriptionArgs{
Topic: amplifyAppMasterTopic.Arn,
Protocol: pulumi.String("email"),
Endpoint: pulumi.String("user@acme.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = new Aws.Amplify.App("example", new()
    {
        Name = "app",
    });
    var master = new Aws.Amplify.Branch("master", new()
    {
        AppId = example.Id,
        BranchName = "master",
        EnableNotification = true,
    });
    // EventBridge Rule for Amplify notifications
    var amplifyAppMasterEventRule = new Aws.CloudWatch.EventRule("amplify_app_master", new()
    {
        Name = master.BranchName.Apply(branchName => $"amplify-{app.Id}-{branchName}-branch-notification"),
        Description = master.BranchName.Apply(branchName => $"AWS Amplify build notifications for :  App: {app.Id} Branch: {branchName}"),
        EventPattern = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
        {
            ["detail"] = new Dictionary<string, object?>
            {
                ["appId"] = new[]
                {
                    example.Id,
                },
                ["branchName"] = new[]
                {
                    master.BranchName,
                },
                ["jobStatus"] = new[]
                {
                    "SUCCEED",
                    "FAILED",
                    "STARTED",
                },
            },
            ["detail-type"] = new[]
            {
                "Amplify Deployment Status Change",
            },
            ["source"] = new[]
            {
                "aws.amplify",
            },
        })),
    });
    // SNS Topic for Amplify notifications
    var amplifyAppMasterTopic = new Aws.Sns.Topic("amplify_app_master", new()
    {
        Name = master.BranchName.Apply(branchName => $"amplify-{app.Id}_{branchName}"),
    });
    var amplifyAppMasterEventTarget = new Aws.CloudWatch.EventTarget("amplify_app_master", new()
    {
        Rule = amplifyAppMasterEventRule.Name,
        TargetId = master.BranchName,
        Arn = amplifyAppMasterTopic.Arn,
        InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs
        {
            InputPaths = 
            {
                { "jobId", "$.detail.jobId" },
                { "appId", "$.detail.appId" },
                { "region", "$.region" },
                { "branch", "$.detail.branchName" },
                { "status", "$.detail.jobStatus" },
            },
            InputTemplate = "\"Build notification from the AWS Amplify Console for app: https://<branch>.<appId>.amplifyapp.com/. Your build status is <status>. Go to https://console.aws.amazon.com/amplify/home?region=<region>#<appId>/<branch>/<jobId> to view details on your build. \"",
        },
    });
    var amplifyAppMaster = Aws.Iam.GetPolicyDocument.Invoke(new()
    {
        Statements = new[]
        {
            new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
            {
                Sid = $"Allow_Publish_Events {master.Arn}",
                Effect = "Allow",
                Actions = new[]
                {
                    "SNS:Publish",
                },
                Principals = new[]
                {
                    new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                    {
                        Type = "Service",
                        Identifiers = new[]
                        {
                            "events.amazonaws.com",
                        },
                    },
                },
                Resources = new[]
                {
                    amplifyAppMasterTopic.Arn,
                },
            },
        },
    });
    var amplifyAppMasterTopicPolicy = new Aws.Sns.TopicPolicy("amplify_app_master", new()
    {
        Arn = amplifyAppMasterTopic.Arn,
        Policy = amplifyAppMaster.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
    });
    var @this = new Aws.Sns.TopicSubscription("this", new()
    {
        Topic = amplifyAppMasterTopic.Arn,
        Protocol = "email",
        Endpoint = "user@acme.com",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.amplify.App;
import com.pulumi.aws.amplify.AppArgs;
import com.pulumi.aws.amplify.Branch;
import com.pulumi.aws.amplify.BranchArgs;
import com.pulumi.aws.cloudwatch.EventRule;
import com.pulumi.aws.cloudwatch.EventRuleArgs;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.sns.TopicArgs;
import com.pulumi.aws.cloudwatch.EventTarget;
import com.pulumi.aws.cloudwatch.EventTargetArgs;
import com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.sns.TopicPolicy;
import com.pulumi.aws.sns.TopicPolicyArgs;
import com.pulumi.aws.sns.TopicSubscription;
import com.pulumi.aws.sns.TopicSubscriptionArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new App("example", AppArgs.builder()
            .name("app")
            .build());
        var master = new Branch("master", BranchArgs.builder()
            .appId(example.id())
            .branchName("master")
            .enableNotification(true)
            .build());
        // EventBridge Rule for Amplify notifications
        var amplifyAppMasterEventRule = new EventRule("amplifyAppMasterEventRule", EventRuleArgs.builder()
            .name(master.branchName().applyValue(branchName -> String.format("amplify-%s-%s-branch-notification", app.id(),branchName)))
            .description(master.branchName().applyValue(branchName -> String.format("AWS Amplify build notifications for :  App: %s Branch: %s", app.id(),branchName)))
            .eventPattern(Output.tuple(example.id(), master.branchName()).applyValue(values -> {
                var id = values.t1;
                var branchName = values.t2;
                return serializeJson(
                    jsonObject(
                        jsonProperty("detail", jsonObject(
                            jsonProperty("appId", jsonArray(id)),
                            jsonProperty("branchName", jsonArray(branchName)),
                            jsonProperty("jobStatus", jsonArray(
                                "SUCCEED", 
                                "FAILED", 
                                "STARTED"
                            ))
                        )),
                        jsonProperty("detail-type", jsonArray("Amplify Deployment Status Change")),
                        jsonProperty("source", jsonArray("aws.amplify"))
                    ));
            }))
            .build());
        // SNS Topic for Amplify notifications
        var amplifyAppMasterTopic = new Topic("amplifyAppMasterTopic", TopicArgs.builder()
            .name(master.branchName().applyValue(branchName -> String.format("amplify-%s_%s", app.id(),branchName)))
            .build());
        var amplifyAppMasterEventTarget = new EventTarget("amplifyAppMasterEventTarget", EventTargetArgs.builder()
            .rule(amplifyAppMasterEventRule.name())
            .targetId(master.branchName())
            .arn(amplifyAppMasterTopic.arn())
            .inputTransformer(EventTargetInputTransformerArgs.builder()
                .inputPaths(Map.ofEntries(
                    Map.entry("jobId", "$.detail.jobId"),
                    Map.entry("appId", "$.detail.appId"),
                    Map.entry("region", "$.region"),
                    Map.entry("branch", "$.detail.branchName"),
                    Map.entry("status", "$.detail.jobStatus")
                ))
                .inputTemplate("\"Build notification from the AWS Amplify Console for app: https://<branch>.<appId>.amplifyapp.com/. Your build status is <status>. Go to https://console.aws.amazon.com/amplify/home?region=<region>#<appId>/<branch>/<jobId> to view details on your build. \"")
                .build())
            .build());
        final var amplifyAppMaster = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(GetPolicyDocumentStatementArgs.builder()
                .sid(master.arn().applyValue(arn -> String.format("Allow_Publish_Events %s", arn)))
                .effect("Allow")
                .actions("SNS:Publish")
                .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                    .type("Service")
                    .identifiers("events.amazonaws.com")
                    .build())
                .resources(amplifyAppMasterTopic.arn())
                .build())
            .build());
        var amplifyAppMasterTopicPolicy = new TopicPolicy("amplifyAppMasterTopicPolicy", TopicPolicyArgs.builder()
            .arn(amplifyAppMasterTopic.arn())
            .policy(amplifyAppMaster.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(amplifyAppMaster -> amplifyAppMaster.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
            .build());
        var this_ = new TopicSubscription("this", TopicSubscriptionArgs.builder()
            .topic(amplifyAppMasterTopic.arn())
            .protocol("email")
            .endpoint("user@acme.com")
            .build());
    }
}
resources:
  example:
    type: aws:amplify:App
    properties:
      name: app
  master:
    type: aws:amplify:Branch
    properties:
      appId: ${example.id}
      branchName: master
      enableNotification: true
  # EventBridge Rule for Amplify notifications
  amplifyAppMasterEventRule:
    type: aws:cloudwatch:EventRule
    name: amplify_app_master
    properties:
      name: amplify-${app.id}-${master.branchName}-branch-notification
      description: 'AWS Amplify build notifications for :  App: ${app.id} Branch: ${master.branchName}'
      eventPattern:
        fn::toJSON:
          detail:
            appId:
              - ${example.id}
            branchName:
              - ${master.branchName}
            jobStatus:
              - SUCCEED
              - FAILED
              - STARTED
          detail-type:
            - Amplify Deployment Status Change
          source:
            - aws.amplify
  amplifyAppMasterEventTarget:
    type: aws:cloudwatch:EventTarget
    name: amplify_app_master
    properties:
      rule: ${amplifyAppMasterEventRule.name}
      targetId: ${master.branchName}
      arn: ${amplifyAppMasterTopic.arn}
      inputTransformer:
        inputPaths:
          jobId: $.detail.jobId
          appId: $.detail.appId
          region: $.region
          branch: $.detail.branchName
          status: $.detail.jobStatus
        inputTemplate: '"Build notification from the AWS Amplify Console for app: https://<branch>.<appId>.amplifyapp.com/. Your build status is <status>. Go to https://console.aws.amazon.com/amplify/home?region=<region>#<appId>/<branch>/<jobId> to view details on your build. "'
  # SNS Topic for Amplify notifications
  amplifyAppMasterTopic:
    type: aws:sns:Topic
    name: amplify_app_master
    properties:
      name: amplify-${app.id}_${master.branchName}
  amplifyAppMasterTopicPolicy:
    type: aws:sns:TopicPolicy
    name: amplify_app_master
    properties:
      arn: ${amplifyAppMasterTopic.arn}
      policy: ${amplifyAppMaster.json}
  this:
    type: aws:sns:TopicSubscription
    properties:
      topic: ${amplifyAppMasterTopic.arn}
      protocol: email
      endpoint: user@acme.com
variables:
  amplifyAppMaster:
    fn::invoke:
      function: aws:iam:getPolicyDocument
      arguments:
        statements:
          - sid: Allow_Publish_Events ${master.arn}
            effect: Allow
            actions:
              - SNS:Publish
            principals:
              - type: Service
                identifiers:
                  - events.amazonaws.com
            resources:
              - ${amplifyAppMasterTopic.arn}
Create Branch Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Branch(name: string, args: BranchArgs, opts?: CustomResourceOptions);@overload
def Branch(resource_name: str,
           args: BranchArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Branch(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           branch_name: Optional[str] = None,
           app_id: Optional[str] = None,
           enable_notification: Optional[bool] = None,
           enable_performance_mode: Optional[bool] = None,
           description: Optional[str] = None,
           display_name: Optional[str] = None,
           enable_auto_build: Optional[bool] = None,
           enable_basic_auth: Optional[bool] = None,
           backend_environment_arn: Optional[str] = None,
           basic_auth_credentials: Optional[str] = None,
           enable_pull_request_preview: Optional[bool] = None,
           environment_variables: Optional[Mapping[str, str]] = None,
           framework: Optional[str] = None,
           pull_request_environment_name: Optional[str] = None,
           stage: Optional[str] = None,
           tags: Optional[Mapping[str, str]] = None,
           ttl: Optional[str] = None)func NewBranch(ctx *Context, name string, args BranchArgs, opts ...ResourceOption) (*Branch, error)public Branch(string name, BranchArgs args, CustomResourceOptions? opts = null)
public Branch(String name, BranchArgs args)
public Branch(String name, BranchArgs args, CustomResourceOptions options)
type: aws:amplify:Branch
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var branchResource = new Aws.Amplify.Branch("branchResource", new()
{
    BranchName = "string",
    AppId = "string",
    EnableNotification = false,
    EnablePerformanceMode = false,
    Description = "string",
    DisplayName = "string",
    EnableAutoBuild = false,
    EnableBasicAuth = false,
    BackendEnvironmentArn = "string",
    BasicAuthCredentials = "string",
    EnablePullRequestPreview = false,
    EnvironmentVariables = 
    {
        { "string", "string" },
    },
    Framework = "string",
    PullRequestEnvironmentName = "string",
    Stage = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Ttl = "string",
});
example, err := amplify.NewBranch(ctx, "branchResource", &lify.BranchArgs{
	BranchName:               pulumi.String("string"),
	AppId:                    pulumi.String("string"),
	EnableNotification:       pulumi.Bool(false),
	EnablePerformanceMode:    pulumi.Bool(false),
	Description:              pulumi.String("string"),
	DisplayName:              pulumi.String("string"),
	EnableAutoBuild:          pulumi.Bool(false),
	EnableBasicAuth:          pulumi.Bool(false),
	BackendEnvironmentArn:    pulumi.String("string"),
	BasicAuthCredentials:     pulumi.String("string"),
	EnablePullRequestPreview: pulumi.Bool(false),
	EnvironmentVariables: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Framework:                  pulumi.String("string"),
	PullRequestEnvironmentName: pulumi.String("string"),
	Stage:                      pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Ttl: pulumi.String("string"),
})
var branchResource = new Branch("branchResource", BranchArgs.builder()
    .branchName("string")
    .appId("string")
    .enableNotification(false)
    .enablePerformanceMode(false)
    .description("string")
    .displayName("string")
    .enableAutoBuild(false)
    .enableBasicAuth(false)
    .backendEnvironmentArn("string")
    .basicAuthCredentials("string")
    .enablePullRequestPreview(false)
    .environmentVariables(Map.of("string", "string"))
    .framework("string")
    .pullRequestEnvironmentName("string")
    .stage("string")
    .tags(Map.of("string", "string"))
    .ttl("string")
    .build());
branch_resource = aws.amplify.Branch("branchResource",
    branch_name="string",
    app_id="string",
    enable_notification=False,
    enable_performance_mode=False,
    description="string",
    display_name="string",
    enable_auto_build=False,
    enable_basic_auth=False,
    backend_environment_arn="string",
    basic_auth_credentials="string",
    enable_pull_request_preview=False,
    environment_variables={
        "string": "string",
    },
    framework="string",
    pull_request_environment_name="string",
    stage="string",
    tags={
        "string": "string",
    },
    ttl="string")
const branchResource = new aws.amplify.Branch("branchResource", {
    branchName: "string",
    appId: "string",
    enableNotification: false,
    enablePerformanceMode: false,
    description: "string",
    displayName: "string",
    enableAutoBuild: false,
    enableBasicAuth: false,
    backendEnvironmentArn: "string",
    basicAuthCredentials: "string",
    enablePullRequestPreview: false,
    environmentVariables: {
        string: "string",
    },
    framework: "string",
    pullRequestEnvironmentName: "string",
    stage: "string",
    tags: {
        string: "string",
    },
    ttl: "string",
});
type: aws:amplify:Branch
properties:
    appId: string
    backendEnvironmentArn: string
    basicAuthCredentials: string
    branchName: string
    description: string
    displayName: string
    enableAutoBuild: false
    enableBasicAuth: false
    enableNotification: false
    enablePerformanceMode: false
    enablePullRequestPreview: false
    environmentVariables:
        string: string
    framework: string
    pullRequestEnvironmentName: string
    stage: string
    tags:
        string: string
    ttl: string
Branch Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Branch resource accepts the following input properties:
- AppId string
- Unique ID for an Amplify app.
- BranchName string
- Name for the branch.
- BackendEnvironment stringArn 
- ARN for a backend environment that is part of an Amplify app.
- BasicAuth stringCredentials 
- Basic authorization credentials for the branch.
- Description string
- Description for the branch.
- DisplayName string
- Display name for a branch. This is used as the default domain prefix.
- EnableAuto boolBuild 
- Enables auto building for the branch.
- EnableBasic boolAuth 
- Enables basic authorization for the branch.
- EnableNotification bool
- Enables notifications for the branch.
- EnablePerformance boolMode 
- Enables performance mode for the branch.
- EnablePull boolRequest Preview 
- Enables pull request previews for this branch.
- EnvironmentVariables Dictionary<string, string>
- Environment variables for the branch.
- Framework string
- Framework for the branch.
- PullRequest stringEnvironment Name 
- Amplify environment name for the pull request.
- Stage string
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Dictionary<string, string>
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Ttl string
- Content Time To Live (TTL) for the website in seconds.
- AppId string
- Unique ID for an Amplify app.
- BranchName string
- Name for the branch.
- BackendEnvironment stringArn 
- ARN for a backend environment that is part of an Amplify app.
- BasicAuth stringCredentials 
- Basic authorization credentials for the branch.
- Description string
- Description for the branch.
- DisplayName string
- Display name for a branch. This is used as the default domain prefix.
- EnableAuto boolBuild 
- Enables auto building for the branch.
- EnableBasic boolAuth 
- Enables basic authorization for the branch.
- EnableNotification bool
- Enables notifications for the branch.
- EnablePerformance boolMode 
- Enables performance mode for the branch.
- EnablePull boolRequest Preview 
- Enables pull request previews for this branch.
- EnvironmentVariables map[string]string
- Environment variables for the branch.
- Framework string
- Framework for the branch.
- PullRequest stringEnvironment Name 
- Amplify environment name for the pull request.
- Stage string
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- map[string]string
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Ttl string
- Content Time To Live (TTL) for the website in seconds.
- appId String
- Unique ID for an Amplify app.
- branchName String
- Name for the branch.
- backendEnvironment StringArn 
- ARN for a backend environment that is part of an Amplify app.
- basicAuth StringCredentials 
- Basic authorization credentials for the branch.
- description String
- Description for the branch.
- displayName String
- Display name for a branch. This is used as the default domain prefix.
- enableAuto BooleanBuild 
- Enables auto building for the branch.
- enableBasic BooleanAuth 
- Enables basic authorization for the branch.
- enableNotification Boolean
- Enables notifications for the branch.
- enablePerformance BooleanMode 
- Enables performance mode for the branch.
- enablePull BooleanRequest Preview 
- Enables pull request previews for this branch.
- environmentVariables Map<String,String>
- Environment variables for the branch.
- framework String
- Framework for the branch.
- pullRequest StringEnvironment Name 
- Amplify environment name for the pull request.
- stage String
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Map<String,String>
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- ttl String
- Content Time To Live (TTL) for the website in seconds.
- appId string
- Unique ID for an Amplify app.
- branchName string
- Name for the branch.
- backendEnvironment stringArn 
- ARN for a backend environment that is part of an Amplify app.
- basicAuth stringCredentials 
- Basic authorization credentials for the branch.
- description string
- Description for the branch.
- displayName string
- Display name for a branch. This is used as the default domain prefix.
- enableAuto booleanBuild 
- Enables auto building for the branch.
- enableBasic booleanAuth 
- Enables basic authorization for the branch.
- enableNotification boolean
- Enables notifications for the branch.
- enablePerformance booleanMode 
- Enables performance mode for the branch.
- enablePull booleanRequest Preview 
- Enables pull request previews for this branch.
- environmentVariables {[key: string]: string}
- Environment variables for the branch.
- framework string
- Framework for the branch.
- pullRequest stringEnvironment Name 
- Amplify environment name for the pull request.
- stage string
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- {[key: string]: string}
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- ttl string
- Content Time To Live (TTL) for the website in seconds.
- app_id str
- Unique ID for an Amplify app.
- branch_name str
- Name for the branch.
- backend_environment_ strarn 
- ARN for a backend environment that is part of an Amplify app.
- basic_auth_ strcredentials 
- Basic authorization credentials for the branch.
- description str
- Description for the branch.
- display_name str
- Display name for a branch. This is used as the default domain prefix.
- enable_auto_ boolbuild 
- Enables auto building for the branch.
- enable_basic_ boolauth 
- Enables basic authorization for the branch.
- enable_notification bool
- Enables notifications for the branch.
- enable_performance_ boolmode 
- Enables performance mode for the branch.
- enable_pull_ boolrequest_ preview 
- Enables pull request previews for this branch.
- environment_variables Mapping[str, str]
- Environment variables for the branch.
- framework str
- Framework for the branch.
- pull_request_ strenvironment_ name 
- Amplify environment name for the pull request.
- stage str
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Mapping[str, str]
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- ttl str
- Content Time To Live (TTL) for the website in seconds.
- appId String
- Unique ID for an Amplify app.
- branchName String
- Name for the branch.
- backendEnvironment StringArn 
- ARN for a backend environment that is part of an Amplify app.
- basicAuth StringCredentials 
- Basic authorization credentials for the branch.
- description String
- Description for the branch.
- displayName String
- Display name for a branch. This is used as the default domain prefix.
- enableAuto BooleanBuild 
- Enables auto building for the branch.
- enableBasic BooleanAuth 
- Enables basic authorization for the branch.
- enableNotification Boolean
- Enables notifications for the branch.
- enablePerformance BooleanMode 
- Enables performance mode for the branch.
- enablePull BooleanRequest Preview 
- Enables pull request previews for this branch.
- environmentVariables Map<String>
- Environment variables for the branch.
- framework String
- Framework for the branch.
- pullRequest StringEnvironment Name 
- Amplify environment name for the pull request.
- stage String
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Map<String>
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- ttl String
- Content Time To Live (TTL) for the website in seconds.
Outputs
All input properties are implicitly available as output properties. Additionally, the Branch resource produces the following output properties:
- Arn string
- ARN for the branch.
- AssociatedResources List<string>
- A list of custom resources that are linked to this branch.
- CustomDomains List<string>
- Custom domains for the branch.
- DestinationBranch string
- Destination branch if the branch is a pull request branch.
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceBranch string
- Source branch if the branch is a pull request branch.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Arn string
- ARN for the branch.
- AssociatedResources []string
- A list of custom resources that are linked to this branch.
- CustomDomains []string
- Custom domains for the branch.
- DestinationBranch string
- Destination branch if the branch is a pull request branch.
- Id string
- The provider-assigned unique ID for this managed resource.
- SourceBranch string
- Source branch if the branch is a pull request branch.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- ARN for the branch.
- associatedResources List<String>
- A list of custom resources that are linked to this branch.
- customDomains List<String>
- Custom domains for the branch.
- destinationBranch String
- Destination branch if the branch is a pull request branch.
- id String
- The provider-assigned unique ID for this managed resource.
- sourceBranch String
- Source branch if the branch is a pull request branch.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn string
- ARN for the branch.
- associatedResources string[]
- A list of custom resources that are linked to this branch.
- customDomains string[]
- Custom domains for the branch.
- destinationBranch string
- Destination branch if the branch is a pull request branch.
- id string
- The provider-assigned unique ID for this managed resource.
- sourceBranch string
- Source branch if the branch is a pull request branch.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn str
- ARN for the branch.
- associated_resources Sequence[str]
- A list of custom resources that are linked to this branch.
- custom_domains Sequence[str]
- Custom domains for the branch.
- destination_branch str
- Destination branch if the branch is a pull request branch.
- id str
- The provider-assigned unique ID for this managed resource.
- source_branch str
- Source branch if the branch is a pull request branch.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- ARN for the branch.
- associatedResources List<String>
- A list of custom resources that are linked to this branch.
- customDomains List<String>
- Custom domains for the branch.
- destinationBranch String
- Destination branch if the branch is a pull request branch.
- id String
- The provider-assigned unique ID for this managed resource.
- sourceBranch String
- Source branch if the branch is a pull request branch.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
Look up Existing Branch Resource
Get an existing Branch resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BranchState, opts?: CustomResourceOptions): Branch@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_id: Optional[str] = None,
        arn: Optional[str] = None,
        associated_resources: Optional[Sequence[str]] = None,
        backend_environment_arn: Optional[str] = None,
        basic_auth_credentials: Optional[str] = None,
        branch_name: Optional[str] = None,
        custom_domains: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        destination_branch: Optional[str] = None,
        display_name: Optional[str] = None,
        enable_auto_build: Optional[bool] = None,
        enable_basic_auth: Optional[bool] = None,
        enable_notification: Optional[bool] = None,
        enable_performance_mode: Optional[bool] = None,
        enable_pull_request_preview: Optional[bool] = None,
        environment_variables: Optional[Mapping[str, str]] = None,
        framework: Optional[str] = None,
        pull_request_environment_name: Optional[str] = None,
        source_branch: Optional[str] = None,
        stage: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        ttl: Optional[str] = None) -> Branchfunc GetBranch(ctx *Context, name string, id IDInput, state *BranchState, opts ...ResourceOption) (*Branch, error)public static Branch Get(string name, Input<string> id, BranchState? state, CustomResourceOptions? opts = null)public static Branch get(String name, Output<String> id, BranchState state, CustomResourceOptions options)resources:  _:    type: aws:amplify:Branch    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AppId string
- Unique ID for an Amplify app.
- Arn string
- ARN for the branch.
- AssociatedResources List<string>
- A list of custom resources that are linked to this branch.
- BackendEnvironment stringArn 
- ARN for a backend environment that is part of an Amplify app.
- BasicAuth stringCredentials 
- Basic authorization credentials for the branch.
- BranchName string
- Name for the branch.
- CustomDomains List<string>
- Custom domains for the branch.
- Description string
- Description for the branch.
- DestinationBranch string
- Destination branch if the branch is a pull request branch.
- DisplayName string
- Display name for a branch. This is used as the default domain prefix.
- EnableAuto boolBuild 
- Enables auto building for the branch.
- EnableBasic boolAuth 
- Enables basic authorization for the branch.
- EnableNotification bool
- Enables notifications for the branch.
- EnablePerformance boolMode 
- Enables performance mode for the branch.
- EnablePull boolRequest Preview 
- Enables pull request previews for this branch.
- EnvironmentVariables Dictionary<string, string>
- Environment variables for the branch.
- Framework string
- Framework for the branch.
- PullRequest stringEnvironment Name 
- Amplify environment name for the pull request.
- SourceBranch string
- Source branch if the branch is a pull request branch.
- Stage string
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Dictionary<string, string>
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Ttl string
- Content Time To Live (TTL) for the website in seconds.
- AppId string
- Unique ID for an Amplify app.
- Arn string
- ARN for the branch.
- AssociatedResources []string
- A list of custom resources that are linked to this branch.
- BackendEnvironment stringArn 
- ARN for a backend environment that is part of an Amplify app.
- BasicAuth stringCredentials 
- Basic authorization credentials for the branch.
- BranchName string
- Name for the branch.
- CustomDomains []string
- Custom domains for the branch.
- Description string
- Description for the branch.
- DestinationBranch string
- Destination branch if the branch is a pull request branch.
- DisplayName string
- Display name for a branch. This is used as the default domain prefix.
- EnableAuto boolBuild 
- Enables auto building for the branch.
- EnableBasic boolAuth 
- Enables basic authorization for the branch.
- EnableNotification bool
- Enables notifications for the branch.
- EnablePerformance boolMode 
- Enables performance mode for the branch.
- EnablePull boolRequest Preview 
- Enables pull request previews for this branch.
- EnvironmentVariables map[string]string
- Environment variables for the branch.
- Framework string
- Framework for the branch.
- PullRequest stringEnvironment Name 
- Amplify environment name for the pull request.
- SourceBranch string
- Source branch if the branch is a pull request branch.
- Stage string
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- map[string]string
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Ttl string
- Content Time To Live (TTL) for the website in seconds.
- appId String
- Unique ID for an Amplify app.
- arn String
- ARN for the branch.
- associatedResources List<String>
- A list of custom resources that are linked to this branch.
- backendEnvironment StringArn 
- ARN for a backend environment that is part of an Amplify app.
- basicAuth StringCredentials 
- Basic authorization credentials for the branch.
- branchName String
- Name for the branch.
- customDomains List<String>
- Custom domains for the branch.
- description String
- Description for the branch.
- destinationBranch String
- Destination branch if the branch is a pull request branch.
- displayName String
- Display name for a branch. This is used as the default domain prefix.
- enableAuto BooleanBuild 
- Enables auto building for the branch.
- enableBasic BooleanAuth 
- Enables basic authorization for the branch.
- enableNotification Boolean
- Enables notifications for the branch.
- enablePerformance BooleanMode 
- Enables performance mode for the branch.
- enablePull BooleanRequest Preview 
- Enables pull request previews for this branch.
- environmentVariables Map<String,String>
- Environment variables for the branch.
- framework String
- Framework for the branch.
- pullRequest StringEnvironment Name 
- Amplify environment name for the pull request.
- sourceBranch String
- Source branch if the branch is a pull request branch.
- stage String
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Map<String,String>
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ttl String
- Content Time To Live (TTL) for the website in seconds.
- appId string
- Unique ID for an Amplify app.
- arn string
- ARN for the branch.
- associatedResources string[]
- A list of custom resources that are linked to this branch.
- backendEnvironment stringArn 
- ARN for a backend environment that is part of an Amplify app.
- basicAuth stringCredentials 
- Basic authorization credentials for the branch.
- branchName string
- Name for the branch.
- customDomains string[]
- Custom domains for the branch.
- description string
- Description for the branch.
- destinationBranch string
- Destination branch if the branch is a pull request branch.
- displayName string
- Display name for a branch. This is used as the default domain prefix.
- enableAuto booleanBuild 
- Enables auto building for the branch.
- enableBasic booleanAuth 
- Enables basic authorization for the branch.
- enableNotification boolean
- Enables notifications for the branch.
- enablePerformance booleanMode 
- Enables performance mode for the branch.
- enablePull booleanRequest Preview 
- Enables pull request previews for this branch.
- environmentVariables {[key: string]: string}
- Environment variables for the branch.
- framework string
- Framework for the branch.
- pullRequest stringEnvironment Name 
- Amplify environment name for the pull request.
- sourceBranch string
- Source branch if the branch is a pull request branch.
- stage string
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- {[key: string]: string}
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ttl string
- Content Time To Live (TTL) for the website in seconds.
- app_id str
- Unique ID for an Amplify app.
- arn str
- ARN for the branch.
- associated_resources Sequence[str]
- A list of custom resources that are linked to this branch.
- backend_environment_ strarn 
- ARN for a backend environment that is part of an Amplify app.
- basic_auth_ strcredentials 
- Basic authorization credentials for the branch.
- branch_name str
- Name for the branch.
- custom_domains Sequence[str]
- Custom domains for the branch.
- description str
- Description for the branch.
- destination_branch str
- Destination branch if the branch is a pull request branch.
- display_name str
- Display name for a branch. This is used as the default domain prefix.
- enable_auto_ boolbuild 
- Enables auto building for the branch.
- enable_basic_ boolauth 
- Enables basic authorization for the branch.
- enable_notification bool
- Enables notifications for the branch.
- enable_performance_ boolmode 
- Enables performance mode for the branch.
- enable_pull_ boolrequest_ preview 
- Enables pull request previews for this branch.
- environment_variables Mapping[str, str]
- Environment variables for the branch.
- framework str
- Framework for the branch.
- pull_request_ strenvironment_ name 
- Amplify environment name for the pull request.
- source_branch str
- Source branch if the branch is a pull request branch.
- stage str
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Mapping[str, str]
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ttl str
- Content Time To Live (TTL) for the website in seconds.
- appId String
- Unique ID for an Amplify app.
- arn String
- ARN for the branch.
- associatedResources List<String>
- A list of custom resources that are linked to this branch.
- backendEnvironment StringArn 
- ARN for a backend environment that is part of an Amplify app.
- basicAuth StringCredentials 
- Basic authorization credentials for the branch.
- branchName String
- Name for the branch.
- customDomains List<String>
- Custom domains for the branch.
- description String
- Description for the branch.
- destinationBranch String
- Destination branch if the branch is a pull request branch.
- displayName String
- Display name for a branch. This is used as the default domain prefix.
- enableAuto BooleanBuild 
- Enables auto building for the branch.
- enableBasic BooleanAuth 
- Enables basic authorization for the branch.
- enableNotification Boolean
- Enables notifications for the branch.
- enablePerformance BooleanMode 
- Enables performance mode for the branch.
- enablePull BooleanRequest Preview 
- Enables pull request previews for this branch.
- environmentVariables Map<String>
- Environment variables for the branch.
- framework String
- Framework for the branch.
- pullRequest StringEnvironment Name 
- Amplify environment name for the pull request.
- sourceBranch String
- Source branch if the branch is a pull request branch.
- stage String
- Describes the current stage for the branch. Valid values: PRODUCTION,BETA,DEVELOPMENT,EXPERIMENTAL,PULL_REQUEST.
- Map<String>
- Key-value mapping of resource tags. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- ttl String
- Content Time To Live (TTL) for the website in seconds.
Import
Using pulumi import, import Amplify branch using app_id and branch_name. For example:
$ pulumi import aws:amplify/branch:Branch master d2ypk4k47z8u6/master
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.