

# UpdateAccessControl

Updates the access control configuration for an environment of an Amplify Gen 3 app.

## Request Syntax
<a name="API_UpdateAccessControl_RequestSyntax"></a>

```
PATCH /apps/{{AppName}}/environments/{{EnvironmentName}}/access-control HTTP/1.1
Content-type: application/json

{
   "ClientToken": "{{string}}",
   "Rule": { ... },
   "Scope": "{{string}}"
}
```

## URI Request Parameters
<a name="API_UpdateAccessControl_RequestParameters"></a>

The request uses the following URI parameters.

 ** [AppName](#API_UpdateAccessControl_RequestSyntax) **   <a name="amplifygen3-UpdateAccessControl-request-uri-AppName"></a>
The name of the app.  
Length Constraints: Minimum length of 1. Maximum length of 40.  
Required: Yes

 ** [EnvironmentName](#API_UpdateAccessControl_RequestSyntax) **   <a name="amplifygen3-UpdateAccessControl-request-uri-EnvironmentName"></a>
The name of the environment.  
Length Constraints: Minimum length of 1. Maximum length of 40.  
Required: Yes

## Request Body
<a name="API_UpdateAccessControl_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [ClientToken](#API_UpdateAccessControl_RequestSyntax) **   <a name="amplifygen3-UpdateAccessControl-request-ClientToken"></a>
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Required: No

 ** [Rule](#API_UpdateAccessControl_RequestSyntax) **   <a name="amplifygen3-UpdateAccessControl-request-Rule"></a>
The rule that determines which users are granted access.  
Type: [AccessControlRule](API_AccessControlRule.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.  
Required: No

 ** [Scope](#API_UpdateAccessControl_RequestSyntax) **   <a name="amplifygen3-UpdateAccessControl-request-Scope"></a>
The scope that the access control configuration applies to.  
Type: String  
Valid Values: `ALL_DEPLOYMENTS | NON_ACTIVE_DEPLOYMENTS`   
Required: No

## Response Syntax
<a name="API_UpdateAccessControl_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Status": "string",
   "StatusReason": "string"
}
```

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

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Status](#API_UpdateAccessControl_ResponseSyntax) **   <a name="amplifygen3-UpdateAccessControl-response-Status"></a>
The status of the access control configuration.  
Type: String  
Valid Values: `ENABLING | ENABLED | ENABLE_FAILED | UPDATING | UPDATE_FAILED | DISABLING | DISABLED | DISABLE_FAILED` 

 ** [StatusReason](#API_UpdateAccessControl_ResponseSyntax) **   <a name="amplifygen3-UpdateAccessControl-response-StatusReason"></a>
The reason for the status.  
Type: String

## Errors
<a name="API_UpdateAccessControl_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 permissions to perform this action.    
 ** message **   
A message that describes the error.
HTTP Status Code: 403

 ** ConflictException **   
The request conflicts with the current state of the resource.    
 ** message **   
A message that describes the error.
HTTP Status Code: 409

 ** InternalServerException **   
An internal error occurred. Retry the request.    
 ** message **   
A message that describes the error.  
 ** retryAfterSeconds **   
The number of seconds to wait before you retry the request.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The requested resource was not found.    
 ** message **   
A message that describes the error.
HTTP Status Code: 404

 ** ThrottlingException **   
The request was denied because the request rate exceeds the allowed limit.    
 ** message **   
A message that describes the error.  
 ** quotaCode **   
The code of the service quota that caused the throttling.  
 ** retryAfterSeconds **   
The number of seconds to wait before you retry the request.  
 ** serviceCode **   
The code of the service that the quota belongs to.
HTTP Status Code: 429

 ** ValidationException **   
The request contains invalid parameters or is otherwise malformed.    
 ** message **   
A message that describes the error.
HTTP Status Code: 400

## See Also
<a name="API_UpdateAccessControl_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/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/amplifygen3-2025-09-18/UpdateAccessControl) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/amplifygen3-2025-09-18/UpdateAccessControl) 