public void SetEndpointAttribute(string endpointarn, string key, string value)
{
try
{
var endpoint = GetEndpoint(string.Empty, endpointarn);
if (string.IsNullOrEmpty(endpoint)) throw new ArgumentNullException("endpointarn");
Dictionary<string, string> attributes = (Dictionary<string, string>) GetEndpointAttributes(endpointarn);
attributes[key] = value;
using (var snsclient = new AmazonSimpleNotificationServiceClient(_accesskey, _secretkey))
{
var result = snsclient.SetEndpointAttributes(new SetEndpointAttributesRequest()
{
EndpointArn = endpointarn,
Attributes = attributes
});
}
}
catch (Exception ex)
{
throw new Exception("SetEndpointAttribute " + ex.Message);
}
}