[英]Aws cloud formation template: how to provide retention period for Kinesis resource?
Aws 雲形成模板:如何為 Kinesis 資源提供保留期?
嗨,我想指定 Kinesis 的保留期,我在文檔中沒有找到任何屬性。 有沒有辦法實現這一目標?
通過CF是不可能做到的。 Kinesis 流由 CreateStream API 調用創建,而更改保留期需要單獨調用,實際上有兩個:IncreaseStreamRetentionPeriod 和 DecreaseStreamRetentionPeriod。 只有在創建流后才能調用它們。
MongoCDCStream:
Type: AWS::Kinesis::Stream
Properties:
Name: !Ref CFNStreamName
RetentionPeriodHours: !Ref CFNRetensionHours
ShardCount: !Ref CFNShardCount
StreamEncryption:
EncryptionType: KMS
KeyId: alias/aws/kinesis
如果您正在談論存儲在分片中以保持可訪問性的數據記錄。 那么下面是屬性。
RetentionPeriodHours 存儲在分片中的數據記錄保持可訪問的小時數。 默認值為 24。有關流保留期的更多信息,請參閱 Amazon Kinesis 開發人員指南中的更改數據保留期。
要求:否
類型:整數
更新要求:無中斷
MyStream:
Type: AWS::Kinesis::Stream
Properties:
Name: MyKinesisStream
RetentionPeriodHours: 168
ShardCount: 3
StreamEncryption:
EncryptionType: KMS
KeyId: !Ref myKey
Tags:
-
Key: Environment
Value: Production
參考網址: https : //docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.