Skip to main content

Class: SetWorkerDeploymentCurrentVersionRequest

Set/unset the Current Version of a Worker Deployment.

Properties​

allowNoPollers​

allowNoPollers: boolean

Optional. By default this request will be rejected if no pollers have been seen for the proposed Current Version, in order to protect users from routing tasks to pollers that do not exist, leading to possible timeouts. Pass true here to bypass this protection.


buildId​

buildId: string

The build id of the Version that you want to set as Current. Pass an empty value to set the Current Version to nil. A nil Current Version represents all the unversioned workers (those with UNVERSIONED (or unspecified) WorkerVersioningMode.)


conflictToken​

conflictToken: Uint8Array

Optional. This can be the value of conflict_token from a Describe, or another Worker Deployment API. Passing a non-nil conflict token will cause this request to fail if the Deployment's configuration has been modified between the API call that generated the token and this one.


deploymentName​

deploymentName: string

SetWorkerDeploymentCurrentVersionRequest deploymentName.


identity​

identity: string

Optional. The identity of the client who initiated this request.


ignoreMissingTaskQueues​

ignoreMissingTaskQueues: boolean

Optional. By default this request would be rejected if not all the expected Task Queues are being polled by the new Version, to protect against accidental removal of Task Queues, or worker health issues. Pass true here to bypass this protection. The set of expected Task Queues is the set of all the Task Queues that were ever poller by the existing Current Version of the Deployment, with the following exclusions:

  • Task Queues that are not used anymore (inferred by having empty backlog and a task add_rate of 0.)
  • Task Queues that are moved to another Worker Deployment (inferred by the Task Queue having a different Current Version than the Current Version of this deployment.) WARNING: Do not set this flag unless you are sure that the missing task queue pollers are not needed. If the request is unexpectedly rejected due to missing pollers, then that means the pollers have not reached to the server yet. Only set this if you expect those pollers to never arrive.

namespace​

namespace: string

SetWorkerDeploymentCurrentVersionRequest namespace.


version​

version: string

Deprecated. Use build_id.

Methods​

toJSON()​

toJSON(): object

Converts this SetWorkerDeploymentCurrentVersionRequest to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): SetWorkerDeploymentCurrentVersionRequest & $Properties

Creates a new SetWorkerDeploymentCurrentVersionRequest instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

SetWorkerDeploymentCurrentVersionRequest & $Properties

SetWorkerDeploymentCurrentVersionRequest instance

Call Signature​

static create(properties?): SetWorkerDeploymentCurrentVersionRequest

Creates a new SetWorkerDeploymentCurrentVersionRequest instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

SetWorkerDeploymentCurrentVersionRequest

SetWorkerDeploymentCurrentVersionRequest instance


decode()​

static decode(reader, length?): SetWorkerDeploymentCurrentVersionRequest & $Properties

Decodes a SetWorkerDeploymentCurrentVersionRequest message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

SetWorkerDeploymentCurrentVersionRequest & $Properties

SetWorkerDeploymentCurrentVersionRequest

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): SetWorkerDeploymentCurrentVersionRequest & $Properties

Decodes a SetWorkerDeploymentCurrentVersionRequest message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

SetWorkerDeploymentCurrentVersionRequest & $Properties

SetWorkerDeploymentCurrentVersionRequest

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified SetWorkerDeploymentCurrentVersionRequest message. Does not implicitly temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest.verify|verify messages.

Parameters​

message​

$Properties

SetWorkerDeploymentCurrentVersionRequest message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified SetWorkerDeploymentCurrentVersionRequest message, length delimited. Does not implicitly temporal.api.workflowservice.v1.SetWorkerDeploymentCurrentVersionRequest.verify|verify messages.

Parameters​

message​

$Properties

SetWorkerDeploymentCurrentVersionRequest message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): SetWorkerDeploymentCurrentVersionRequest

Creates a SetWorkerDeploymentCurrentVersionRequest message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

Plain object

Returns​

SetWorkerDeploymentCurrentVersionRequest

SetWorkerDeploymentCurrentVersionRequest


toObject()​

static toObject(message, options?): object

Creates a plain object from a SetWorkerDeploymentCurrentVersionRequest message. Also converts values to other types if specified.

Parameters​

message​

SetWorkerDeploymentCurrentVersionRequest

SetWorkerDeploymentCurrentVersionRequest

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object