我正在尝试为设置一个名称
elasticache.CfnParameterGroup
以符合某些IAM权限边界(名称必须以前缀开头,例如。
my-project
。现在我正在尝试使用“description”参数进行以下操作:
import aws_cdk.aws_elasticache as elasticache
# ...
parameter_group = elasticache.CfnParameterGroup(
main,
"RedisParameterGroup",
description="my-project-param-group",
cache_parameter_group_family="redis6.x",
)
这不起作用,因为它没有将参数组名称设置为正确的前缀。
所以,我找不到构造函数的任何“命名”参数。我试着添加一个标签,比如
tags=[{"key": "Name", "value": "my-project-param-group"}],
但这仍然没有给参数组一个名称。的帮助文本
CfnParameterGroup
说:
def __init__(self,
scope: Construct,
id: str,
*,
cache_parameter_group_family: str,
description: str,
properties: IResolvable | Mapping[str, str] | None = None,
tags: Sequence[CfnTag | dict[str, Any]] | None = None) -> None
它不显示任何命名参数。大多数其他构造似乎都有某种命名参数,例如实际的
CfnCacheCluster
有
cluster_name
-参数组的等价项是什么?