Returns information about a workload.
Parameters:
Raises:
Examples:
Get details about a specific workload.
>>> client.get_workload(workload_name='SAP')
Source code in docs_src/capo_launch_wizard/_services/launch_wizard.py
| def get_workload(
self,
workload_name: "capo_launch_wizard.types.workload_name.WorkloadName",
*,
config_overrides: Optional[LaunchWizardClientConfig] = None,
) -> "capo_launch_wizard.types.get_workload_output.GetWorkloadOutput":
"""<p>Returns information about a workload.</p>
Args:
workload_name: <p>The name of the workload.</p>
Raises:
capo_launch_wizard.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
capo_launch_wizard.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified workload or deployment resource can't be found.</p>
capo_launch_wizard.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_launch_wizard.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Get details about a specific workload.
>>> client.get_workload(workload_name='SAP')
"""
def _handler(
req: "OperationRequest[capo_launch_wizard.types.get_workload_input.GetWorkloadInput]",
) -> OperationResponse[
"capo_launch_wizard.types.get_workload_output.GetWorkloadOutput"
]:
import capo_launch_wizard._operations.launch_wizard.get_workload
output, http_response = (
capo_launch_wizard._operations.launch_wizard.get_workload.get_workload(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetWorkload")
)
input_: capo_launch_wizard.types.get_workload_input.GetWorkloadInput = {
"workload_name": workload_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|