

# GetControlStatus

Retrieves the effective compliance status of a control in a project. The status combines the most recent assessment of the control with the not-applicable decisions that you declare on the control or its requirements. The framework version must be enabled in the project.

## Request Parameters
<a name="API_GetControlStatus_RequestParameters"></a>

 ** controlId **   
The identifier of the control. The control must exist in the framework version.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9._()-]*`   
Required: Yes

 ** environmentArn **   
The Amazon Resource Name (ARN) of this governance environment.  
Type: String  
Length Constraints: Minimum length of 3. Maximum length of 2048.  
Pattern: `(arn:aws[a-zA-Z-]*:assurance:[a-z0-9-]+:[0-9]{12}:environment/[a-zA-Z0-9][a-zA-Z0-9\-]*|[a-zA-Z0-9][a-zA-Z0-9\-]*)`   
Required: Yes

 ** framework **   
The name of the compliance framework.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9._:-]*`   
Required: Yes

 ** frameworkVersion **   
The version of the compliance framework.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9._-]*`   
Required: Yes

 ** project **   
The name of the project.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9._-]*`   
Required: Yes

## Response Elements
<a name="API_GetControlStatus_ResponseElements"></a>

The following elements are returned by the service.

 ** applicableRequirementCount **   
The number of the control's requirements that apply to the project.  
Type: Integer

 ** controlGroupId **   
The identifier of the control group that contains the control. Absent when the control isn't in a control group.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9._()-]*` 

 ** controlId **   
The identifier of the control.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9._()-]*` 

 ** excludedRequirementCount **   
The number of the control's requirements whose status is `not_applicable`. The count includes requirements that you declare not applicable, directly or through the control. It also includes requirements that the assessment determines don't apply.  
Type: Integer

 ** lastAssessedAt **   
The time when the most recent assessment of the control was last updated.  
Type: Timestamp

 ** lastAssessmentId **   
The identifier of the most recent assessment of the control in the project. Absent if no assessment has run for the control.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9\-_]*` 

 ** lastAssessmentStatus **   
The state of the most recent assessment of the control.  
Type: String  
Valid Values: `SCHEDULED | IN_PROGRESS | NEEDS_ATTENTION | FINISHED | NOT_APPLICABLE | ERROR | USER_ERROR` 

 ** outcomePercentage **   
The compliance percentage that the most recent assessment of the control calculated. A decision that you declare after that assessment doesn't change this value. The next assessment calculates a new percentage. Absent when `status` is `NOT_ASSESSED` or `NOT_APPLICABLE`.  
Type: Double

 ** requirementStatuses **   
The effective status of each of the control's requirements, including requirements that are not applicable.  
Type: Array of [RequirementStatus](API_RequirementStatus.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 100 items.

 ** status **   
The effective compliance status of the control. Valid values:  
+  `COMPLIANT` or `NEEDS_ATTENTION` – Based on the compliance percentage that the most recent assessment calculated.
+  `NOT_APPLICABLE` – The control, or every one of its requirements, is not applicable to the project.
+  `NOT_ASSESSED` – The most recent assessment hasn't finished, ended in an error, or found no outcome for any applicable requirement.
Type: String  
Valid Values: `COMPLIANT | NEEDS_ATTENTION | NOT_APPLICABLE | NOT_ASSESSED` 

 ** statusOverride **   
The decision declared on the control itself. Absent when no decision is declared on the control. Decisions on individual requirements are returned in `requirementStatuses`.  
Type: [StatusOverride](API_StatusOverride.md) object

## Errors
<a name="API_GetControlStatus_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.  
HTTP Status Code: 403

 ** ConflictException **   
A conflict occurred (for example, resource already exists).  
HTTP Status Code: 409

 ** InternalServerException **   
An internal server error occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The requested resource was not found.  
HTTP Status Code: 404

 ** ThrottlingException **   
The request was throttled.  
HTTP Status Code: 429

 ** ValidationException **   
The request failed validation.  
HTTP Status Code: 400

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

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/assurance-2022-07-26/GetControlStatus) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/assurance-2022-07-26/GetControlStatus) 