Skip to content

Instantly share code, notes, and snippets.

Created October 31, 2022 16:03
What would you like to do?
3 things sns 11-01-22
var snsClient = new AmazonSimpleNotificationServiceClient();
string tenantIdentifierAttributeKey = "tenant-id";
MessageAttributeValue tenantIdentifierAttributeValue = new MessageAttributeValue();
tenantIdentifierAttributeValue.StringValue = "(tenant-id-value)"
tenantIdentifierAttributeValue.DataType = "String";
PublishRequest publishRequest = new PublishRequest();
publishRequest.MessageAttributes.Add(tenantIdentifierAttributeKey, tenantIdentifierAttributeValue);
publishRequest.Message = "Test Message";
publishRequest.TopicArn = "(my-topic-arn)";
await snsClient.PublishAsync(publishRequest);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment