Skip to content

StringSpecializer

Initializers

import { StringSpecializer } from '@alicloud/ros-cdk-core'
new StringSpecializer(stack: Stack, qualifier: string)
Name Type Description
stack Stack No description.
qualifier string No description.

stackRequired


qualifierRequired

  • Type: string

Methods

Name Description
qualifierOnly Specialize only the qualifier.
specialize Function to replace placeholders in the input string as much as possible.
specializeNoTokens Specialize the given string, make sure it doesn't contain tokens.

qualifierOnly

public qualifierOnly(str: string): string

Specialize only the qualifier.

strRequired

  • Type: string

specialize

public specialize(str: string): string

Function to replace placeholders in the input string as much as possible.

We replace: - ${Qualifier}: always - ${ALIYUN::AccountId}, ${ALIYUN::Region}: only if we have the actual values available

strRequired

  • Type: string

specializeNoTokens

public specializeNoTokens(str: string, what: string): string

Specialize the given string, make sure it doesn't contain tokens.

strRequired

  • Type: string

whatRequired

  • Type: string

Static Functions

Name Description
validateNoTokens Validate that the given string does not contain tokens.

validateNoTokens

import { StringSpecializer } from '@alicloud/ros-cdk-core'
StringSpecializer.validateNoTokens(str: string, what: string)

Validate that the given string does not contain tokens.

strRequired

  • Type: string

whatRequired

  • Type: string