Skip to content

start_session async

start_session(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    resource_identifier: Optional[ResourceIdentifier] = None,
) -> StartSessionResponse

Initiates a remote connection session between a local integrated development environments (IDEs) and a remote SageMaker space.

Parameters:

  • resource_identifier (Optional[ResourceIdentifier], default: None ) –

    The Amazon Resource Name (ARN) of the resource to which the remote connection will be established. For example, this identifies the specific ARN space application you want to connect to from your local IDE.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def start_session(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    resource_identifier: Optional[
        "capo_sagemaker.types.resource_identifier.ResourceIdentifier"
    ] = None,
) -> "capo_sagemaker.types.start_session_response.StartSessionResponse":
    """<p>Initiates a remote connection session between a local integrated development environments (IDEs) and a remote SageMaker space.</p>

    Args:
        resource_identifier: <p>The Amazon Resource Name (ARN) of the resource to which the remote connection will be established. For example, this identifies the specific ARN space application you want to connect to from your local IDE.</p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.start_session_request.StartSessionRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.start_session_response.StartSessionResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.start_session

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.start_session.async_start_session(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartSession")
    )
    input_: capo_sagemaker.types.start_session_request.StartSessionRequest = {}
    if resource_identifier is not None:
        input_["resource_identifier"] = resource_identifier

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