Skip to content
Start here

Beta

BetaWorkers

List Workers
client.Workers.Beta.Workers.List(ctx, params) (*V4PagePaginationArray[Worker], error)
GET/accounts/{account_id}/workers/workers
Get Worker
client.Workers.Beta.Workers.Get(ctx, workerID, query) (*Worker, error)
GET/accounts/{account_id}/workers/workers/{worker_id}
Create Worker
client.Workers.Beta.Workers.New(ctx, params) (*Worker, error)
POST/accounts/{account_id}/workers/workers
Update Worker
client.Workers.Beta.Workers.Update(ctx, workerID, params) (*Worker, error)
PUT/accounts/{account_id}/workers/workers/{worker_id}
Edit Worker
client.Workers.Beta.Workers.Edit(ctx, workerID, params) (*Worker, error)
PATCH/accounts/{account_id}/workers/workers/{worker_id}
Delete Worker
client.Workers.Beta.Workers.Delete(ctx, workerID, body) (*BetaWorkerDeleteResponse, error)
DELETE/accounts/{account_id}/workers/workers/{worker_id}
ModelsExpand Collapse
type Worker struct{…}
ID string

Immutable ID of the Worker.

CreatedOn Time

When the Worker was created.

formatdate-time
Logpush bool

Whether logpush is enabled for the Worker.

Name string

Name of the Worker.

Observability WorkerObservability

Observability settings for the Worker.

Enabled booloptional

Whether observability is enabled for the Worker.

HeadSamplingRate float64optional

The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).

Logs WorkerObservabilityLogsoptional

Log settings for the Worker.

Destinations []stringoptional

A list of destinations where logs will be exported to.

Enabled booloptional

Whether logs are enabled for the Worker.

HeadSamplingRate float64optional

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).

InvocationLogs booloptional

Whether invocation logs are enabled for the Worker.

Persist booloptional

Whether log persistence is enabled for the Worker.

Traces WorkerObservabilityTracesoptional

Trace settings for the Worker.

Destinations []stringoptional

A list of destinations where traces will be exported to.

Enabled booloptional

Whether traces are enabled for the Worker.

HeadSamplingRate float64optional

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%).

Persist booloptional

Whether trace persistence is enabled for the Worker.

References WorkerReferences

Other resources that reference the Worker and depend on it existing.

DispatchNamespaceOutbounds []WorkerReferencesDispatchNamespaceOutbound

Other Workers that reference the Worker as an outbound for a dispatch namespace.

NamespaceID string

ID of the dispatch namespace.

NamespaceName string

Name of the dispatch namespace.

WorkerID string

ID of the Worker using the dispatch namespace.

WorkerName string

Name of the Worker using the dispatch namespace.

Domains []WorkerReferencesDomain

Custom domains connected to the Worker.

ID string

ID of the custom domain.

CertificateID string

ID of the TLS certificate issued for the custom domain.

Hostname string

Full hostname of the custom domain, including the zone name.

ZoneID string

ID of the zone.

ZoneName string

Name of the zone.

DurableObjects []WorkerReferencesDurableObject

Other Workers that reference Durable Object classes implemented by the Worker.

NamespaceID string

ID of the Durable Object namespace being used.

NamespaceName string

Name of the Durable Object namespace being used.

WorkerID string

ID of the Worker using the Durable Object implementation.

WorkerName string

Name of the Worker using the Durable Object implementation.

Queues []WorkerReferencesQueue

Queues that send messages to the Worker.

QueueConsumerID string

ID of the queue consumer configuration.

QueueID string

ID of the queue.

QueueName string

Name of the queue.

Workers []WorkerReferencesWorker

Other Workers that reference the Worker using service bindings.

ID string

ID of the referencing Worker.

Name string

Name of the referencing Worker.

Subdomain WorkerSubdomain

Subdomain settings for the Worker.

Enabled booloptional

Whether the *.workers.dev subdomain is enabled for the Worker.

PreviewsEnabled booloptional

Whether preview URLs are enabled for the Worker.

Tags []string

Tags associated with the Worker.

TailConsumers []WorkerTailConsumer

Other Workers that should consume logs from the Worker.

Name string

Name of the consumer Worker.

UpdatedOn Time

When the Worker was most recently updated.

formatdate-time
DeployedOn Timeoptional

When the Worker's most recent deployment was created. null if the Worker has never been deployed.

formatdate-time

BetaWorkersVersions

List Versions
client.Workers.Beta.Workers.Versions.List(ctx, workerID, params) (*V4PagePaginationArray[Version], error)
GET/accounts/{account_id}/workers/workers/{worker_id}/versions
Get Version
client.Workers.Beta.Workers.Versions.Get(ctx, workerID, versionID, params) (*Version, error)
GET/accounts/{account_id}/workers/workers/{worker_id}/versions/{version_id}
Create Version
client.Workers.Beta.Workers.Versions.New(ctx, workerID, params) (*Version, error)
POST/accounts/{account_id}/workers/workers/{worker_id}/versions
Delete Version
client.Workers.Beta.Workers.Versions.Delete(ctx, workerID, versionID, body) (*BetaWorkerVersionDeleteResponse, error)
DELETE/accounts/{account_id}/workers/workers/{worker_id}/versions/{version_id}
ModelsExpand Collapse
type Version struct{…}
ID string

Version identifier.

formatuuid
CreatedOn Time

When the version was created.

formatdate-time
Number int64

The integer version number, starting from one.

URLs []string

All routable URLs that always point to this version. Does not include alias URLs, since aliases can be updated to point to a different version.

Annotations VersionAnnotationsoptional

Metadata about the version.

WorkersMessage stringoptional

Human-readable message about the version.

maxLength100
WorkersTag stringoptional

User-provided identifier for the version.

maxLength25
WorkersTriggeredBy stringoptional

Operation that triggered the creation of the version.

Assets VersionAssetsoptional

Configuration for assets within a Worker.

_headers and _redirects files should be included as modules named _headers and _redirects with content type text/plain.

Config VersionAssetsConfigoptional

Configuration for assets within a Worker.

HTMLHandling VersionAssetsConfigHTMLHandlingoptional

Determines the redirects and rewrites of requests for HTML content.

One of the following:
const VersionAssetsConfigHTMLHandlingAutoTrailingSlash VersionAssetsConfigHTMLHandling = "auto-trailing-slash"
const VersionAssetsConfigHTMLHandlingForceTrailingSlash VersionAssetsConfigHTMLHandling = "force-trailing-slash"
const VersionAssetsConfigHTMLHandlingDropTrailingSlash VersionAssetsConfigHTMLHandling = "drop-trailing-slash"
const VersionAssetsConfigHTMLHandlingNone VersionAssetsConfigHTMLHandling = "none"
NotFoundHandling VersionAssetsConfigNotFoundHandlingoptional

Determines the response when a request does not match a static asset, and there is no Worker script.

One of the following:
const VersionAssetsConfigNotFoundHandlingNone VersionAssetsConfigNotFoundHandling = "none"
const VersionAssetsConfigNotFoundHandling404Page VersionAssetsConfigNotFoundHandling = "404-page"
const VersionAssetsConfigNotFoundHandlingSinglePageApplication VersionAssetsConfigNotFoundHandling = "single-page-application"
RunWorkerFirst VersionAssetsConfigRunWorkerFirstUnionoptional

Contains a list path rules to control routing to either the Worker or assets. Glob (*) and negative (!) rules are supported. Rules must start with either '/' or '!/'. At least one non-negative rule must be provided, and negative rules have higher precedence than non-negative rules.

One of the following:
type VersionAssetsConfigRunWorkerFirstArray []string

Contains a list path rules to control routing to either the Worker or assets. Glob (*) and negative (!) rules are supported. Rules must start with either '/' or '!/'. At least one non-negative rule must be provided, and negative rules have higher precedence than non-negative rules.

UnionBool
JWT stringoptional

Token provided upon successful upload of all files from a registered manifest.

Bindings []VersionBindingoptional

List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.

One of the following:
type VersionBindingsWorkersBindingKindAI struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindAIType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindAISearch struct{…}
InstanceName string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindAISearchType

The kind of resource that the binding provides.

Namespace stringoptional

The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field.

type VersionBindingsWorkersBindingKindAISearchNamespace struct{…}
Name string

A JavaScript variable name for the binding.

Namespace string

The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

Type VersionBindingsWorkersBindingKindAISearchNamespaceType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindAnalyticsEngine struct{…}
Dataset string

The name of the dataset to bind to.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindAnalyticsEngineType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindAssets struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindAssetsType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindBrowser struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindBrowserType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindD1 struct{…}
ID string

Identifier of the D1 database to bind to.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindD1Type

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindDataBlob struct{…}
Name string

A JavaScript variable name for the binding.

Part string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

DeprecatedType VersionBindingsWorkersBindingKindDataBlobType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindDispatchNamespace struct{…}
Name string

A JavaScript variable name for the binding.

Namespace string

The name of the dispatch namespace.

Type VersionBindingsWorkersBindingKindDispatchNamespaceType

The kind of resource that the binding provides.

Outbound VersionBindingsWorkersBindingKindDispatchNamespaceOutboundoptional

Outbound worker.

Params []VersionBindingsWorkersBindingKindDispatchNamespaceOutboundParamoptional

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

Name string

Name of the parameter.

Worker VersionBindingsWorkersBindingKindDispatchNamespaceOutboundWorkeroptional

Outbound worker.

Entrypoint stringoptional

Entrypoint to invoke on the outbound worker.

Environment stringoptional

Environment of the outbound worker.

Service stringoptional

Name of the outbound worker.

type VersionBindingsWorkersBindingKindDurableObjectNamespace struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindDurableObjectNamespaceType

The kind of resource that the binding provides.

ClassName stringoptional

The exported class name of the Durable Object.

DispatchNamespace stringoptional

The dispatch namespace the Durable Object script belongs to.

Environment stringoptional

The environment of the script_name to bind to.

NamespaceID stringoptional

Namespace identifier tag.

maxLength32
ScriptName stringoptional

The script where the Durable Object is defined, if it is external to this Worker.

type VersionBindingsWorkersBindingKindHyperdrive struct{…}
ID string

Identifier of the Hyperdrive connection to bind to.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindHyperdriveType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindInherit struct{…}
Name string

The name of the inherited binding.

Type VersionBindingsWorkersBindingKindInheritType

The kind of resource that the binding provides.

OldName stringoptional

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

VersionID stringoptional

Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version.

type VersionBindingsWorkersBindingKindImages struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindImagesType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindJson struct{…}
Json unknown

JSON data to use.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindJsonType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindKVNamespace struct{…}
Name string

A JavaScript variable name for the binding.

NamespaceID string

Namespace identifier tag.

maxLength32
Type VersionBindingsWorkersBindingKindKVNamespaceType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindMedia struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindMediaType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindMTLSCertificate struct{…}
CertificateID string

Identifier of the certificate to bind to.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindMTLSCertificateType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindPlainText struct{…}
Name string

A JavaScript variable name for the binding.

Text string

The text value to use.

Type VersionBindingsWorkersBindingKindPlainTextType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindPipelines struct{…}
Name string

A JavaScript variable name for the binding.

Pipeline string

Name of the Pipeline to bind to.

Type VersionBindingsWorkersBindingKindPipelinesType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindQueue struct{…}
Name string

A JavaScript variable name for the binding.

QueueName string

Name of the Queue to bind to.

Type VersionBindingsWorkersBindingKindQueueType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindRatelimit struct{…}
Name string

A JavaScript variable name for the binding.

NamespaceID string

Identifier of the rate limit namespace to bind to.

Simple VersionBindingsWorkersBindingKindRatelimitSimple

The rate limit configuration.

Limit float64

The limit (requests per period).

Period int64

The period in seconds.

Type VersionBindingsWorkersBindingKindRatelimitType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindR2Bucket struct{…}
BucketName string

R2 bucket to bind to.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindR2BucketType

The kind of resource that the binding provides.

Jurisdiction VersionBindingsWorkersBindingKindR2BucketJurisdictionoptional

The jurisdiction of the R2 bucket.

One of the following:
const VersionBindingsWorkersBindingKindR2BucketJurisdictionEu VersionBindingsWorkersBindingKindR2BucketJurisdiction = "eu"
const VersionBindingsWorkersBindingKindR2BucketJurisdictionFedramp VersionBindingsWorkersBindingKindR2BucketJurisdiction = "fedramp"
const VersionBindingsWorkersBindingKindR2BucketJurisdictionFedrampHigh VersionBindingsWorkersBindingKindR2BucketJurisdiction = "fedramp-high"
type VersionBindingsWorkersBindingKindSecretText struct{…}
Name string

A JavaScript variable name for the binding.

Text string

The secret value to use.

Type VersionBindingsWorkersBindingKindSecretTextType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindSendEmail struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindSendEmailType

The kind of resource that the binding provides.

AllowedDestinationAddresses []stringoptional

List of allowed destination addresses.

AllowedSenderAddresses []stringoptional

List of allowed sender addresses.

DestinationAddress stringoptional

Destination address for the email.

formatemail
type VersionBindingsWorkersBindingKindService struct{…}
Name string

A JavaScript variable name for the binding.

Service string

Name of Worker to bind to.

Type VersionBindingsWorkersBindingKindServiceType

The kind of resource that the binding provides.

Entrypoint stringoptional

Entrypoint to invoke on the target Worker.

Environment stringoptional

Optional environment if the Worker utilizes one.

type VersionBindingsWorkersBindingKindTextBlob struct{…}
Name string

A JavaScript variable name for the binding.

Part string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

DeprecatedType VersionBindingsWorkersBindingKindTextBlobType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindVectorize struct{…}
IndexName string

Name of the Vectorize index to bind to.

Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindVectorizeType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindVersionMetadata struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindVersionMetadataType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindSecretsStoreSecret struct{…}
Name string

A JavaScript variable name for the binding.

SecretName string

Name of the secret in the store.

StoreID string

ID of the store containing the secret.

Type VersionBindingsWorkersBindingKindSecretsStoreSecretType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindSecretKey struct{…}
Algorithm unknown

Algorithm-specific key parameters. Learn more.

Format VersionBindingsWorkersBindingKindSecretKeyFormat

Data format of the key. Learn more.

One of the following:
const VersionBindingsWorkersBindingKindSecretKeyFormatRaw VersionBindingsWorkersBindingKindSecretKeyFormat = "raw"
const VersionBindingsWorkersBindingKindSecretKeyFormatPkcs8 VersionBindingsWorkersBindingKindSecretKeyFormat = "pkcs8"
const VersionBindingsWorkersBindingKindSecretKeyFormatSpki VersionBindingsWorkersBindingKindSecretKeyFormat = "spki"
const VersionBindingsWorkersBindingKindSecretKeyFormatJwk VersionBindingsWorkersBindingKindSecretKeyFormat = "jwk"
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindSecretKeyType

The kind of resource that the binding provides.

Usages []VersionBindingsWorkersBindingKindSecretKeyUsage

Allowed operations with the key. Learn more.

One of the following:
const VersionBindingsWorkersBindingKindSecretKeyUsageEncrypt VersionBindingsWorkersBindingKindSecretKeyUsage = "encrypt"
const VersionBindingsWorkersBindingKindSecretKeyUsageDecrypt VersionBindingsWorkersBindingKindSecretKeyUsage = "decrypt"
const VersionBindingsWorkersBindingKindSecretKeyUsageSign VersionBindingsWorkersBindingKindSecretKeyUsage = "sign"
const VersionBindingsWorkersBindingKindSecretKeyUsageVerify VersionBindingsWorkersBindingKindSecretKeyUsage = "verify"
const VersionBindingsWorkersBindingKindSecretKeyUsageDeriveKey VersionBindingsWorkersBindingKindSecretKeyUsage = "deriveKey"
const VersionBindingsWorkersBindingKindSecretKeyUsageDeriveBits VersionBindingsWorkersBindingKindSecretKeyUsage = "deriveBits"
const VersionBindingsWorkersBindingKindSecretKeyUsageWrapKey VersionBindingsWorkersBindingKindSecretKeyUsage = "wrapKey"
const VersionBindingsWorkersBindingKindSecretKeyUsageUnwrapKey VersionBindingsWorkersBindingKindSecretKeyUsage = "unwrapKey"
KeyBase64 stringoptional

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

KeyJwk unknownoptional

Key data in JSON Web Key format. Required if format is "jwk".

type VersionBindingsWorkersBindingKindWorkflow struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindWorkflowType

The kind of resource that the binding provides.

WorkflowName string

Name of the Workflow to bind to.

ClassName stringoptional

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

ScriptName stringoptional

Script name that contains the Workflow. If not provided, defaults to this script name.

type VersionBindingsWorkersBindingKindWasmModule struct{…}
Name string

A JavaScript variable name for the binding.

Part string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

DeprecatedType VersionBindingsWorkersBindingKindWasmModuleType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindVPCService struct{…}
Name string

A JavaScript variable name for the binding.

ServiceID string

Identifier of the VPC service to bind to.

Type VersionBindingsWorkersBindingKindVPCServiceType

The kind of resource that the binding provides.

type VersionBindingsWorkersBindingKindVPCNetwork struct{…}
Name string

A JavaScript variable name for the binding.

Type VersionBindingsWorkersBindingKindVPCNetworkType

The kind of resource that the binding provides.

NetworkID stringoptional

Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id.

TunnelID stringoptional

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

CompatibilityDate stringoptional

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

CompatibilityFlags []stringoptional

Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.

Limits VersionLimitsoptional

Resource limits enforced at runtime.

CPUMs int64

CPU time limit in milliseconds.

MainModule stringoptional

The name of the main module in the modules array (e.g. the name of the module that exports a fetch handler).

Migrations VersionMigrationsoptional

Migrations for Durable Objects associated with the version. Migrations are applied when the version is deployed.

One of the following:
type SingleStepMigration struct{…}

A single set of migrations to apply.

DeletedClasses []stringoptional

A list of classes to delete Durable Object namespaces from.

NewClasses []stringoptional

A list of classes to create Durable Object namespaces from.

NewSqliteClasses []stringoptional

A list of classes to create Durable Object namespaces with SQLite from.

NewTag stringoptional

Tag to set as the latest migration tag.

OldTag stringoptional

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

RenamedClasses []SingleStepMigrationRenamedClassoptional

A list of classes with Durable Object namespaces that were renamed.

From stringoptional
To stringoptional
TransferredClasses []SingleStepMigrationTransferredClassoptional

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

From stringoptional
FromScript stringoptional
To stringoptional
type VersionMigrationsWorkersMultipleStepMigrations struct{…}
NewTag stringoptional

Tag to set as the latest migration tag.

OldTag stringoptional

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

Steps []MigrationStepoptional

Migrations to apply in order.

DeletedClasses []stringoptional

A list of classes to delete Durable Object namespaces from.

NewClasses []stringoptional

A list of classes to create Durable Object namespaces from.

NewSqliteClasses []stringoptional

A list of classes to create Durable Object namespaces with SQLite from.

RenamedClasses []MigrationStepRenamedClassoptional

A list of classes with Durable Object namespaces that were renamed.

From stringoptional
To stringoptional
TransferredClasses []MigrationStepTransferredClassoptional

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

From stringoptional
FromScript stringoptional
To stringoptional
Modules []VersionModuleoptional

Code, sourcemaps, and other content used at runtime.

This includes _headers and _redirects files used to configure Static Assets. _headers and _redirects files should be included as modules named _headers and _redirects with content type text/plain.

ContentBase64 string

The base64-encoded module content.

formatbyte
ContentType string

The content type of the module.

Name string

The name of the module.

Placement VersionPlacementoptional

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
type VersionPlacementMode struct{…}
Mode VersionPlacementModeMode

Enables Smart Placement.

type VersionPlacementRegion struct{…}
Region string

Cloud region for targeted placement in format 'provider:region'.

type VersionPlacementHostname struct{…}
Hostname string

HTTP hostname for targeted placement.

type VersionPlacementHost struct{…}
Host string

TCP host and port for targeted placement.

type VersionPlacementObject struct{…}
Mode VersionPlacementObjectMode

Targeted placement mode.

Region string

Cloud region for targeted placement in format 'provider:region'.

type VersionPlacementObject struct{…}
Hostname string

HTTP hostname for targeted placement.

Mode VersionPlacementObjectMode

Targeted placement mode.

type VersionPlacementObject struct{…}
Host string

TCP host and port for targeted placement.

Mode VersionPlacementObjectMode

Targeted placement mode.

type VersionPlacementObject struct{…}
Mode VersionPlacementObjectMode

Targeted placement mode.

Target []VersionPlacementObjectTarget

Array of placement targets (currently limited to single target).

One of the following:
type VersionPlacementObjectTargetRegion struct{…}
Region string

Cloud region in format 'provider:region'.

type VersionPlacementObjectTargetHostname struct{…}
Hostname string

HTTP hostname for targeted placement.

type VersionPlacementObjectTargetHost struct{…}
Host string

TCP host:port for targeted placement.

Source stringoptional

The client used to create the version.

StartupTimeMs int64optional

Time in milliseconds spent on Worker startup.

DeprecatedUsageModel VersionUsageModeloptional

Usage model for the version.

One of the following:
const VersionUsageModelStandard VersionUsageModel = "standard"
const VersionUsageModelBundled VersionUsageModel = "bundled"
const VersionUsageModelUnbound VersionUsageModel = "unbound"