Skip to content

get_workload async

get_workload(
    workload_name: WorkloadName,
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = None,
) -> GetWorkloadOutput

Returns information about a workload.

Parameters:

  • workload_name (WorkloadName) –

    The name of the workload.

Raises:

Examples:

Get details about a specific workload.

>>> await client.get_workload(workload_name='SAP')
Source code in docs_src/capo_launch_wizard/_services/async_launch_wizard.py
async def get_workload(
    self,
    workload_name: "capo_launch_wizard.types.workload_name.WorkloadName",
    *,
    config_overrides: Optional[AsyncLaunchWizardClientConfig] = 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.

        >>> await client.get_workload(workload_name='SAP')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_launch_wizard.types.get_workload_input.GetWorkloadInput]",
    ) -> AsyncOperationResponse[
        "capo_launch_wizard.types.get_workload_output.GetWorkloadOutput"
    ]:
        import capo_launch_wizard._operations.launch_wizard.get_workload

        (
            output,
            http_response,
        ) = await capo_launch_wizard._operations.launch_wizard.get_workload.async_get_workload(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output