:doc:`HealthImaging <../../medical-imaging>` / Client / update_image_set_metadata

*************************
update_image_set_metadata
*************************



.. py:method:: HealthImaging.Client.update_image_set_metadata(**kwargs)

  

  Update image set metadata attributes.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/medical-imaging-2023-07-19/UpdateImageSetMetadata>`_  


  **Request Syntax**
  ::

    response = client.update_image_set_metadata(
        datastoreId='string',
        imageSetId='string',
        latestVersionId='string',
        force=True|False,
        updateImageSetMetadataUpdates={
            'DICOMUpdates': {
                'removableAttributes': b'bytes',
                'updatableAttributes': b'bytes'
            },
            'revertToVersionId': 'string'
        }
    )
    
  :type datastoreId: string
  :param datastoreId: **[REQUIRED]** 

    The data store identifier.

    

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

    The image set identifier.

    

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

    The latest image set version identifier.

    

  
  :type force: boolean
  :param force: 

    Setting this flag will force the ``UpdateImageSetMetadata`` operation for the following attributes:

     

    
    * ``Tag.StudyInstanceUID``, ``Tag.SeriesInstanceUID``, ``Tag.SOPInstanceUID``, and ``Tag.StudyID``
     
    * Adding, removing, or updating private tags for an individual SOP Instance
    

    

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

    Update image set metadata updates.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``DICOMUpdates``, ``revertToVersionId``. 

  
    - **DICOMUpdates** *(dict) --* 

      The object containing ``removableAttributes`` and ``updatableAttributes``.

      

    
      - **removableAttributes** *(bytes) --* 

        The DICOM tags to be removed from ``ImageSetMetadata``.

        

      
      - **updatableAttributes** *(bytes) --* 

        The DICOM tags that need to be updated in ``ImageSetMetadata``.

        

      
    
    - **revertToVersionId** *(string) --* 

      Specifies the previous image set version ID to revert the current image set back to.

       

      .. note::

        

        You must provide either ``revertToVersionId`` or ``DICOMUpdates`` in your request. A ``ValidationException`` error is thrown if both parameters are provided at the same time.

        

      

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

    
    ::

      {
          'datastoreId': 'string',
          'imageSetId': 'string',
          'latestVersionId': 'string',
          'imageSetState': 'ACTIVE'|'LOCKED'|'DELETED',
          'imageSetWorkflowStatus': 'CREATED'|'COPIED'|'COPYING'|'COPYING_WITH_READ_ONLY_ACCESS'|'COPY_FAILED'|'UPDATING'|'UPDATED'|'UPDATE_FAILED'|'DELETING'|'DELETED'|'IMPORTING'|'IMPORTED'|'IMPORT_FAILED',
          'createdAt': datetime(2015, 1, 1),
          'updatedAt': datetime(2015, 1, 1),
          'message': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **datastoreId** *(string) --* 

        The data store identifier.

        
      

      - **imageSetId** *(string) --* 

        The image set identifier.

        
      

      - **latestVersionId** *(string) --* 

        The latest image set version identifier.

        
      

      - **imageSetState** *(string) --* 

        The image set state.

        
      

      - **imageSetWorkflowStatus** *(string) --* 

        The image set workflow status.

        
      

      - **createdAt** *(datetime) --* 

        The timestamp when image set metadata was created.

        
      

      - **updatedAt** *(datetime) --* 

        The timestamp when image set metadata was updated.

        
      

      - **message** *(string) --* 

        The error message thrown if an update image set metadata action fails.

        
  
  **Exceptions**
  
  *   :py:class:`HealthImaging.Client.exceptions.ThrottlingException`

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

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

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

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

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

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

  