Skip to main content

Class: NamespaceSpec

namespace.v1.NamespaceSpec

Represents a NamespaceSpec.

Properties

apiKeyAuth

Optional apiKeyAuth: null | $Properties

The API key auth configuration for the namespace. If unspecified, API keys will be disabled. temporal:versioning:min_version=v0.2.0


capacitySpec

Optional capacitySpec: null | $Properties

The capacity configuration for the namespace. There are two capacity modes: on-demand and provisioned. On-demand capacity mode allows the namespace to scale automatically based on usage. Provisioned capacity mode allows the user to specify a fixed amount of capacity (in TRUs) for the namespace. Can be changed only when the last capacity request is not in progress. temporal:versioning:min_version=v0.10.0


codecServer

Optional codecServer: null | $Properties

Codec server spec used by UI to decode payloads for all users interacting with this namespace. Optional, default is unset.


connectivityRuleIds

connectivityRuleIds: string[]

The private connectivity configuration for the namespace. This will apply the connectivity rules specified to the namespace. temporal:versioning:min_version=v0.6.0


customSearchAttributes

customSearchAttributes: Object

The custom search attributes to use for the namespace. The name of the attribute is the key and the type is the value. Supported attribute types: text, keyword, int, double, bool, datetime, keyword_list. NOTE: currently deleting a search attribute is not supported. Optional, default is empty. Deprecated: Not supported after v0.3.0 api version. Use search_attributes instead. temporal:versioning:max_version=v0.3.0

Index signature

▪ [k: string]: string


fairness

Optional fairness: null | $Properties

The fairness configuration for the namespace. If unspecified, fairness features will be disabled. temporal:versioning:min_version=v0.14.0


highAvailability

Optional highAvailability: null | $Properties

The high availability configuration for the namespace. temporal:versioning:min_version=v0.4.0


lifecycle

Optional lifecycle: null | $Properties

The lifecycle configuration for the namespace. temporal:versioning:min_version=v0.4.0


mtlsAuth

Optional mtlsAuth: null | $Properties

The mTLS auth configuration for the namespace. If unspecified, mTLS will be disabled.


name

name: string

The name to use for the namespace. This will create a namespace that's available at '..tmprl.cloud:7233'. The name is immutable. Once set, it cannot be changed.


regions

regions: string[]

The ids of the regions where the namespace should be available. The GetRegions API can be used to get the list of valid region ids. Specifying more than one region makes the namespace "global", which is currently a preview only feature with restricted access. Please reach out to Temporal support for more information on global namespaces. When provisioned the global namespace will be active on the first region in the list and passive on the rest. Number of supported regions is 2. The regions is immutable. Once set, it cannot be changed. Example: ["aws-us-west-2"]. Deprecated: Use replicas field instead. temporal:versioning:max_version=v0.15.0


replicas

replicas: $Properties[]

The replication configuration for the namespace. At least one replica must be specified. Only one replica can be marked to be the desired active one. The status of each replica is available in the Namespace.replicas field. Use HighAvailabilitySpec to set the preferred primary replica ID. If the preferred primary replica ID is not set, the first replica in this replicas list will be the preferred primary. temporal:versioning:min_version=v0.13.0


retentionDays

retentionDays: number

The number of days the workflows data will be retained for. Changes to the retention period may impact your storage costs. Any changes to the retention period will be applied to all new running workflows.


searchAttributes

searchAttributes: Object

The custom search attributes to use for the namespace. The name of the attribute is the key and the type is the value. Note: currently deleting a search attribute is not supported. Optional, default is empty. temporal:versioning:min_version=v0.3.0 temporal:enums:replaces=custom_search_attributes

Index signature

▪ [k: string]: SearchAttributeType

Methods

toJSON

toJSON(): Object

Converts this NamespaceSpec to JSON.

Returns

Object

JSON object


create

create(properties?): NamespaceSpec & $Shape

Creates a new NamespaceSpec instance using the specified properties.

Parameters

NameTypeDescription
properties?$ShapeProperties to set

Returns

NamespaceSpec & $Shape

NamespaceSpec instance

create(properties?): NamespaceSpec

Parameters

NameType
properties?$Properties

Returns

NamespaceSpec


decode

decode(reader, length?): NamespaceSpec & $Shape

Decodes a NamespaceSpec message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

NamespaceSpec & $Shape

NamespaceSpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): NamespaceSpec & $Shape

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

NamespaceSpec & $Shape

NamespaceSpec

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified NamespaceSpec message. Does not implicitly temporal.api.cloud.namespace.v1.NamespaceSpec.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesNamespaceSpec message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified NamespaceSpec message, length delimited. Does not implicitly temporal.api.cloud.namespace.v1.NamespaceSpec.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesNamespaceSpec message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): NamespaceSpec

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

NamespaceSpec

NamespaceSpec


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageNamespaceSpecNamespaceSpec
options?IConversionOptionsConversion options

Returns

Object

Plain object