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

*********************
get_policy_generation
*********************



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

  

  Retrieves information about a policy generation request within the AgentCore Policy system. Policy generation converts natural language descriptions into Cedar policy statements using AI-powered translation, enabling non-technical users to create policies.

  

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


  **Request Syntax**
  ::

    response = client.get_policy_generation(
        policyGenerationId='string',
        policyEngineId='string'
    )
    
  :type policyGenerationId: string
  :param policyGenerationId: **[REQUIRED]** 

    The unique identifier of the policy generation request to be retrieved. This must be a valid generation ID from a previous `StartPolicyGeneration <https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_StartPolicyGeneration.html>`__ call.

    

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

    The identifier of the policy engine associated with the policy generation request. This provides the context for the generation operation and schema validation.

    

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

    
    ::

      {
          'policyEngineId': 'string',
          'policyGenerationId': 'string',
          'name': 'string',
          'policyGenerationArn': 'string',
          'resource': {
              'arn': 'string'
          },
          'createdAt': datetime(2015, 1, 1),
          'updatedAt': datetime(2015, 1, 1),
          'status': 'GENERATING'|'GENERATED'|'GENERATE_FAILED'|'DELETE_FAILED',
          'statusReasons': [
              'string',
          ],
          'findings': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **policyEngineId** *(string) --* 

        The identifier of the policy engine associated with this policy generation. This confirms the policy engine context for the generation operation.

        
      

      - **policyGenerationId** *(string) --* 

        The unique identifier of the policy generation request. This matches the generation ID provided in the request and serves as the tracking identifier.

        
      

      - **name** *(string) --* 

        The customer-assigned name for the policy generation request. This helps identify and track generation operations across multiple requests.

        
      

      - **policyGenerationArn** *(string) --* 

        The Amazon Resource Name (ARN) of the policy generation. This globally unique identifier can be used for tracking, auditing, and cross-service references.

        
      

      - **resource** *(dict) --* 

        The resource information associated with the policy generation. This provides context about the target resources for which the policies are being generated.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``arn``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


      
        

        - **arn** *(string) --* 

          The Amazon Resource Name (ARN) of the resource. This globally unique identifier specifies the exact resource that policies will be evaluated against for access control decisions.

          
    
      

      - **createdAt** *(datetime) --* 

        The timestamp when the policy generation request was created. This is used for tracking and auditing generation operations and their lifecycle.

        
      

      - **updatedAt** *(datetime) --* 

        The timestamp when the policy generation was last updated. This tracks the progress of the generation process and any status changes.

        
      

      - **status** *(string) --* 

        The current status of the policy generation. This indicates whether the generation is in progress, completed successfully, or failed during processing.

        
      

      - **statusReasons** *(list) --* 

        Additional information about the generation status. This provides details about any failures, warnings, or the current state of the generation process.

        
        

        - *(string) --* 
    
      

      - **findings** *(string) --* 

        The findings and results from the policy generation process. This includes any issues, recommendations, validation results, or insights from the generated policies.

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

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

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

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

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

  