

Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés.

# SetTopicAttributes política de entrega (formato JSON)
<a name="set-topic-attributes-delivery-policy-json"></a>

Si envía una solicitud a la acción `SetTopicAttributes` y establece el parámetro `AttributeName` al valor `DeliveryPolicy`, el valor del parámetro `AttributeValue` válido debe ser un objeto JSON válido. Por ejemplo, el siguiente ejemplo establece la política de entrega en 5 reintentos en total.

```
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}}}
...
```

Utilice el siguiente formato JSON para el valor del parámetro `AttributeValue`.

```
{
    "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"
        }
    }
}
```

Para obtener más información sobre la `SetTopicAttribute` acción, consulta la *referencia [SetTopicAttributes](https://docs.aws.amazon.com/sns/latest/api/API_SetTopicAttributes.html)de la API de Amazon Simple Notification Service*. Para obtener más información sobre los encabezados content-type de HTTP compatibles, consulte [Crear una política HTTP/S de entrega](sns-message-delivery-retries.md#creating-delivery-policy).