:doc:`AppConfig <../../appconfig>` / Client / update_configuration_profile

****************************
update_configuration_profile
****************************



.. py:method:: AppConfig.Client.update_configuration_profile(**kwargs)

  

  Updates a configuration profile.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/appconfig-2019-10-09/UpdateConfigurationProfile>`_  


  **Request Syntax**
  ::

    response = client.update_configuration_profile(
        ApplicationId='string',
        ConfigurationProfileId='string',
        Name='string',
        Description='string',
        RetrievalRoleArn='string',
        Validators=[
            {
                'Type': 'JSON_SCHEMA'|'LAMBDA',
                'Content': 'string'
            },
        ],
        KmsKeyIdentifier='string'
    )
    
  :type ApplicationId: string
  :param ApplicationId: **[REQUIRED]** 

    The application ID.

    

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

    The ID of the configuration profile.

    

  
  :type Name: string
  :param Name: 

    The name of the configuration profile.

    

  
  :type Description: string
  :param Description: 

    A description of the configuration profile.

    

  
  :type RetrievalRoleArn: string
  :param RetrievalRoleArn: 

    The ARN of an IAM role with permission to access the configuration at the specified ``LocationUri``.

     

    .. warning::

       

      A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.

      

    

  
  :type Validators: list
  :param Validators: 

    A list of methods for validating the configuration.

    

  
    - *(dict) --* 

      A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid. For more information, see `About validators <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-profile.html#appconfig-creating-configuration-and-profile-validators>`__ in the *AppConfig User Guide*.

      

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

        AppConfig supports validators of type ``JSON_SCHEMA`` and ``LAMBDA``

        

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

        Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.

        

      
    

  :type KmsKeyIdentifier: string
  :param KmsKeyIdentifier: 

    The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for ``hosted`` configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

    

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

    
    ::

      {
          'ApplicationId': 'string',
          'Id': 'string',
          'Name': 'string',
          'Description': 'string',
          'LocationUri': 'string',
          'RetrievalRoleArn': 'string',
          'Validators': [
              {
                  'Type': 'JSON_SCHEMA'|'LAMBDA',
                  'Content': 'string'
              },
          ],
          'Type': 'string',
          'KmsKeyArn': 'string',
          'KmsKeyIdentifier': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ApplicationId** *(string) --* 

        The application ID.

        
      

      - **Id** *(string) --* 

        The configuration profile ID.

        
      

      - **Name** *(string) --* 

        The name of the configuration profile.

        
      

      - **Description** *(string) --* 

        The configuration profile description.

        
      

      - **LocationUri** *(string) --* 

        The URI location of the configuration.

        
      

      - **RetrievalRoleArn** *(string) --* 

        The ARN of an IAM role with permission to access the configuration at the specified ``LocationUri``.

        
      

      - **Validators** *(list) --* 

        A list of methods for validating the configuration.

        
        

        - *(dict) --* 

          A validator provides a syntactic or semantic check to ensure the configuration that you want to deploy functions as intended. To validate your application configuration data, you provide a schema or an Amazon Web Services Lambda function that runs against the configuration. The configuration deployment or update can only proceed when the configuration data is valid. For more information, see `About validators <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-profile.html#appconfig-creating-configuration-and-profile-validators>`__ in the *AppConfig User Guide*.

          
          

          - **Type** *(string) --* 

            AppConfig supports validators of type ``JSON_SCHEMA`` and ``LAMBDA``

            
          

          - **Content** *(string) --* 

            Either the JSON Schema content or the Amazon Resource Name (ARN) of an Lambda function.

            
      
    
      

      - **Type** *(string) --* 

        The type of configurations contained in the profile. AppConfig supports ``feature flags`` and ``freeform`` configurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values for ``Type``:

         

        ``AWS.AppConfig.FeatureFlags``

         

        ``AWS.Freeform``

        
      

      - **KmsKeyArn** *(string) --* 

        The Amazon Resource Name of the Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for ``hosted`` configuration types. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

        
      

      - **KmsKeyIdentifier** *(string) --* 

        The Key Management Service key identifier (key ID, key alias, or key ARN) provided when the resource was created or updated.

        
  
  **Exceptions**
  
  *   :py:class:`AppConfig.Client.exceptions.BadRequestException`

  
  *   :py:class:`AppConfig.Client.exceptions.ResourceNotFoundException`

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

  

  **Examples**

  The following update-configuration-profile example updates the description of the specified configuration profile.
  ::

    response = client.update_configuration_profile(
        ApplicationId='339ohji',
        ConfigurationProfileId='ur8hx2f',
        Description='Configuration profile used for examples.',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ApplicationId': '339ohji',
        'Description': 'Configuration profile used for examples.',
        'Id': 'ur8hx2f',
        'LocationUri': 'ssm-parameter://Example-Parameter',
        'Name': 'Example-Configuration-Profile',
        'RetrievalRoleArn': 'arn:aws:iam::111122223333:role/Example-App-Config-Role',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  