Skip to content

One Observability Workshop v3.0.0


One Observability Workshop / utils/utilities / Utilities

Variable: Utilities

const Utilities: object

Defined in: utils/utilities.ts:25

Utility class providing helper functions for common CDK operations.

This class contains static methods for tagging resources and retrieving CDK lookup role ARNs.

Type Declaration

TagConstruct()

TagConstruct(object, tags): void

Adds tags to a construct and all its children recursively.

This method applies tags to both the CDK construct and the underlying CloudFormation resources. For CloudFormation resources, it checks if the resource type supports tagging before applying tags.

Parameters

object

Construct

The construct to which tags will be applied

tags

Map of tag keys and values to apply

Returns

void

FindChildNodes()

FindChildNodes(construct, partialName, resourceType?): Construct[]

Recursively searches for child nodes in a construct by resource type and partial name match.

Parameters

construct

Construct

The root construct to search within

partialName

string

Partial match string for the resource name

resourceType?

string

Optional CloudFormation resource type to search for (e.g., 'AWS::Lambda::Function')

Returns

Construct[]

Array of matching constructs

SuppressLogRetentionNagWarnings()

SuppressLogRetentionNagWarnings(construct): void

Applies NAG suppressions to log retention resources in a construct.

Parameters

construct

Construct

The construct to search for log retention resources

Returns

void

SuppressKubectlProviderNagWarnings()

SuppressKubectlProviderNagWarnings(construct): void

Parameters

construct

Construct

Returns

void

createSsmParameters()

createSsmParameters(scope, prefix, parameters): void

Parameters

scope

Construct

prefix

string

parameters

Map\<string, string>

Returns

void

createOutputs()

createOutputs(scope, parameters, descriptions?): void

Parameters

scope

Construct

parameters

Map\<string, string>

descriptions?

Map\<string, string>

Returns

void