使用 TransactionAttributes
您可以使用 TransactionAttributes
数据结构存储应用程序特定的信息,例如调用状态或会议 ID,然后将这些数据传递至 AWS Lambda 调用。这种结构无需将数据存储至外部数据库(例如 Amazon DynamoDB)中。
TransactionAttributes
是包含密钥/值对的 JSON 对象TransactionAttributes
结构中的数据会在交易的生命周期内保持存在。
当 AWS Lambda 函数传递 TransactionAttributes
至 SIP 媒体应用程序时,该应用程序会更新所有存储的属性。如果您传递具有现有密钥集的 TransactionAttributes
对象,则会更新存储的值。如果您传递不同的密钥集,则将现有值替换为来自该密钥集的值。传递一个空的 map ({}
) 可擦除所有存储的值。