Organizations / Client / list_effective_policy_validation_errors
list_effective_policy_validation_errors¶
- Organizations.Client.list_effective_policy_validation_errors(**kwargs)¶
Lists all the validation errors on an effective policy 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
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 )
- Parameters:
AccountId (string) –
[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.
PolicyType (string) –
[REQUIRED]
The type of policy that you want information about. You can specify one of the following values:
NextToken (string) – The parameter for receiving additional results if you receive a
NextTokenresponse in a previous request. ANextTokenresponse indicates that more output is available. Set this parameter to the value of the previous call’sNextTokenresponse to indicate where the output should continue from.MaxResults (integer) – The maximum number of items to return in the response. If more results exist than the specified
MaxResultsvalue, a token is included in the response so that you can retrieve the remaining results.
- Return type:
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:
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
NextTokenrequest parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until theNextTokenresponse element comes back asnull.EffectivePolicyValidationErrors (list) –
The
EffectivePolicyValidationErrorobject 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, 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 and attached to the account which contributed to the validation error.
(string) –
Exceptions
Organizations.Client.exceptions.AccessDeniedExceptionOrganizations.Client.exceptions.AWSOrganizationsNotInUseExceptionOrganizations.Client.exceptions.ConstraintViolationExceptionOrganizations.Client.exceptions.EffectivePolicyNotFoundExceptionOrganizations.Client.exceptions.ServiceExceptionOrganizations.Client.exceptions.TooManyRequestsExceptionOrganizations.Client.exceptions.AccountNotFoundExceptionOrganizations.Client.exceptions.InvalidInputExceptionOrganizations.Client.exceptions.UnsupportedAPIEndpointException