getHomeRegion method

Future<GetHomeRegionResult> getHomeRegion()

Returns the calling account’s home region, if configured. This API is used by other AWS services to determine the regional endpoint for calling AWS Application Discovery Service and Migration Hub. You must call GetHomeRegion at least once before you call any other AWS Application Discovery Service and AWS Migration Hub APIs, to obtain the account's Migration Hub home region.

May throw AccessDeniedException. May throw InternalServerError. May throw InvalidInputException. May throw ServiceUnavailableException. May throw ThrottlingException.

Implementation

Future<GetHomeRegionResult> getHomeRegion() async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSMigrationHubMultiAccountService.GetHomeRegion'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
  );

  return GetHomeRegionResult.fromJson(jsonResponse.body);
}