:doc:`DatabaseMigrationService <../../dms>` / Client / start_metadata_model_export_as_script

*************************************
start_metadata_model_export_as_script
*************************************



.. py:method:: DatabaseMigrationService.Client.start_metadata_model_export_as_script(**kwargs)

  

  Saves your converted code to a file as a SQL script, and stores this file on your Amazon S3 bucket.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/StartMetadataModelExportAsScript>`_  


  **Request Syntax**
  ::

    response = client.start_metadata_model_export_as_script(
        MigrationProjectIdentifier='string',
        SelectionRules='string',
        Origin='SOURCE'|'TARGET',
        FileName='string'
    )
    
  :type MigrationProjectIdentifier: string
  :param MigrationProjectIdentifier: **[REQUIRED]** 

    The migration project name or Amazon Resource Name (ARN).

    

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

    A value that specifies the database objects to export.

    

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

    Whether to export the metadata model from the source or the target.

    

  
  :type FileName: string
  :param FileName: 

    The name of the model file to create in the Amazon S3 bucket.

    

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

    
    ::

      {
          'RequestIdentifier': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RequestIdentifier** *(string) --* 

        The identifier for the export operation.

        
  
  **Exceptions**
  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.AccessDeniedFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.InvalidResourceStateFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.ResourceAlreadyExistsFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.ResourceNotFoundFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.KMSKeyNotAccessibleFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.ResourceQuotaExceededFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.S3ResourceNotFoundFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.S3AccessDeniedFault`

  