Skip to main content

containers

Creates, updates, deletes, gets or lists a containers resource.

Overview

Namecontainers
TypeResource
Idcloudflare.workers.containers

Fields

The following fields are returned by SELECT queries:

Returns all public applications associated with your account.

NameDatatypeDescription
idstringAn Application ID represents an identifier of an application
namestringThe name of the application.
created_atstringUTC timestamp string in ISO 8601 format (example: 2021-04-01T12:32:41.488Z)
durable_objectobjectDurable object configuration using a namespace ID
healthobjectShows a count of application instance states.
imagestringImage url
instance_typeobjectSpecifies 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_instancesintegerMaximum number of instances that the application will allow.
networkobjectNetwork settings for an application
observabilityobjectSettings for application observability such as logging.
rollout_active_grace_periodintegerGrace period for active instances to stay alive before becoming eligible for shutdown signal due to a rollout, in seconds. Defaults to 0.
updated_atstringUTC timestamp string in ISO 8601 format (example: 2021-04-01T12:32:41.488Z)
versionintegerThe current version number of this application. This increments with application rollouts.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idname, imageLists all the container applications that are associated with your account.
create_credentialsexecdomain, account_id, permissions, expiration_minutesGenerates 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
domainstring
imagestringFilter containers by image
namestringFilter containers by name

SELECT examples

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

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 }}"
}'
;