:doc:`MWAAServerless <../../mwaa-serverless>` / Client / update_workflow

***************
update_workflow
***************



.. py:method:: MWAAServerless.Client.update_workflow(**kwargs)

  

  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.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mwaa-serverless-2024-07-26/UpdateWorkflow>`_  


  **Request Syntax**
  ::

    response = client.update_workflow(
        WorkflowArn='string',
        DefinitionS3Location={
            'Bucket': 'string',
            'ObjectKey': 'string',
            'VersionId': 'string'
        },
        RoleArn='string',
        Description='string',
        LoggingConfiguration={
            'LogGroupName': 'string'
        },
        EngineVersion=123,
        NetworkConfiguration={
            'SecurityGroupIds': [
                'string',
            ],
            'SubnetIds': [
                'string',
            ]
        },
        TriggerMode='string'
    )
    
  :type WorkflowArn: string
  :param WorkflowArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the workflow you want to update.

    

  
  :type DefinitionS3Location: dict
  :param DefinitionS3Location: **[REQUIRED]** 

    The Amazon S3 location where the updated workflow definition file is stored.

    

  
    - **Bucket** *(string) --* **[REQUIRED]** 

      The name of the Amazon S3 bucket that contains the workflow definition file.

      

    
    - **ObjectKey** *(string) --* **[REQUIRED]** 

      The key (name) of the workflow definition file within the S3 bucket.

      

    
    - **VersionId** *(string) --* 

      Optional. The version ID of the workflow definition file in Amazon S3. If not specified, the latest version is used.

      

    
  
  :type RoleArn: string
  :param RoleArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the IAM role that Amazon Managed Workflows for Apache Airflow Serverless assumes when it executes the updated workflow.

    

  
  :type Description: string
  :param Description: 

    An updated description for the workflow.

    

  
  :type LoggingConfiguration: dict
  :param LoggingConfiguration: 

    Updated logging configuration for the workflow.

    

  
    - **LogGroupName** *(string) --* **[REQUIRED]** 

      The name of the CloudWatch log group where workflow execution logs are stored.

      

    
  
  :type EngineVersion: integer
  :param EngineVersion: 

    The version of the Amazon Managed Workflows for Apache Airflow Serverless engine that you want to use for the updated workflow.

    

  
  :type NetworkConfiguration: dict
  :param NetworkConfiguration: 

    Updated network configuration for the workflow execution environment.

    

  
    - **SecurityGroupIds** *(list) --* 

      A list of VPC security group IDs to associate with the workflow execution environment.

      

    
      - *(string) --* 

      
  
    - **SubnetIds** *(list) --* 

      A list of VPC subnet IDs where the workflow execution environment is deployed.

      

    
      - *(string) --* 

      
  
  
  :type TriggerMode: string
  :param TriggerMode: 

    The trigger mode for the workflow execution.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'WorkflowArn': 'string',
          'ModifiedAt': datetime(2015, 1, 1),
          'WorkflowVersion': 'string',
          'Warnings': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **WorkflowArn** *(string) --* 

        The Amazon Resource Name (ARN) of the updated workflow.

        
      

      - **ModifiedAt** *(datetime) --* 

        The timestamp when the workflow was last modified, in ISO 8601 date-time format.

        
      

      - **WorkflowVersion** *(string) --* 

        The version identifier of the updated workflow.

        
      

      - **Warnings** *(list) --* 

        Warning messages generated during workflow update.

        
        

        - *(string) --* 
    
  
  **Exceptions**
  
  *   :py:class:`MWAAServerless.Client.exceptions.ThrottlingException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.ValidationException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.InternalServerException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.OperationTimeoutException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.ConflictException`

  
  *   :py:class:`MWAAServerless.Client.exceptions.ServiceQuotaExceededException`

  