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

*******************
put_resource_policy
*******************



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

  

  Creates or updates a resource-based policy for a resource with the specified resourceArn.

   

  .. note::

    

    This feature is currently available only for AgentCore Runtime and Gateway.

    

  

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


  **Request Syntax**
  ::

    response = client.put_resource_policy(
        resourceArn='string',
        policy='string'
    )
    
  :type resourceArn: string
  :param resourceArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the resource for which to create or update the resource policy.

    

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

    The resource policy to create or update.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **policy** *(string) --* 

        The resource policy that was created or updated.

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

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

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

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

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

  