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

***********************
create_service_template
***********************



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

  

  Create a service template. The administrator creates a service template to define standardized infrastructure and an optional CI/CD service pipeline. Developers, in turn, select the service template from Proton. If the selected service template includes a service pipeline definition, they provide a link to their source code repository. Proton then deploys and manages the infrastructure defined by the selected service template. For more information, see `Proton templates <https://docs.aws.amazon.com/proton/latest/userguide/ag-templates.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/CreateServiceTemplate>`_  


  **Request Syntax**
  ::

    response = client.create_service_template(
        description='string',
        displayName='string',
        encryptionKey='string',
        name='string',
        pipelineProvisioning='CUSTOMER_MANAGED',
        tags=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type description: string
  :param description: 

    A description of the service template.

    

  
  :type displayName: string
  :param displayName: 

    The name of the service template as displayed in the developer interface.

    

  
  :type encryptionKey: string
  :param encryptionKey: 

    A customer provided encryption key that's used to encrypt data.

    

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

    The name of the service template.

    

  
  :type pipelineProvisioning: string
  :param pipelineProvisioning: 

    By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates that an Proton service pipeline *isn't* provided for your service. After it's included, it *can't* be changed. For more information, see `Template bundles <https://docs.aws.amazon.com/proton/latest/userguide/ag-template-authoring.html#ag-template-bundles>`__ in the *Proton User Guide*.

    

  
  :type tags: list
  :param tags: 

    An optional list of metadata items that you can associate with the Proton service template. A tag is a key-value pair.

     

    For more information, see `Proton resources and tagging <https://docs.aws.amazon.com/proton/latest/userguide/resources.html>`__ in the *Proton User Guide*.

    

  
    - *(dict) --* 

      A description of a resource tag.

      

    
      - **key** *(string) --* **[REQUIRED]** 

        The key of the resource tag.

        

      
      - **value** *(string) --* **[REQUIRED]** 

        The value of the resource tag.

        

      
    

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

    
    ::

      {
          'serviceTemplate': {
              'arn': 'string',
              'createdAt': datetime(2015, 1, 1),
              'description': 'string',
              'displayName': 'string',
              'encryptionKey': 'string',
              'lastModifiedAt': datetime(2015, 1, 1),
              'name': 'string',
              'pipelineProvisioning': 'CUSTOMER_MANAGED',
              'recommendedVersion': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **serviceTemplate** *(dict) --* 

        The service template detail data that's returned by Proton.

        
        

        - **arn** *(string) --* 

          The Amazon Resource Name (ARN) of the service template.

          
        

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

          The time when the service template was created.

          
        

        - **description** *(string) --* 

          A description of the service template.

          
        

        - **displayName** *(string) --* 

          The service template name as displayed in the developer interface.

          
        

        - **encryptionKey** *(string) --* 

          The customer provided service template encryption key that's used to encrypt data.

          
        

        - **lastModifiedAt** *(datetime) --* 

          The time when the service template was last modified.

          
        

        - **name** *(string) --* 

          The name of the service template.

          
        

        - **pipelineProvisioning** *(string) --* 

          If ``pipelineProvisioning`` is ``true``, a service pipeline is included in the service template. Otherwise, a service pipeline *isn't* included in the service template.

          
        

        - **recommendedVersion** *(string) --* 

          The recommended version of the service template.

          
    
  
  **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`

  