:doc:`CloudFormation <../../cloudformation>` / Client / publish_type

************
publish_type
************



.. py:method:: CloudFormation.Client.publish_type(**kwargs)

  

  Publishes the specified extension to the CloudFormation registry as a public extension in this Region. Public extensions are available for use by all CloudFormation users. For more information about publishing extensions, see `Publishing extensions to make them available for public use <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html>`__ in the *CloudFormation Command Line Interface (CLI) User Guide*.

   

  To publish an extension, you must be registered as a publisher with CloudFormation. For more information, see `RegisterPublisher <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterPublisher.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/PublishType>`_  


  **Request Syntax**
  ::

    response = client.publish_type(
        Type='RESOURCE'|'MODULE'|'HOOK',
        Arn='string',
        TypeName='string',
        PublicVersionNumber='string'
    )
    
  :type Type: string
  :param Type: 

    The type of the extension.

     

    Conditional: You must specify ``Arn``, or ``TypeName`` and ``Type``.

    

  
  :type Arn: string
  :param Arn: 

    The Amazon Resource Name (ARN) of the extension.

     

    Conditional: You must specify ``Arn``, or ``TypeName`` and ``Type``.

    

  
  :type TypeName: string
  :param TypeName: 

    The name of the extension.

     

    Conditional: You must specify ``Arn``, or ``TypeName`` and ``Type``.

    

  
  :type PublicVersionNumber: string
  :param PublicVersionNumber: 

    The version number to assign to this version of the extension.

     

    Use the following format, and adhere to semantic versioning when assigning a version number to your extension:

     

    ``MAJOR.MINOR.PATCH``

     

    For more information, see `Semantic Versioning 2.0.0 <https://semver.org/>`__.

     

    If you don't specify a version number, CloudFormation increments the version number by one minor version release.

     

    You cannot specify a version number the first time you publish a type. CloudFormation automatically sets the first version number to be ``1.0.0``.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **PublicTypeArn** *(string) --* 

        The Amazon Resource Name (ARN) assigned to the public extension upon publication.

        
  
  **Exceptions**
  
  *   :py:class:`CloudFormation.Client.exceptions.CFNRegistryException`

  
  *   :py:class:`CloudFormation.Client.exceptions.TypeNotFoundException`

  