Skip to content

StringSpecializer

Initializers

import ros_cdk_core
ros_cdk_core.StringSpecializer(
  stack: Stack,
  qualifier: str
)
Name Type Description
stack Stack No description.
qualifier str No description.

stackRequired


qualifierRequired

  • Type: str

Methods

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

qualifier_only

def qualifier_only(
  str: str
) -> str

Specialize only the qualifier.

strRequired

  • Type: str

specialize

def specialize(
  str: str
) -> str

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: str

specialize_no_tokens

def specialize_no_tokens(
  str: str,
  what: str
) -> str

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

strRequired

  • Type: str

whatRequired

  • Type: str

Static Functions

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

validate_no_tokens

import ros_cdk_core
ros_cdk_core.StringSpecializer.validate_no_tokens(
  str: str,
  what: str
)

Validate that the given string does not contain tokens.

strRequired

  • Type: str

whatRequired

  • Type: str