enable_access_control
¶
enable_access_control(
app_name: AppName,
environment_name: EnvironmentName,
*,
config_overrides: Optional[AmplifyGen3ClientConfig] = None,
scope: Optional[AccessControlScope] = None,
rule: Optional[AccessControlRule] = None,
client_token: Optional[ClientToken] = None,
) -> EnableAccessControlResponse
Enables access control for an environment of a Gen 3 app so that only authorized users can access it.
Parameters:
-
app_name(AppName) –The name of the app.
-
environment_name(EnvironmentName) –The name of the environment.
-
scope(Optional[AccessControlScope], default:None) –The scope that the access control configuration applies to.
-
rule(Optional[AccessControlRule], default:None) –The rule that determines which users are granted access.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ConflictException–The request conflicts with the current state of the resource.
-
InternalServerException–An internal error occurred. Retry the request.
-
ResourceNotFoundException–The requested resource was not found.
-
ServiceQuotaExceededException–The request would exceed a service quota for your account.
-
ThrottlingException–The request was denied because the request rate exceeds the allowed limit.
-
ValidationException–The request contains invalid parameters or is otherwise malformed.
-
UnknownServiceError–The service returned an error code this client does not model.