AddPermission() public method

Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.
/// Indicates that the user has been denied access to the requested resource. /// /// Indicates an internal service error. /// /// Indicates that a request parameter does not comply with the associated constraints. /// /// Indicates that the requested resource does not exist. ///
public AddPermission ( AddPermissionRequest request ) : Amazon.SimpleNotificationService.Model.AddPermissionResponse
request Amazon.SimpleNotificationService.Model.AddPermissionRequest Container for the necessary parameters to execute the AddPermission service method.
return Amazon.SimpleNotificationService.Model.AddPermissionResponse
Exemplo n.º 1
0
    public static void SNSAddPermission()
    {
      #region SNSAddPermission
      var snsClient = new AmazonSimpleNotificationServiceClient();

      var request = new AddPermissionRequest
      {
        TopicArn = "arn:aws:sns:us-east-1:80398EXAMPLE:CodingTestResults",
        ActionName = new List<string>() { "Subscribe" },
        AWSAccountId = new List<string>() { "80398EXAMPLE" },
        Label = "SubscribePolicy"
      };

      snsClient.AddPermission(request);
      #endregion
    }