

# AgentEnforcedPolicyAssociation

Describes the agent-enforced policy associated with a WorkSpace, and whether the agent has applied it.

## Contents
<a name="API_AgentEnforcedPolicyAssociation_Contents"></a>

 ** PolicyId **   <a name="WorkSpaces-Type-AgentEnforcedPolicyAssociation-PolicyId"></a>
The identifier of the policy.  
Type: String  
Length Constraints: Minimum length of 13. Maximum length of 64.  
Pattern: `^wsae-[0-9a-z]{8,59}$`   
Required: Yes

 ** ErrorCode **   <a name="WorkSpaces-Type-AgentEnforcedPolicyAssociation-ErrorCode"></a>
The reason that the policy wasn't applied. This field is returned only when `SyncStatus` is `FAILED` because of this policy. If `SyncStatus` is `FAILED` and this field isn't returned, the failure has another cause.  
Type: String  
Valid Values: `POLICY_APPLY_FAILED`   
Required: No

 ** ErrorMessage **   <a name="WorkSpaces-Type-AgentEnforcedPolicyAssociation-ErrorMessage"></a>
A description of why the policy wasn't applied to the agent. This field is usually returned when `ErrorCode` is returned.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** SyncStatus **   <a name="WorkSpaces-Type-AgentEnforcedPolicyAssociation-SyncStatus"></a>
Whether the policy is applied:  
+  `PENDING_UPDATE` – The WorkSpace hasn't confirmed the policy yet.
+  `IN_SYNC` – The policy is applied.
+  `FAILED` – The policy isn't applied.
This field isn't returned if the service can't determine the status. Don't treat a missing value as `IN_SYNC`.  
Type: String  
Valid Values: `PENDING_UPDATE | IN_SYNC | FAILED`   
Required: No

## See Also
<a name="API_AgentEnforcedPolicyAssociation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/workspaces-2015-04-08/AgentEnforcedPolicyAssociation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workspaces-2015-04-08/AgentEnforcedPolicyAssociation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workspaces-2015-04-08/AgentEnforcedPolicyAssociation) 