Skip to content

get_environment async

get_environment(
    environment_id: IdType,
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
) -> GetEnvironmentResponse

Returns the FinSpace environment object.

Parameters:

  • environment_id (IdType) –

    The identifier of the FinSpace environment.

Raises:

Source code in docs_src/capo_finspace/_services/async_finspace.py
async def get_environment(
    self,
    environment_id: "capo_finspace.types.id_type.IdType",
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
) -> "capo_finspace.types.get_environment_response.GetEnvironmentResponse":
    """<p>Returns the FinSpace environment object.</p>

    Args:
        environment_id: <p>The identifier of the FinSpace environment.</p>

    Raises:
        capo_finspace.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_finspace.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_finspace.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_finspace.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_finspace.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_finspace.types.get_environment_request.GetEnvironmentRequest]",
    ) -> AsyncOperationResponse[
        "capo_finspace.types.get_environment_response.GetEnvironmentResponse"
    ]:
        import capo_finspace._operations.aws_habanero_management_service.get_environment

        (
            output,
            http_response,
        ) = await capo_finspace._operations.aws_habanero_management_service.get_environment.async_get_environment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetEnvironment")
    )
    input_: capo_finspace.types.get_environment_request.GetEnvironmentRequest = {
        "environment_id": environment_id
    }

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