tenantSegments
tenantSegments(
context,options,missing): (string|undefined)[]
Defined in: packages/pipeline/src/helpers/tenant-partition.ts:42
The tenant segment of a partitioned key: [context.tenantId], or [] when
includeTenant is false.
Parameters
Section titled “Parameters”context
Section titled “context”options
Section titled “options”missing
Section titled “missing”(requestName, dimension, remedy) => Error
The package’s partition error, raised with the dimension
'tenant' when the tenant is required and absent.
Returns
Section titled “Returns”(string | undefined)[]
Throws
Section titled “Throws”What missing builds, when a required tenant is absent.
Example
Section titled “Example”joinKeySegments([ ...tenantSegments(context, options, MissingRateLimitPartitionError), caller, context.requestName,]);