Skip to content

list_discovered_resources

list_discovered_resources(
    progress_update_stream: ProgressUpdateStream,
    migration_task_name: MigrationTaskName,
    *,
    config_overrides: Optional[MigrationHubClientConfig] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[MaxResultsResources] = None,
) -> ListDiscoveredResourcesResult

Lists discovered resources associated with the given MigrationTask.

Parameters:

  • progress_update_stream (ProgressUpdateStream) –

    The name of the ProgressUpdateStream.

  • migration_task_name (MigrationTaskName) –

    The name of the MigrationTask. Do not store personal data in this field.

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

    If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.

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

    The maximum number of results returned per page.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • HomeRegionNotSetException –

    The home region is not set. Set the home region to continue.

  • InternalServerError –

    Exception raised when an internal, configuration, or dependency error is encountered.

  • InvalidInputException –

    Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.

  • ResourceNotFoundException –

    Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.

  • ServiceUnavailableException –

    Exception raised when there is an internal, configuration, or dependency error encountered.

  • ThrottlingException –

    The request was denied due to request throttling.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_migration_hub/_services/migration_hub.py
def list_discovered_resources(
    self,
    progress_update_stream: "capo_migration_hub.types.progress_update_stream.ProgressUpdateStream",
    migration_task_name: "capo_migration_hub.types.migration_task_name.MigrationTaskName",
    *,
    config_overrides: Optional[MigrationHubClientConfig] = None,
    next_token: Optional["capo_migration_hub.types.token.Token"] = None,
    max_results: Optional[
        "capo_migration_hub.types.max_results_resources.MaxResultsResources"
    ] = None,
) -> "capo_migration_hub.types.list_discovered_resources_result.ListDiscoveredResourcesResult":
    """<p>Lists discovered resources associated with the given <code>MigrationTask</code>.</p>

    Args:
        progress_update_stream: <p>The name of the ProgressUpdateStream.</p>
        migration_task_name: <p>The name of the MigrationTask. <i>Do not store personal data in this field.</i> </p>
        next_token: <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
        max_results: <p>The maximum number of results returned per page.</p>

    Raises:
        capo_migration_hub.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_migration_hub.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home region is not set. Set the home region to continue.</p>
        capo_migration_hub.errors.internal_server_error.InternalServerError: <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
        capo_migration_hub.errors.invalid_input_exception.InvalidInputException: <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
        capo_migration_hub.errors.resource_not_found_exception.ResourceNotFoundException: <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
        capo_migration_hub.errors.service_unavailable_exception.ServiceUnavailableException: <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
        capo_migration_hub.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_migration_hub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_migration_hub.types.list_discovered_resources_request.ListDiscoveredResourcesRequest]",
    ) -> OperationResponse[
        "capo_migration_hub.types.list_discovered_resources_result.ListDiscoveredResourcesResult"
    ]:
        import capo_migration_hub._operations.aws_migration_hub.list_discovered_resources

        output, http_response = (
            capo_migration_hub._operations.aws_migration_hub.list_discovered_resources.list_discovered_resources(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDiscoveredResources")
    )
    input_: capo_migration_hub.types.list_discovered_resources_request.ListDiscoveredResourcesRequest = {
        "progress_update_stream": progress_update_stream,
        "migration_task_name": migration_task_name,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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