:doc:`BedrockAgentCoreControl <../../bedrock-agentcore-control>` / Client / set_token_vault_cmk

*******************
set_token_vault_cmk
*******************



.. py:method:: BedrockAgentCoreControl.Client.set_token_vault_cmk(**kwargs)

  

  Sets the customer master key (CMK) for a token vault.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-control-2023-06-05/SetTokenVaultCMK>`_  


  **Request Syntax**
  ::

    response = client.set_token_vault_cmk(
        tokenVaultId='string',
        kmsConfiguration={
            'keyType': 'CustomerManagedKey'|'ServiceManagedKey',
            'kmsKeyArn': 'string'
        }
    )
    
  :type tokenVaultId: string
  :param tokenVaultId: 

    The unique identifier of the token vault to update.

    

  
  :type kmsConfiguration: dict
  :param kmsConfiguration: **[REQUIRED]** 

    The KMS configuration for the token vault, including the key type and KMS key ARN.

    

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

      The type of KMS key (CustomerManagedKey or ServiceManagedKey).

      

    
    - **kmsKeyArn** *(string) --* 

      The Amazon Resource Name (ARN) of the KMS key.

      

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

    
    ::

      {
          'tokenVaultId': 'string',
          'kmsConfiguration': {
              'keyType': 'CustomerManagedKey'|'ServiceManagedKey',
              'kmsKeyArn': 'string'
          },
          'lastModifiedDate': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **tokenVaultId** *(string) --* 

        The ID of the token vault.

        
      

      - **kmsConfiguration** *(dict) --* 

        The KMS configuration for the token vault.

        
        

        - **keyType** *(string) --* 

          The type of KMS key (CustomerManagedKey or ServiceManagedKey).

          
        

        - **kmsKeyArn** *(string) --* 

          The Amazon Resource Name (ARN) of the KMS key.

          
    
      

      - **lastModifiedDate** *(datetime) --* 

        The timestamp when the token vault was last modified.

        
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ConcurrentModificationException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ValidationException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ThrottlingException`

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

  