def create_test_grid_url(
self,
project_arn: "capo_device_farm.types.device_farm_arn.DeviceFarmArn",
expires_in_seconds: "capo_device_farm.types.test_grid_url_expires_in_seconds_input.TestGridUrlExpiresInSecondsInput",
*,
config_overrides: Optional[DeviceFarmClientConfig] = None,
) -> "capo_device_farm.types.create_test_grid_url_result.CreateTestGridUrlResult":
"""<p>Creates a signed, short-term URL that can be passed to a Selenium <code>RemoteWebDriver</code> constructor.</p>
Args:
project_arn: <p>ARN (from <a>CreateTestGridProject</a> or <a>ListTestGridProjects</a>) to associate with the short-term URL. </p>
expires_in_seconds: <p>Lifetime, in seconds, of the URL.</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.
"""
def _handler(
req: "OperationRequest[capo_device_farm.types.create_test_grid_url_request.CreateTestGridUrlRequest]",
) -> OperationResponse[
"capo_device_farm.types.create_test_grid_url_result.CreateTestGridUrlResult"
]:
import capo_device_farm._operations.device_farm_20150623.create_test_grid_url
output, http_response = (
capo_device_farm._operations.device_farm_20150623.create_test_grid_url.create_test_grid_url(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_device_farm.types.create_test_grid_url_result.CreateTestGridUrlResult",
) -> dict[str, Any]:
import capo_device_farm.types.create_test_grid_url_result
return capo_device_farm.types.create_test_grid_url_result.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("CreateTestGridUrl", redact_output=_redact_output),
)
input_: capo_device_farm.types.create_test_grid_url_request.CreateTestGridUrlRequest = {
"project_arn": project_arn,
"expires_in_seconds": expires_in_seconds,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output