:doc:`IoT <../../iot>` / Client / update_package_version

**********************
update_package_version
**********************



.. py:method:: IoT.Client.update_package_version(**kwargs)

  

  Updates the supported fields for a specific package version.

   

  Requires permission to access the `UpdatePackageVersion <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ and `GetIndexingConfiguration <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ actions.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/UpdatePackageVersion>`_  


  **Request Syntax**
  ::

    response = client.update_package_version(
        packageName='string',
        versionName='string',
        description='string',
        attributes={
            'string': 'string'
        },
        artifact={
            's3Location': {
                'bucket': 'string',
                'key': 'string',
                'version': 'string'
            }
        },
        action='PUBLISH'|'DEPRECATE',
        recipe='string',
        clientToken='string'
    )
    
  :type packageName: string
  :param packageName: **[REQUIRED]** 

    The name of the associated software package.

    

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

    The name of the target package version.

    

  
  :type description: string
  :param description: 

    The package version description.

    

  
  :type attributes: dict
  :param attributes: 

    Metadata that can be used to define a package version’s configuration. For example, the Amazon S3 file location, configuration options that are being sent to the device or fleet.

     

    **Note:** Attributes can be updated only when the package version is in a draft state.

     

    The combined size of all the attributes on a package version is limited to 3KB.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type artifact: dict
  :param artifact: 

    The various components that make up a software package version.

    

  
    - **s3Location** *(dict) --* 

      The S3 location.

      

    
      - **bucket** *(string) --* 

        The S3 bucket.

        

      
      - **key** *(string) --* 

        The S3 key.

        

      
      - **version** *(string) --* 

        The S3 bucket version.

        

      
    
  
  :type action: string
  :param action: 

    The status that the package version should be assigned. For more information, see `Package version lifecycle <https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle>`__.

    

  
  :type recipe: string
  :param recipe: 

    The inline job document associated with a software package version used for a quick job deployment.

    

  
  :type clientToken: string
  :param clientToken: 

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.ThrottlingException`

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

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

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

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

  