Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.AddSQSPermission C# (CSharp) Метод

AddSQSPermission() приватный статический Метод

Add statement to the policy that gives the sns topic access to send a message to the queue.
private static AddSQSPermission ( Amazon.Auth.AccessControlPolicy.Policy policy, string topicArn, string sqsQueueArn ) : void
policy Amazon.Auth.AccessControlPolicy.Policy
topicArn string
sqsQueueArn string
Результат void
        private static void AddSQSPermission(Policy policy, string topicArn, string sqsQueueArn)
        {
            Statement statement = new Statement(Statement.StatementEffect.Allow);
            statement.Actions.Add(SQSActionIdentifiers.SendMessage);
            statement.Resources.Add(new Resource(sqsQueueArn));
            statement.Conditions.Add(ConditionFactory.NewSourceArnCondition(topicArn));
            statement.Principals.Add(new Principal("*"));
            policy.Statements.Add(statement);
        }
AmazonSimpleNotificationServiceClient