Skip to content

list_device_pools

list_device_pools(
    arn: AmazonResourceName,
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = None,
    type: Optional[DevicePoolType] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListDevicePoolsResult

Gets information about device pools.

Parameters:

  • arn (AmazonResourceName) –

    The project ARN.

  • type (Optional[DevicePoolType], default: None ) –

    The device pools' type.

    Allowed values include:

    • CURATED: A device pool that is created and managed by AWS Device Farm.

    • PRIVATE: A device pool that is created and managed by the device pool developer.

  • next_token (Optional[PaginationToken], default: None ) –

    An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Raises:

Examples:

To get information about device pools The following example returns information about the private device pools in a specific project.

>>> client.list_device_pools(arn='arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456', type='PRIVATE')
Source code in docs_src/capo_device_farm/_services/device_farm.py
def list_device_pools(
    self,
    arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = None,
    type: Optional["capo_device_farm.types.device_pool_type.DevicePoolType"] = None,
    next_token: Optional[
        "capo_device_farm.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_device_farm.types.list_device_pools_result.ListDevicePoolsResult":
    """<p>Gets information about device pools.</p>

    Args:
        arn: <p>The project ARN.</p>
        type: <p>The device pools' type.</p> <p>Allowed values include:</p> <ul> <li> <p>CURATED: A device pool that is created and managed by AWS Device Farm.</p> </li> <li> <p>PRIVATE: A device pool that is created and managed by the device pool developer.</p> </li> </ul>
        next_token: <p>An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.</p>

    Raises:
        capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
        capo_device_farm.errors.limit_exceeded_exception.LimitExceededException: <p>A limit was exceeded.</p>
        capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
        capo_device_farm.errors.service_account_exception.ServiceAccountException: <p>There was a problem with the service account.</p>
        capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To get information about device pools
        The following example returns information about the private device pools in a specific project.

        >>> client.list_device_pools(arn='arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456', type='PRIVATE')
    """

    def _handler(
        req: "OperationRequest[capo_device_farm.types.list_device_pools_request.ListDevicePoolsRequest]",
    ) -> OperationResponse[
        "capo_device_farm.types.list_device_pools_result.ListDevicePoolsResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.list_device_pools

        output, http_response = (
            capo_device_farm._operations.device_farm_20150623.list_device_pools.list_device_pools(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDevicePools")
    )
    input_: capo_device_farm.types.list_device_pools_request.ListDevicePoolsRequest = {
        "arn": arn
    }
    if type is not None:
        input_["type"] = type
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output