Skip to content

Instantly share code, notes, and snippets.

@awswithdotnet
Created October 31, 2022 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awswithdotnet/1c3adcd2046d8c19df37896a75014d3d to your computer and use it in GitHub Desktop.
Save awswithdotnet/1c3adcd2046d8c19df37896a75014d3d to your computer and use it in GitHub Desktop.
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