Retrieves detailed information about a specified server.
Parameters:
-
server_id
(ServerId)
–
-
next_token
(Optional[NextToken], default:
None
)
–
The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10.
-
max_results
(Optional[MaxResult], default:
None
)
–
The maximum number of items to include in the response. The maximum value is 100.
Raises:
Source code in docs_src/capo_migrationhubstrategy/_services/async_migration_hub_strategy.py
| async def get_server_details(
self,
server_id: "capo_migrationhubstrategy.types.server_id.ServerId",
*,
config_overrides: Optional[AsyncMigrationHubStrategyClientConfig] = None,
next_token: Optional[
"capo_migrationhubstrategy.types.next_token.NextToken"
] = None,
max_results: Optional[
"capo_migrationhubstrategy.types.max_result.MaxResult"
] = None,
) -> "capo_migrationhubstrategy.types.get_server_details_response.GetServerDetailsResponse":
"""<p> Retrieves detailed information about a specified server. </p>
Args:
server_id: <p> The ID of the server. </p>
next_token: <p> The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set <code>maxResults</code> to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10. </p>
max_results: <p> The maximum number of items to include in the response. The maximum value is 100. </p>
Raises:
capo_migrationhubstrategy.errors.access_denied_exception.AccessDeniedException: <p> The user does not have permission to perform the action. Check the AWS Identity and Access Management (IAM) policy associated with this user.</p>
capo_migrationhubstrategy.errors.internal_server_exception.InternalServerException: <p> The server experienced an internal error. Try again. </p>
capo_migrationhubstrategy.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ID in the request is not found. </p>
capo_migrationhubstrategy.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
capo_migrationhubstrategy.errors.validation_exception.ValidationException: <p> The request body isn't valid. </p>
capo_migrationhubstrategy.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_migrationhubstrategy.types.get_server_details_request.GetServerDetailsRequest]",
) -> AsyncOperationResponse[
"capo_migrationhubstrategy.types.get_server_details_response.GetServerDetailsResponse"
]:
import capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.get_server_details
(
output,
http_response,
) = await capo_migrationhubstrategy._operations.aws_migration_hub_strategy_recommendation.get_server_details.async_get_server_details(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetServerDetails")
)
input_: capo_migrationhubstrategy.types.get_server_details_request.GetServerDetailsRequest = {
"server_id": server_id
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|