Creates a Selenium testing project. Projects are used to track TestGridSession instances.
Parameters:
Raises:
Source code in docs_src/capo_device_farm/_services/device_farm.py
| def create_test_grid_project(
self,
name: "capo_device_farm.types.resource_name.ResourceName",
*,
config_overrides: Optional[DeviceFarmClientConfig] = None,
description: Optional[
"capo_device_farm.types.resource_description.ResourceDescription"
] = None,
vpc_config: Optional[
"capo_device_farm.types.test_grid_vpc_config.TestGridVpcConfig"
] = None,
) -> "capo_device_farm.types.create_test_grid_project_result.CreateTestGridProjectResult":
"""<p>Creates a Selenium testing project. Projects are used to track <a>TestGridSession</a> instances.</p>
Args:
name: <p>Human-readable name of the Selenium testing project.</p>
description: <p>Human-readable description of the project.</p>
vpc_config: <p>The VPC security groups and subnets that are attached to a project.</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.limit_exceeded_exception.LimitExceededException: <p>A limit was exceeded.</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_project_request.CreateTestGridProjectRequest]",
) -> OperationResponse[
"capo_device_farm.types.create_test_grid_project_result.CreateTestGridProjectResult"
]:
import capo_device_farm._operations.device_farm_20150623.create_test_grid_project
output, http_response = (
capo_device_farm._operations.device_farm_20150623.create_test_grid_project.create_test_grid_project(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateTestGridProject")
)
input_: capo_device_farm.types.create_test_grid_project_request.CreateTestGridProjectRequest = {
"name": name
}
if description is not None:
input_["description"] = description
if vpc_config is not None:
input_["vpc_config"] = vpc_config
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|