:doc:`IoTFleetWise <../../iotfleetwise>` / Client / update_campaign

***************
update_campaign
***************



.. py:method:: IoTFleetWise.Client.update_campaign(**kwargs)

  

  Updates a campaign.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/UpdateCampaign>`_  


  **Request Syntax**
  ::

    response = client.update_campaign(
        name='string',
        description='string',
        dataExtraDimensions=[
            'string',
        ],
        action='APPROVE'|'SUSPEND'|'RESUME'|'UPDATE'
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the campaign to update.

    

  
  :type description: string
  :param description: 

    The description of the campaign.

    

  
  :type dataExtraDimensions: list
  :param dataExtraDimensions: 

    A list of vehicle attributes to associate with a signal.

     

    Default: An empty array

    

  
    - *(string) --* 

    

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

    Specifies how to update a campaign. The action can be one of the following:

     

    
    * ``APPROVE`` - To approve delivering a data collection scheme to vehicles.
     
    * ``SUSPEND`` - To suspend collecting signal data. The campaign is deleted from vehicles and all vehicles in the suspended campaign will stop sending data.
     
    * ``RESUME`` - To reactivate the ``SUSPEND`` campaign. The campaign is redeployed to all vehicles and the vehicles will resume sending data.
     
    * ``UPDATE`` - To update a campaign.
    

    

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

    
    ::

      {
          'arn': 'string',
          'name': 'string',
          'status': 'CREATING'|'WAITING_FOR_APPROVAL'|'RUNNING'|'SUSPENDED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **arn** *(string) --* 

        The Amazon Resource Name (ARN) of the campaign.

        
      

      - **name** *(string) --* 

        The name of the updated campaign.

        
      

      - **status** *(string) --* 

        The state of a campaign. The status can be one of:

         

        
        * ``CREATING`` - Amazon Web Services IoT FleetWise is processing your request to create the campaign.
         
        * ``WAITING_FOR_APPROVAL`` - After you create a campaign, it enters this state. Use the API operation to approve the campaign for deployment to the target vehicle or fleet.
         
        * ``RUNNING`` - The campaign is active.
         
        * ``SUSPENDED`` - The campaign is suspended. To resume the campaign, use the API operation.
        

        
  
  **Exceptions**
  
  *   :py:class:`IoTFleetWise.Client.exceptions.ResourceNotFoundException`

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

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

  
  *   :py:class:`IoTFleetWise.Client.exceptions.ThrottlingException`

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

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

  