containers
Creates, updates, deletes, gets or lists a containers resource.
Overview
| Name | containers |
| Type | Resource |
| Id | cloudflare.workers.containers |
Fields
The following fields are returned by SELECT queries:
- list
Returns all public applications associated with your account.
| Name | Datatype | Description |
|---|---|---|
id | string | An Application ID represents an identifier of an application |
name | string | The name of the application. |
created_at | string | UTC timestamp string in ISO 8601 format (example: 2021-04-01T12:32:41.488Z) |
durable_object | object | Durable object configuration using a namespace ID |
health | object | Shows a count of application instance states. |
image | string | Image url |
instance_type | object | Specifies either a pre-set instance type or a custom resource allocation. (lite, basic, standard-1, standard-2, standard-3, standard-4) (example: lite, default: lite) |
max_instances | integer | Maximum number of instances that the application will allow. |
network | object | Network settings for an application |
observability | object | Settings for application observability such as logging. |
rollout_active_grace_period | integer | Grace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds. Defaults to 0. |
updated_at | string | UTC timestamp string in ISO 8601 format (example: 2021-04-01T12:32:41.488Z) |
version | integer | The current version number of this application. This increments with application rollouts. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id | name, image | Lists all the container applications that are associated with your account. |
create_credentials | exec | domain, account_id, permissions, expiration_minutes | Generates temporary credentials for accessing Cloudflare's container image registry. Used for pulling and pushing container images. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
domain | string | |
image | string | Filter containers by image |
name | string | Filter containers by name |
SELECT examples
- list
Lists all the container applications that are associated with your account.
SELECT
id,
name,
created_at,
durable_object,
health,
image,
instance_type,
max_instances,
network,
observability,
rollout_active_grace_period,
updated_at,
version
FROM cloudflare.workers.containers
WHERE account_id = '{{ account_id }}' -- required
AND name = '{{ name }}'
AND image = '{{ image }}'
;
Lifecycle Methods
- create_credentials
Generates temporary credentials for accessing Cloudflare's container image registry. Used for pulling and pushing container images.
EXEC cloudflare.workers.containers.create_credentials
@domain='{{ domain }}' --required,
@account_id='{{ account_id }}' --required
@@json=
'{
"expiration_minutes": {{ expiration_minutes }},
"permissions": "{{ permissions }}"
}'
;