Skip to content

describe_conversion_tasks async

describe_conversion_tasks(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    conversion_task_ids: Optional[ConversionIdStringList] = None,
) -> DescribeConversionTasksResult

Describes the specified conversion tasks or all your conversion tasks. For more information, see the VM Import/Export User Guide.

For information about the import manifest referenced by this API action, see VM Import Manifest.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • conversion_task_ids (Optional[ConversionIdStringList], default: None ) –

    The conversion task IDs.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_conversion_tasks(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    conversion_task_ids: Optional[
        "capo_ec2.types.conversion_id_string_list.ConversionIdStringList"
    ] = None,
) -> (
    "capo_ec2.types.describe_conversion_tasks_result.DescribeConversionTasksResult"
):
    """<p>Describes the specified conversion tasks or all your conversion tasks. For more information, see the <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/">VM Import/Export User Guide</a>.</p> <p>For information about the import manifest referenced by this API action, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html">VM Import Manifest</a>.</p>

    Args:
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        conversion_task_ids: <p>The conversion task IDs.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.describe_conversion_tasks_request.DescribeConversionTasksRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_conversion_tasks_result.DescribeConversionTasksResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_conversion_tasks

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.describe_conversion_tasks.async_describe_conversion_tasks(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_ec2.types.describe_conversion_tasks_result.DescribeConversionTasksResult",
    ) -> dict[str, Any]:
        import capo_ec2.types.describe_conversion_tasks_result

        return capo_ec2.types.describe_conversion_tasks_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeConversionTasks", redact_output=_redact_output),
    )
    input_: capo_ec2.types.describe_conversion_tasks_request.DescribeConversionTasksRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if conversion_task_ids is not None:
        input_["conversion_task_ids"] = conversion_task_ids

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output