update_branch
async
¶
update_branch(
app_id: AppId,
branch_name: BranchName,
*,
config_overrides: Optional[AsyncAmplifyClientConfig] = None,
description: Optional[Description] = None,
framework: Optional[Framework] = None,
stage: Optional[Stage] = None,
enable_notification: Optional[EnableNotification] = None,
enable_auto_build: Optional[EnableAutoBuild] = None,
enable_skew_protection: Optional[EnableSkewProtection] = None,
environment_variables: Optional[EnvironmentVariables] = None,
basic_auth_credentials: Optional[BasicAuthCredentials] = None,
enable_basic_auth: Optional[EnableBasicAuth] = None,
enable_performance_mode: Optional[EnablePerformanceMode] = None,
build_spec: Optional[BuildSpec] = None,
ttl: Optional[TTL] = None,
display_name: Optional[DisplayName] = None,
enable_pull_request_preview: Optional[EnablePullRequestPreview] = None,
pull_request_environment_name: Optional[PullRequestEnvironmentName] = None,
backend_environment_arn: Optional[BackendEnvironmentArn] = None,
backend: Optional[Backend] = None,
compute_role_arn: Optional[ComputeRoleArn] = None,
) -> UpdateBranchResult
Updates a branch for an Amplify app.
Parameters:
-
app_id(AppId) –The unique ID for an Amplify app.
-
branch_name(BranchName) –The name of the branch.
-
description(Optional[Description], default:None) –The description for the branch.
-
framework(Optional[Framework], default:None) –The framework for the branch.
-
stage(Optional[Stage], default:None) –Describes the current stage for the branch.
-
enable_notification(Optional[EnableNotification], default:None) –Enables notifications for the branch.
-
enable_auto_build(Optional[EnableAutoBuild], default:None) –Enables auto building for the branch.
-
enable_skew_protection(Optional[EnableSkewProtection], default:None) –Specifies whether the skew protection feature is enabled for the branch.
Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs. For more information about skew protection, see Skew protection for Amplify deployments in the Amplify User Guide.
-
environment_variables(Optional[EnvironmentVariables], default:None) –The environment variables for the branch.
-
basic_auth_credentials(Optional[BasicAuthCredentials], default:None) –The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format
user:password. -
enable_basic_auth(Optional[EnableBasicAuth], default:None) –Enables basic authorization for the branch.
-
enable_performance_mode(Optional[EnablePerformanceMode], default:None) –Enables performance mode for the branch.
Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
-
build_spec(Optional[BuildSpec], default:None) –The build specification (build spec) for the branch.
-
ttl(Optional[TTL], default:None) –The content Time to Live (TTL) for the website in seconds.
-
display_name(Optional[DisplayName], default:None) –The display name for a branch. This is used as the default domain prefix.
-
enable_pull_request_preview(Optional[EnablePullRequestPreview], default:None) –Enables pull request previews for this branch.
-
pull_request_environment_name(Optional[PullRequestEnvironmentName], default:None) –The Amplify environment name for the pull request.
-
backend_environment_arn(Optional[BackendEnvironmentArn], default:None) –The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.
This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).
-
backend(Optional[Backend], default:None) –The backend for a
Branchof an Amplify app. Use for a backend created from an CloudFormation stack.This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
-
compute_role_arn(Optional[ComputeRoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see Adding an SSR Compute role in the Amplify User Guide.
Raises:
-
BadRequestException–A request contains unexpected data.
-
DependentServiceFailureException–An operation failed because a dependent service threw an exception.
-
InternalFailureException–The service failed to perform an operation due to an internal issue.
-
NotFoundException–An entity was not found during an operation.
-
UnauthorizedException–An operation failed due to a lack of access.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_amplify/_services/async_amplify.py
2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 | |