Skip to content

list_applications

list_applications(
    environment_identifier: EnvironmentId,
    *,
    config_overrides: Optional[MigrationHubRefactorSpacesClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListApplicationsResponse

Lists all the Amazon Web Services Migration Hub Refactor Spaces applications within an environment.

Parameters:

  • environment_identifier (EnvironmentId) –

    The ID of the environment.

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

    The token for the next page of results.

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

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

Raises:

Source code in docs_src/capo_migration_hub_refactor_spaces/_services/migration_hub_refactor_spaces.py
def list_applications(
    self,
    environment_identifier: "capo_migration_hub_refactor_spaces.types.environment_id.EnvironmentId",
    *,
    config_overrides: Optional[MigrationHubRefactorSpacesClientConfig] = None,
    next_token: Optional[
        "capo_migration_hub_refactor_spaces.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_migration_hub_refactor_spaces.types.max_results.MaxResults"
    ] = None,
) -> "capo_migration_hub_refactor_spaces.types.list_applications_response.ListApplicationsResponse":
    """<p>Lists all the Amazon Web Services Migration Hub Refactor Spaces applications within an environment. </p>

    Args:
        environment_identifier: <p>The ID of the environment. </p>
        next_token: <p>The token for the next page of results.</p>
        max_results: <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>

    Raises:
        capo_migration_hub_refactor_spaces.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action. </p>
        capo_migration_hub_refactor_spaces.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_migration_hub_refactor_spaces.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing the request.</p>
        capo_migration_hub_refactor_spaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist. </p>
        capo_migration_hub_refactor_spaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would cause a service quota to be exceeded. </p>
        capo_migration_hub_refactor_spaces.errors.throttling_exception.ThrottlingException: <p>Request was denied because the request was throttled. </p>
        capo_migration_hub_refactor_spaces.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Service. </p>
        capo_migration_hub_refactor_spaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_migration_hub_refactor_spaces.types.list_applications_request.ListApplicationsRequest]",
    ) -> OperationResponse[
        "capo_migration_hub_refactor_spaces.types.list_applications_response.ListApplicationsResponse"
    ]:
        import capo_migration_hub_refactor_spaces._operations.refactor_spaces.list_applications

        output, http_response = (
            capo_migration_hub_refactor_spaces._operations.refactor_spaces.list_applications.list_applications(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_migration_hub_refactor_spaces.types.list_applications_response.ListApplicationsResponse",
    ) -> dict[str, Any]:
        import capo_migration_hub_refactor_spaces.types.list_applications_response

        return capo_migration_hub_refactor_spaces.types.list_applications_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListApplications", redact_output=_redact_output),
    )
    input_: capo_migration_hub_refactor_spaces.types.list_applications_request.ListApplicationsRequest = {
        "environment_identifier": environment_identifier
    }
    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