getEnrollmentStatus method

Future<GetEnrollmentStatusResponse> getEnrollmentStatus()

Returns the enrollment (opt in) status of an account to the Compute Optimizer service.

If the account is the management account of an organization, this action also confirms the enrollment status of member accounts of the organization. Use the GetEnrollmentStatusesForOrganization action to get detailed information about the enrollment status of member accounts of an organization.

May throw AccessDeniedException. May throw InternalServerException. May throw InvalidParameterValueException. May throw MissingAuthenticationToken. May throw ServiceUnavailableException. May throw ThrottlingException.

Implementation

Future<GetEnrollmentStatusResponse> getEnrollmentStatus() async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'ComputeOptimizerService.GetEnrollmentStatus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
  );

  return GetEnrollmentStatusResponse.fromJson(jsonResponse.body);
}