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.
Raises:
Source code in docs_src/capo_migrationhub_config/_services/migration_hub_config.py
| def get_home_region(
self, *, config_overrides: Optional[MigrationHubConfigClientConfig] = None
) -> "capo_migrationhub_config.types.get_home_region_result.GetHomeRegionResult":
"""<p>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 <code>GetHomeRegion</code> 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.</p>
Raises:
capo_migrationhub_config.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_migrationhub_config.errors.internal_server_error.InternalServerError: <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
capo_migrationhub_config.errors.invalid_input_exception.InvalidInputException: <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
capo_migrationhub_config.errors.service_unavailable_exception.ServiceUnavailableException: <p>Exception raised when a request fails due to temporary unavailability of the service.</p>
capo_migrationhub_config.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_migrationhub_config.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_migrationhub_config.types.get_home_region_request.GetHomeRegionRequest]",
) -> OperationResponse[
"capo_migrationhub_config.types.get_home_region_result.GetHomeRegionResult"
]:
import capo_migrationhub_config._operations.aws_migration_hub_multi_account_service.get_home_region
output, http_response = (
capo_migrationhub_config._operations.aws_migration_hub_multi_account_service.get_home_region.get_home_region(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetHomeRegion")
)
input_: capo_migrationhub_config.types.get_home_region_request.GetHomeRegionRequest = {}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|