:doc:`Organizations <../../organizations>` / Client / list_effective_policy_validation_errors

***************************************
list_effective_policy_validation_errors
***************************************



.. py:method:: Organizations.Client.list_effective_policy_validation_errors(**kwargs)

  

  Lists all the validation errors on an `effective policy <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_effective.html>`__ for a specified account and policy type.

   

  You can only call this operation from the management account or a member account that is a delegated administrator.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListEffectivePolicyValidationErrors>`_  


  **Request Syntax**
  ::

    response = client.list_effective_policy_validation_errors(
        AccountId='string',
        PolicyType='TAG_POLICY'|'BACKUP_POLICY'|'AISERVICES_OPT_OUT_POLICY'|'CHATBOT_POLICY'|'DECLARATIVE_POLICY_EC2'|'SECURITYHUB_POLICY'|'INSPECTOR_POLICY'|'UPGRADE_ROLLOUT_POLICY'|'BEDROCK_POLICY'|'S3_POLICY'|'NETWORK_SECURITY_DIRECTOR_POLICY',
        NextToken='string',
        MaxResults=123
    )
    
  :type AccountId: string
  :param AccountId: **[REQUIRED]** 

    The ID of the account that you want details about. Specifying an organization root or organizational unit (OU) as the target is not supported.

    

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

    The type of policy that you want information about. You can specify one of the following values:

     

    
    * `DECLARATIVE_POLICY_EC2 <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html>`__
     
    * `BACKUP_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html>`__
     
    * `TAG_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html>`__
     
    * `CHATBOT_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html>`__
     
    * `AISERVICES_OPT_OUT_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html>`__
     
    * `SECURITYHUB_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html>`__
     
    * `UPGRADE_ROLLOUT_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html>`__
     
    * `INSPECTOR_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html>`__
     
    * `BEDROCK_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html>`__
     
    * `S3_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html>`__
     
    * `NETWORK_SECURITY_DIRECTOR_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html>`__
    

    

  
  :type NextToken: string
  :param NextToken: 

    The parameter for receiving additional results if you receive a ``NextToken`` response in a previous request. A ``NextToken`` response indicates that more output is available. Set this parameter to the value of the previous call's ``NextToken`` response to indicate where the output should continue from.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of items to return in the response. If more results exist than the specified ``MaxResults`` value, a token is included in the response so that you can retrieve the remaining results.

    

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

    
    ::

      {
          'AccountId': 'string',
          'PolicyType': 'TAG_POLICY'|'BACKUP_POLICY'|'AISERVICES_OPT_OUT_POLICY'|'CHATBOT_POLICY'|'DECLARATIVE_POLICY_EC2'|'SECURITYHUB_POLICY'|'INSPECTOR_POLICY'|'UPGRADE_ROLLOUT_POLICY'|'BEDROCK_POLICY'|'S3_POLICY'|'NETWORK_SECURITY_DIRECTOR_POLICY',
          'Path': 'string',
          'EvaluationTimestamp': datetime(2015, 1, 1),
          'NextToken': 'string',
          'EffectivePolicyValidationErrors': [
              {
                  'ErrorCode': 'string',
                  'ErrorMessage': 'string',
                  'PathToError': 'string',
                  'ContributingPolicies': [
                      'string',
                  ]
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AccountId** *(string) --* 

        The ID of the specified account.

        
      

      - **PolicyType** *(string) --* 

        The specified policy type. One of the following values:

         

        
        * `DECLARATIVE_POLICY_EC2 <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html>`__
         
        * `BACKUP_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html>`__
         
        * `TAG_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html>`__
         
        * `CHATBOT_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html>`__
         
        * `AISERVICES_OPT_OUT_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html>`__
         
        * `SECURITYHUB_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html>`__
         
        * `UPGRADE_ROLLOUT_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html>`__
         
        * `INSPECTOR_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html>`__
         
        * `BEDROCK_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html>`__
         
        * `S3_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html>`__
         
        * `NETWORK_SECURITY_DIRECTOR_POLICY <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html>`__
        

        
      

      - **Path** *(string) --* 

        The path in the organization where the specified account exists.

        
      

      - **EvaluationTimestamp** *(datetime) --* 

        The time when the latest effective policy was generated for the specified account.

        
      

      - **NextToken** *(string) --* 

        If present, indicates that more output is available than is included in the current response. Use this value in the ``NextToken`` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the ``NextToken`` response element comes back as ``null``.

        
      

      - **EffectivePolicyValidationErrors** *(list) --* 

        The ``EffectivePolicyValidationError`` object contains details about the validation errors that occurred when generating or enforcing an effective policy, such as which policies contributed to the error and location of the error.

        
        

        - *(dict) --* 

          Contains details about the validation errors that occurred when generating or enforcing an `effective policy <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_effective.html>`__, such as which policies contributed to the error and location of the error.

          
          

          - **ErrorCode** *(string) --* 

            The error code for the validation error. For example, ``ELEMENTS_TOO_MANY``.

            
          

          - **ErrorMessage** *(string) --* 

            The error message for the validation error.

            
          

          - **PathToError** *(string) --* 

            The path within the effective policy where the validation error occurred.

            
          

          - **ContributingPolicies** *(list) --* 

            The individual policies `inherited <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inheritance_mgmt.html>`__ and `attached <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_policies_attach.html>`__ to the account which contributed to the validation error.

            
            

            - *(string) --* 
        
      
    
  
  **Exceptions**
  
  *   :py:class:`Organizations.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Organizations.Client.exceptions.AWSOrganizationsNotInUseException`

  
  *   :py:class:`Organizations.Client.exceptions.ConstraintViolationException`

  
  *   :py:class:`Organizations.Client.exceptions.EffectivePolicyNotFoundException`

  
  *   :py:class:`Organizations.Client.exceptions.ServiceException`

  
  *   :py:class:`Organizations.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`Organizations.Client.exceptions.AccountNotFoundException`

  
  *   :py:class:`Organizations.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Organizations.Client.exceptions.UnsupportedAPIEndpointException`

  