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

AddPermission() публичный Метод

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.
Результат Amazon.SimpleNotificationService.Model.AddPermissionResponse
        public AddPermissionResponse AddPermission(AddPermissionRequest request)
        {
            var marshaller = new AddPermissionRequestMarshaller();
            var unmarshaller = AddPermissionResponseUnmarshaller.Instance;

            return Invoke<AddPermissionRequest,AddPermissionResponse>(request, marshaller, unmarshaller);
        }

Same methods

AmazonSimpleNotificationServiceClient::AddPermission ( string topicArn, string label, List awsAccountId, List actionName ) : Amazon.SimpleNotificationService.Model.AddPermissionResponse

Usage Example

Пример #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
    }
AmazonSimpleNotificationServiceClient