

# WorkspaceEnforcedPolicyAssociation

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

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

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

 ** ErrorCode **   <a name="WorkSpaces-Type-WorkspaceEnforcedPolicyAssociation-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-WorkspaceEnforcedPolicyAssociation-ErrorMessage"></a>
A description of why the policy wasn't applied to the WorkSpace. 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-WorkspaceEnforcedPolicyAssociation-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_WorkspaceEnforcedPolicyAssociation_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/WorkspaceEnforcedPolicyAssociation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/workspaces-2015-04-08/WorkspaceEnforcedPolicyAssociation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/workspaces-2015-04-08/WorkspaceEnforcedPolicyAssociation) 