:doc:`Proton <../../proton>` / Client / create_template_sync_config

***************************
create_template_sync_config
***************************



.. py:method:: Proton.Client.create_template_sync_config(**kwargs)

  

  Set up a template to create new template versions automatically by tracking a linked repository. A linked repository is a repository that has been registered with Proton. For more information, see  CreateRepository.

   

  When a commit is pushed to your linked repository, Proton checks for changes to your repository template bundles. If it detects a template bundle change, a new major or minor version of its template is created, if the version doesn’t already exist. For more information, see `Template sync configurations <https://docs.aws.amazon.com/proton/latest/userguide/ag-template-sync-configs.html>`__ in the *Proton User Guide*.

  

  .. danger::

        This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.


  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/proton-2020-07-20/CreateTemplateSyncConfig>`_  


  **Request Syntax**
  ::

    response = client.create_template_sync_config(
        branch='string',
        repositoryName='string',
        repositoryProvider='GITHUB'|'GITHUB_ENTERPRISE'|'BITBUCKET',
        subdirectory='string',
        templateName='string',
        templateType='ENVIRONMENT'|'SERVICE'
    )
    
  :type branch: string
  :param branch: **[REQUIRED]** 

    The repository branch for your template.

    

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

    The repository name (for example, ``myrepos/myrepo``).

    

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

    The provider type for your repository.

    

  
  :type subdirectory: string
  :param subdirectory: 

    A repository subdirectory path to your template bundle directory. When included, Proton limits the template bundle search to this repository directory.

    

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

    The name of your registered template.

    

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

    The type of the registered template.

    

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

    
    ::

      {
          'templateSyncConfig': {
              'branch': 'string',
              'repositoryName': 'string',
              'repositoryProvider': 'GITHUB'|'GITHUB_ENTERPRISE'|'BITBUCKET',
              'subdirectory': 'string',
              'templateName': 'string',
              'templateType': 'ENVIRONMENT'|'SERVICE'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **templateSyncConfig** *(dict) --* 

        The template sync configuration detail data that's returned by Proton.

        
        

        - **branch** *(string) --* 

          The repository branch.

          
        

        - **repositoryName** *(string) --* 

          The repository name (for example, ``myrepos/myrepo``).

          
        

        - **repositoryProvider** *(string) --* 

          The repository provider.

          
        

        - **subdirectory** *(string) --* 

          A subdirectory path to your template bundle version.

          
        

        - **templateName** *(string) --* 

          The template name.

          
        

        - **templateType** *(string) --* 

          The template type.

          
    
  
  **Exceptions**
  
  *   :py:class:`Proton.Client.exceptions.ServiceQuotaExceededException`

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

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

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

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

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

  