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

**********************
set_type_configuration
**********************



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

  

  Specifies the configuration data for a CloudFormation extension, such as a resource or Hook, in the given account and Region.

   

  For more information, see `Edit configuration data for extensions in your account <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-set-configuration.html>`__ in the *CloudFormation User Guide*.

   

  To view the current configuration data for an extension, refer to the ``ConfigurationSchema`` element of `DescribeType <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html>`__.

   

  .. warning::

     

    It's strongly recommended that you use dynamic references to restrict sensitive configuration definitions, such as third-party credentials. For more information, see `Specify values stored in other services using dynamic references <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html>`__ in the *CloudFormation User Guide*.

     

   

  For more information about setting the configuration data for resource types, see `Defining the account-level configuration of an extension <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-model.html#resource-type-howto-configuration>`__ in the *CloudFormation Command Line Interface (CLI) User Guide*. For more information about setting the configuration data for 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/SetTypeConfiguration>`_  


  **Request Syntax**
  ::

    response = client.set_type_configuration(
        TypeArn='string',
        Configuration='string',
        ConfigurationAlias='string',
        TypeName='string',
        Type='RESOURCE'|'MODULE'|'HOOK'
    )
    
  :type TypeArn: string
  :param TypeArn: 

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

     

    For public extensions, this will be the ARN assigned when you call the `ActivateType <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html>`__ API operation in this account and Region. For private extensions, this will be the ARN assigned when you call the `RegisterType <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html>`__ API operation in this account and Region.

     

    Do not include the extension versions suffix at the end of the ARN. You can set the configuration for an extension, but not for a specific extension version.

    

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

    The configuration data for the extension in this account and Region.

     

    The configuration data must be formatted as JSON and validate against the extension's schema returned in the ``Schema`` response element of `DescribeType <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html>`__.

    

  
  :type ConfigurationAlias: string
  :param ConfigurationAlias: 

    An alias by which to refer to this extension configuration data.

     

    Conditional: Specifying a configuration alias is required when setting a configuration for a resource type extension.

    

  
  :type TypeName: string
  :param TypeName: 

    The name of the extension.

     

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

    

  
  :type Type: string
  :param Type: 

    The type of extension.

     

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

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **ConfigurationArn** *(string) --* 

        The Amazon Resource Name (ARN) for the configuration data in this account and Region.

         

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

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

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

  