:doc:`Glue <../../glue>` / Client / register_schema_version

***********************
register_schema_version
***********************



.. py:method:: Glue.Client.register_schema_version(**kwargs)

  

  Adds a new version to the existing schema. Returns an error if new version of schema does not meet the compatibility requirements of the schema set. This API will not create a new schema set and will return a 404 error if the schema set is not already present in the Schema Registry.

   

  If this is the first schema definition to be registered in the Schema Registry, this API will store the schema version and return immediately. Otherwise, this call has the potential to run longer than other operations due to compatibility modes. You can call the ``GetSchemaVersion`` API with the ``SchemaVersionId`` to check compatibility modes.

   

  If the same schema definition is already stored in Schema Registry as a version, the schema ID of the existing schema is returned to the caller.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/RegisterSchemaVersion>`_  


  **Request Syntax**
  ::

    response = client.register_schema_version(
        SchemaId={
            'SchemaArn': 'string',
            'SchemaName': 'string',
            'RegistryName': 'string'
        },
        SchemaDefinition='string'
    )
    
  :type SchemaId: dict
  :param SchemaId: **[REQUIRED]** 

    This is a wrapper structure to contain schema identity fields. The structure contains:

     

    
    * SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either ``SchemaArn`` or ``SchemaName`` and ``RegistryName`` has to be provided.
     
    * SchemaId$SchemaName: The name of the schema. Either ``SchemaArn`` or ``SchemaName`` and ``RegistryName`` has to be provided.
    

    

  
    - **SchemaArn** *(string) --* 

      The Amazon Resource Name (ARN) of the schema. One of ``SchemaArn`` or ``SchemaName`` has to be provided.

      

    
    - **SchemaName** *(string) --* 

      The name of the schema. One of ``SchemaArn`` or ``SchemaName`` has to be provided.

      

    
    - **RegistryName** *(string) --* 

      The name of the schema registry that contains the schema.

      

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

    The schema definition using the ``DataFormat`` setting for the ``SchemaName``.

    

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

    
    ::

      {
          'SchemaVersionId': 'string',
          'VersionNumber': 123,
          'Status': 'AVAILABLE'|'PENDING'|'FAILURE'|'DELETING'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **SchemaVersionId** *(string) --* 

        The unique ID that represents the version of this schema.

        
      

      - **VersionNumber** *(integer) --* 

        The version of this schema (for sync flow only, in case this is the first version).

        
      

      - **Status** *(string) --* 

        The status of the schema version.

        
  
  **Exceptions**
  
  *   :py:class:`Glue.Client.exceptions.InvalidInputException`

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

  
  *   :py:class:`Glue.Client.exceptions.EntityNotFoundException`

  
  *   :py:class:`Glue.Client.exceptions.ResourceNumberLimitExceededException`

  
  *   :py:class:`Glue.Client.exceptions.ConcurrentModificationException`

  
  *   :py:class:`Glue.Client.exceptions.InternalServiceException`

  