updateEnrollmentConfiguration method
Future<UpdateEnrollmentConfigurationResponse>
updateEnrollmentConfiguration({
- required EnrollmentStatus status,
- String? clientToken,
Updates your account’s Compute Optimizer Automation enrollment configuration.
May throw AccessDeniedException.
May throw ForbiddenException.
May throw IdempotencyTokenInUseException.
May throw IdempotentParameterMismatchException.
May throw InternalServerException.
May throw InvalidParameterValueException.
May throw NotManagementAccountException.
May throw OptInRequiredException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
Parameter status :
The desired enrollment status.
- Active - Enables the Automation feature for your account.
- Inactive - Disables the Automation feature for your account and stops all of your automation rules. If you opt in again later, all rules will be inactive, and you must enable the rules you want to run. You must wait at least 24 hours after opting out to opt in again.
Implementation
Future<UpdateEnrollmentConfigurationResponse> updateEnrollmentConfiguration({
required EnrollmentStatus status,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'ComputeOptimizerAutomationService.UpdateEnrollmentConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'status': status.value,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return UpdateEnrollmentConfigurationResponse.fromJson(jsonResponse.body);
}