Skip to content

get_test_grid_session async

get_test_grid_session(
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    project_arn: Optional[DeviceFarmArn] = None,
    session_id: Optional[ResourceId] = None,
    session_arn: Optional[DeviceFarmArn] = None,
) -> GetTestGridSessionResult

A session is an instance of a browser created through a RemoteWebDriver with the URL from CreateTestGridUrlResult. You can use the following to look up sessions:

  • The session ARN.

  • The project ARN and a session ID.

Parameters:

Raises:

Source code in docs_src/capo_device_farm/_services/async_device_farm.py
async def get_test_grid_session(
    self,
    *,
    config_overrides: Optional[AsyncDeviceFarmClientConfig] = None,
    project_arn: Optional[
        "capo_device_farm.types.device_farm_arn.DeviceFarmArn"
    ] = None,
    session_id: Optional["capo_device_farm.types.resource_id.ResourceId"] = None,
    session_arn: Optional[
        "capo_device_farm.types.device_farm_arn.DeviceFarmArn"
    ] = None,
) -> "capo_device_farm.types.get_test_grid_session_result.GetTestGridSessionResult":
    """<p>A session is an instance of a browser created through a <code>RemoteWebDriver</code> with the URL from <code> CreateTestGridUrlResult</code>. You can use the following to look up sessions:</p> <ul> <li> <p>The session ARN.</p> </li> <li> <p>The project ARN and a session ID.</p> </li> </ul> <p></p>

    Args:
        project_arn: <p>The ARN for the project that this session belongs to. See <a>CreateTestGridProject</a> and <a>ListTestGridProjects</a>.</p>
        session_id: <p>An ID associated with this session.</p>
        session_arn: <p>An ARN that uniquely identifies a <a>TestGridSession</a>.</p>

    Raises:
        capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
        capo_device_farm.errors.internal_service_exception.InternalServiceException: <p>An internal exception was raised in the service. Contact <a href="mailto:[email protected]">[email protected]</a> if you see this error. </p>
        capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
        capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_device_farm.types.get_test_grid_session_request.GetTestGridSessionRequest]",
    ) -> AsyncOperationResponse[
        "capo_device_farm.types.get_test_grid_session_result.GetTestGridSessionResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.get_test_grid_session

        (
            output,
            http_response,
        ) = await capo_device_farm._operations.device_farm_20150623.get_test_grid_session.async_get_test_grid_session(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTestGridSession")
    )
    input_: capo_device_farm.types.get_test_grid_session_request.GetTestGridSessionRequest = {}
    if project_arn is not None:
        input_["project_arn"] = project_arn
    if session_id is not None:
        input_["session_id"] = session_id
    if session_arn is not None:
        input_["session_arn"] = session_arn

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