Skip to content

delete_device_pool

delete_device_pool(
    arn: AmazonResourceName,
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = None,
) -> DeleteDevicePoolResult

Deletes a device pool given the pool ARN. Does not allow deletion of curated pools owned by the system.

Parameters:

  • arn (AmazonResourceName) –

    Represents the Amazon Resource Name (ARN) of the Device Farm device pool to delete.

Raises:

Examples:

To delete a device pool The following example deletes a specific device pool.

>>> client.delete_device_pool(arn='arn:aws:devicefarm:us-west-2::devicepool:123-456-EXAMPLE-GUID')
Source code in docs_src/capo_device_farm/_services/device_farm.py
def delete_device_pool(
    self,
    arn: "capo_device_farm.types.amazon_resource_name.AmazonResourceName",
    *,
    config_overrides: Optional[DeviceFarmClientConfig] = None,
) -> "capo_device_farm.types.delete_device_pool_result.DeleteDevicePoolResult":
    """<p>Deletes a device pool given the pool ARN. Does not allow deletion of curated pools owned by the system.</p>

    Args:
        arn: <p>Represents the Amazon Resource Name (ARN) of the Device Farm device pool to delete.</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 delete a device pool
        The following example deletes a specific device pool.

        >>> client.delete_device_pool(arn='arn:aws:devicefarm:us-west-2::devicepool:123-456-EXAMPLE-GUID')
    """

    def _handler(
        req: "OperationRequest[capo_device_farm.types.delete_device_pool_request.DeleteDevicePoolRequest]",
    ) -> OperationResponse[
        "capo_device_farm.types.delete_device_pool_result.DeleteDevicePoolResult"
    ]:
        import capo_device_farm._operations.device_farm_20150623.delete_device_pool

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDevicePool")
    )
    input_: capo_device_farm.types.delete_device_pool_request.DeleteDevicePoolRequest = {
        "arn": arn
    }

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