:doc:`BedrockAgentCore <../../bedrock-agentcore>` / Client / get_resource_api_key

********************
get_resource_api_key
********************



.. py:method:: BedrockAgentCore.Client.get_resource_api_key(**kwargs)

  

  Retrieves the API key associated with an API key credential provider.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetResourceApiKey>`_  


  **Request Syntax**
  ::

    response = client.get_resource_api_key(
        workloadIdentityToken='string',
        resourceCredentialProviderName='string'
    )
    
  :type workloadIdentityToken: string
  :param workloadIdentityToken: **[REQUIRED]** 

    The identity token of the workload from which you want to retrieve the API key.

    

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

    The credential provider name for the resource from which you are retrieving the API key.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **apiKey** *(string) --* 

        The API key associated with the resource requested.

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

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

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

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

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

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

  