Skip to content

describe_import_snapshot_tasks

describe_import_snapshot_tasks(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    filters: Optional[FilterList] = None,
    import_task_ids: Optional[ImportSnapshotTaskIdList] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
) -> DescribeImportSnapshotTasksResult

Describes your import snapshot tasks.

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.

  • filters (Optional[FilterList], default: None ) –

    The filters.

  • import_task_ids (Optional[ImportSnapshotTaskIdList], default: None ) –

    A list of import snapshot task IDs.

  • max_results (Optional[Integer], default: None ) –

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

  • next_token (Optional[String], default: None ) –

    A token that indicates the next page of results.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def describe_import_snapshot_tasks(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    import_task_ids: Optional[
        "capo_ec2.types.import_snapshot_task_id_list.ImportSnapshotTaskIdList"
    ] = None,
    max_results: Optional["capo_ec2.types.integer.Integer"] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.describe_import_snapshot_tasks_result.DescribeImportSnapshotTasksResult":
    """<p>Describes your import snapshot tasks.</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>
        filters: <p>The filters.</p>
        import_task_ids: <p>A list of import snapshot task IDs.</p>
        max_results: <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
        next_token: <p>A token that indicates the next page of results.</p>

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

    def _handler(
        req: "OperationRequest[capo_ec2.types.describe_import_snapshot_tasks_request.DescribeImportSnapshotTasksRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.describe_import_snapshot_tasks_result.DescribeImportSnapshotTasksResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_import_snapshot_tasks

        output, http_response = (
            capo_ec2._operations.amazon_ec2.describe_import_snapshot_tasks.describe_import_snapshot_tasks(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

        return (
            capo_ec2.types.describe_import_snapshot_tasks_result.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeImportSnapshotTasks", redact_output=_redact_output
        ),
    )
    input_: capo_ec2.types.describe_import_snapshot_tasks_request.DescribeImportSnapshotTasksRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if filters is not None:
        input_["filters"] = filters
    if import_task_ids is not None:
        input_["import_task_ids"] = import_task_ids
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output