Amazon cloudformation Aws云形成模板:如何为Kinesis资源提供StreamName?
我想通过cloud formation模板创建一个Kinesis资源,但它不允许我提供“StreamName”作为资源的属性Amazon cloudformation Aws云形成模板:如何为Kinesis资源提供StreamName?,amazon-cloudformation,amazon-kinesis,Amazon Cloudformation,Amazon Kinesis,我想通过cloud formation模板创建一个Kinesis资源,但它不允许我提供“StreamName”作为资源的属性 "KinesisResource":{ "Type" : "AWS::Kinesis::Stream", "Properties" : { "ShardCount" : 1 "StreamName":"KinesisStream" } }, 它显示“无法识别的属性”StreamName。 如何在模板中指定流名称。 谢谢 Nithya。显然,到目前为止,您无法指定流名称
"KinesisResource":{
"Type" : "AWS::Kinesis::Stream",
"Properties" : {
"ShardCount" : 1
"StreamName":"KinesisStream"
}
},
它显示“无法识别的属性”StreamName。
如何在模板中指定流名称。
谢谢
Nithya。显然,到目前为止,您无法指定流名称。仅支持ShardCount作为唯一参数的Kinesis文档 您可能可以使用
{“Ref”:“实例的资源名称”}
到目前为止,流的名称是以-
堆栈名称:MyKinesisStack
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"KinesisStream1" : {
"Type" : "AWS::Kinesis::Stream",
"Properties" : {
"ShardCount" : "1"
}
}
},
"Outputs" : {
"KinesisStreamName" : {
"Description" : "Kenisis Stream Name",
"Value" : { "Ref" : "KinesisStream1"}
}
}
}
上面的堆栈将创建一个名为-MyKinesisStack-KinesisStream1-ARTSDY32AS的Kinesis流这已通过属性中的name解决
{
"Type" : "AWS::Kinesis::Stream",
"Properties" : {
"Name" : String,
"ShardCount" : Integer,
"Tags" : [ Resource Tag, ... ]
}
}
Hi Naveen,谢谢你的回复。是的,这就是我所做的,并在环境的选项设置中使用了输出值。但我仍然想知道,因为API有setStreamName,只有cloudFormation不允许流的命名。@NaveenVijay请在有正式更新时在此更新。当然会这样做@advncd