AWS SDK for .NET Documentation
NewSourceArnCondition Method (arnPattern)
AmazonAmazon.Auth.AccessControlPolicyConditionFactoryNewSourceArnCondition(String) Did this page help you?   Yes   No    Tell us about it...
Constructs a new access policy condition that compares the Amazon Resource Name (ARN) of the source of an AWS resource that is modifying another AWS resource with the specified pattern.

For example, the source ARN could be an Amazon SNS topic ARN that is sending messages to an Amazon SQS queue. In that case, the SNS topic ARN would be compared the ARN pattern specified here.

The endpoint pattern may optionally contain the multi-character wildcard * (*) or the single-character wildcard (?). Each of the six colon-delimited components of the ARN is checked separately and each can include a wildcard.

CopyC#
Policy policy = new Policy("MyQueuePolicy");
policy.WithStatements(new Statement(Statement.StatementEffect.Allow)
    .WithPrincipals(new Principal("*")).WithActionIdentifiers(SQSActionIdentifiers.SendMessage)
    .WithResources(new Resource(myQueueArn))
    .WithConditions(ConditionFactory.NewSourceArnCondition(myTopicArn)));
Declaration Syntax
C#
public static Condition NewSourceArnCondition(
	string arnPattern
)
Parameters
arnPattern (String)
The ARN pattern against which the source ARN will be compared. Each of the six colon-delimited components of the ARN is checked separately and each can include a wildcard.
Return Value
A new access control policy condition that compares the ARN of the source specified in an incoming request with the ARN pattern specified here.

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)