stdcdk

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package stdcdk provides some re-usable code for building AWS CDK constructs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStack

func NewStack(scope constructs.Construct, region string) awscdk.Stack

NewStack creates and returns a new AWS CDK Stack within the specified scope, configured for a specific AWS region. It retrieves the "qualifier" and "environment" values from the scope's context to customize the stack's ID, description, and synthesizer settings. The stack ID is composed of the qualifier and the region acronym.

func RegionAcronym

func RegionAcronym(region string) string

RegionAcronym takes an AWS region identifier as input and returns its corresponding three-letter acronym. It supports common AWS regions and panics if an unsupported region is provided.

func StringContext

func StringContext(scope constructs.Construct, key string) string

StringContext retrieves a string value from the context of the provided Construct scope using the specified key. It expects the context value associated with the key to be a string. If the value is not a string or if the key is missing, the function panics with a descriptive error. This function is useful for retrieving typed context values in CDK constructs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL