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

*************
activate_type
*************



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

  

  Activates a public third-party extension, such as a resource or module, to make it available for use in stack templates in your current account and Region. It can also create CloudFormation Hooks, which allow you to evaluate resource configurations before CloudFormation provisions them. Hooks integrate with both CloudFormation and Cloud Control API operations.

   

  After you activate an extension, you can use `SetTypeConfiguration <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_SetTypeConfiguration.html>`__ to set specific properties for the extension.

   

  To see which extensions have been activated, use `ListTypes <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ListTypes.html>`__. To see configuration details for an extension, use `DescribeType <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html>`__.

   

  For more information, see `Activate a third-party public extension in your account <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public-activate-extension.html>`__ in the *CloudFormation User Guide*. For information about creating Hooks, see the `CloudFormation Hooks User Guide <https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/what-is-cloudformation-hooks.html>`__.

  

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


  **Request Syntax**
  ::

    response = client.activate_type(
        Type='RESOURCE'|'MODULE'|'HOOK',
        PublicTypeArn='string',
        PublisherId='string',
        TypeName='string',
        TypeNameAlias='string',
        AutoUpdate=True|False,
        LoggingConfig={
            'LogRoleArn': 'string',
            'LogGroupName': 'string'
        },
        ExecutionRoleArn='string',
        VersionBump='MAJOR'|'MINOR',
        MajorVersion=123
    )
    
  :type Type: string
  :param Type: 

    The extension type.

     

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

    

  
  :type PublicTypeArn: string
  :param PublicTypeArn: 

    The Amazon Resource Name (ARN) of the public extension.

     

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

    

  
  :type PublisherId: string
  :param PublisherId: 

    The ID of the extension publisher.

     

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

    

  
  :type TypeName: string
  :param TypeName: 

    The name of the extension.

     

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

    

  
  :type TypeNameAlias: string
  :param TypeNameAlias: 

    An alias to assign to the public extension in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.

     

    An extension alias must be unique within a given account and Region. You can activate the same public resource multiple times in the same account and Region, using different type name aliases.

    

  
  :type AutoUpdate: boolean
  :param AutoUpdate: 

    Whether to automatically update the extension in this account and Region when a new *minor* version is published by the extension publisher. Major versions released by the publisher must be manually updated.

     

    The default is ``true``.

    

  
  :type LoggingConfig: dict
  :param LoggingConfig: 

    Contains logging configuration information for an extension.

    

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

      The Amazon Resource Name (ARN) of the role that CloudFormation should assume when sending log entries to CloudWatch Logs.

      

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

      The Amazon CloudWatch Logs group to which CloudFormation sends error logging information when invoking the extension's handlers.

      

    
  
  :type ExecutionRoleArn: string
  :param ExecutionRoleArn: 

    The name of the IAM execution role to use to activate the extension.

    

  
  :type VersionBump: string
  :param VersionBump: 

    Manually updates a previously-activated type to a new major or minor version, if available. You can also use this parameter to update the value of ``AutoUpdate``.

     

    
    * ``MAJOR``: CloudFormation updates the extension to the newest major version, if one is available.
     
    * ``MINOR``: CloudFormation updates the extension to the newest minor version, if one is available.
    

    

  
  :type MajorVersion: integer
  :param MajorVersion: 

    The major version of this extension you want to activate, if multiple major versions are available. The default is the latest major version. CloudFormation uses the latest available *minor* version of the major version selected.

     

    You can specify ``MajorVersion`` or ``VersionBump``, but not both.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the activated extension in this account and Region.

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

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

  