

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# SetTopicAttributes 配信ポリシーの JSON 形式
<a name="set-topic-attributes-delivery-policy-json"></a>

`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](https://docs.aws.amazon.com/sns/latest/api/API_SetTopicAttributes.html)にアクセスしてください。サポートされている HTTP コンテンツタイプヘッダーの詳細については、「[HTTP/S 配信ポリシーの作成](sns-message-delivery-retries.md#creating-delivery-policy)」を参照してください。