SetTopicAttributes 传输策略 JSON 格式 - Amazon Simple Notification Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

SetTopicAttributes 传输策略 JSON 格式

如果您向 SetTopicAttributes 操作发送一个请求并将 AttributeName 参数设置为 DeliveryPolicy 值,那么 AttributeValue 参数的值必须是一个有效的 JSON 对象。例如,以下例子将传输策略设置为 5 次重试。

http://sns.us-east-2.amazonaws.com/ ?Action=SetTopicAttributes &TopicArn=arn%3Aaws%3Asns%3Aus-east-2%3A123456789012%3AMy-Topic &AttributeName=DeliveryPolicy &AttributeValue={"http":{"defaultHealthyRetryPolicy":{"numRetries":5}}} ...

AttributeValue 参数的值使用下列 JSON 格式。

{ "http" : { "defaultHealthyRetryPolicy" : { "minDelayTarget": int, "maxDelayTarget": int, "numRetries": int, "numMaxDelayRetries": int, "backoffFunction": "linear|arithmetic|geometric|exponential" }, "disableSubscriptionOverrides" : Boolean, "defaultThrottlePolicy" : { "maxReceivesPerSecond" : int }, "defaultRequestPolicy" : { "headerContentType" : "text/plain | application/json | application/xml" } } }

有关 SetTopicAttribute 操作的更多信息,请转到 Amazon Simple Notification Service API 参考中的 SetTopicAttributes。有关支持的 HTTP content-type 标头的更多信息,请参阅创建 HTTP/S 传输策略