'Getting Parameter Group name from AWS CDK Python rds.ParameterGroup

I'm building a RDS Parameter Group via Python CDK:

mygroup = rds.ParameterGroup(self,'blah',
   description="my description",
   engine=something,
   parameters={
     something
}

My question is, how do I name and get the name of the parameter group created. There doesn't seem to be a way to name it or use the name against another CFN construct.



Solution 1:[1]

To access the name, use the underlying CloudFormation resource's ref function:

mygroup.node.default_child.ref

Generally, though, if you're using L2 constructs, you shouldn't need to access the name directly.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 gshpychka