update_workflow
async
¶
update_workflow(
workflow_arn: WorkflowArn,
definition_s3_location: DefinitionS3Location,
role_arn: RoleARN,
*,
config_overrides: Optional[AsyncMWAAServerlessClientConfig] = None,
code: Optional[Code] = None,
description: Optional[DescriptionString] = None,
logging_configuration: Optional[LoggingConfiguration] = None,
engine_version: Optional[EngineVersion] = None,
network_configuration: Optional[NetworkConfiguration] = None,
environment: Optional[Environment] = None,
trigger_mode: Optional[GenericString] = None,
on_behalf_of: Optional[OnBehalfOfIdentity] = None,
) -> UpdateWorkflowResponse
Updates an existing workflow with new configuration settings. This operation allows you to modify the workflow definition, role, and other settings. When you update a workflow, Amazon Managed Workflows for Apache Airflow Serverless automatically creates a new version with the updated configuration and disables scheduling on all previous versions to ensure only one version is actively scheduled at a time. The update operation maintains workflow history while providing a clean transition to the new configuration.
Parameters:
-
workflow_arn(WorkflowArn) –The Amazon Resource Name (ARN) of the workflow you want to update.
-
definition_s3_location(DefinitionS3Location) –The Amazon S3 location where the updated workflow definition file is stored.
-
code(Optional[Code], default:None) –The location of code artifacts in Amazon S3 for the updated workflow. The service copies the code from this location at the time of the request.
-
role_arn(RoleARN) –The Amazon Resource Name (ARN) of the IAM role that Amazon Managed Workflows for Apache Airflow Serverless assumes when it executes the updated workflow.
-
description(Optional[DescriptionString], default:None) –An updated description for the workflow.
-
logging_configuration(Optional[LoggingConfiguration], default:None) –Updated logging configuration for the workflow.
-
engine_version(Optional[EngineVersion], default:None) –The version of the Amazon Managed Workflows for Apache Airflow Serverless engine that you want to use for the updated workflow.
-
network_configuration(Optional[NetworkConfiguration], default:None) –Updated network configuration for the workflow execution environment.
-
environment(Optional[Environment], default:None) –The environment variables to set for tasks in the workflow.
The variables that you specify replace all existing environment variables for the workflow. If you don't specify this parameter, the workflow has no environment variables. To keep existing environment variables, include them in the request.
-
trigger_mode(Optional[GenericString], default:None) –The trigger mode for the workflow execution.
-
on_behalf_of(Optional[OnBehalfOfIdentity], default:None) –Specifies whether scheduled runs of the new workflow version carry your identity context in addition to the execution role. Identity context is information about your user identity that Amazon Web Services propagates with your credentials, for example when you sign in through IAM Identity Center. Specify one of the following values:
-
EXECUTION_ROLE– If you specify this value, scheduled runs use only the execution role that you specify inRoleArn. -
ORIGIN_IDENTITY– If you specify this value, scheduled runs use the execution role that you specify inRoleArn, with your identity context attached. To use this value, the workflow definition must include a schedule. The credentials that you sign the request with must also include identity context.
If you don't specify this parameter, the new workflow version uses
EXECUTION_ROLE, and its scheduled runs no longer carry your identity context. To keep your identity context attached to scheduled runs, specifyORIGIN_IDENTITYagain. Scheduled runs of the new version then carry the identity context from your update request. -
Raises:
-
AccessDeniedException–You do not have sufficient permission to perform this action.
-
ConflictException–You cannot create a resource that already exists, or the resource is in a state that prevents the requested operation.
-
InternalServerException–An unexpected server-side error occurred during request processing.
-
OperationTimeoutException–The operation timed out.
-
ResourceNotFoundException–The specified resource was not found. You can only access or modify a resource that already exists.
-
ServiceQuotaExceededException–The request exceeds the service quota for Amazon Managed Workflows for Apache Airflow Serverless resources. This can occur when you attempt to create more workflows than allowed, exceed concurrent workflow run limits, or surpass task execution limits. Amazon Managed Workflows for Apache Airflow Serverless implements admission control using DynamoDB-based counters to manage resource utilization across the multi-tenant environment. Contact Amazon Web Services Support to request quota increases if you need higher limits for your use case.
-
ThrottlingException–The request was denied because too many requests were made in a short period, exceeding the service rate limits. Amazon Managed Workflows for Apache Airflow Serverless implements throttling controls to ensure fair resource allocation across all customers in the multi-tenant environment. This helps maintain service stability and performance. If you encounter throttling, implement exponential backoff and retry logic in your applications, or consider distributing your API calls over a longer time period.
-
ValidationException–The specified request parameters are invalid, missing, or inconsistent with Amazon Managed Workflows for Apache Airflow Serverless service requirements. This can occur when workflow definitions contain unsupported operators, when required IAM permissions are missing, when S3 locations are inaccessible, or when network configurations are invalid. The service validates workflow definitions, execution roles, and resource configurations to ensure compatibility with the managed Airflow environment and security requirements.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_mwaa_serverless/_services/async_mwaa_serverless.py
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 | |