internal virtual CreateNotificationRuleResponse CreateNotificationRule(CreateNotificationRuleRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateNotificationRuleRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateNotificationRuleResponseUnmarshaller.Instance; return(Invoke <CreateNotificationRuleResponse>(request, options)); }
/// <summary> /// Creates a notification rule for a resource. The rule specifies the events you want /// notifications about and the targets (such as SNS topics) where you want to receive /// them. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateNotificationRule service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the CreateNotificationRule service method, as returned by CodeStarNotifications.</returns> /// <exception cref="Amazon.CodeStarNotifications.Model.AccessDeniedException"> /// AWS CodeStar Notifications can't create the notification rule because you do not have /// sufficient permissions. /// </exception> /// <exception cref="Amazon.CodeStarNotifications.Model.ConcurrentModificationException"> /// AWS CodeStar Notifications can't complete the request because the resource is being /// modified by another process. Wait a few minutes and try again. /// </exception> /// <exception cref="Amazon.CodeStarNotifications.Model.ConfigurationException"> /// Some or all of the configuration is incomplete, missing, or not valid. /// </exception> /// <exception cref="Amazon.CodeStarNotifications.Model.LimitExceededException"> /// One of the AWS CodeStar Notifications limits has been exceeded. Limits apply to accounts, /// notification rules, notifications, resources, and targets. For more information, see /// Limits. /// </exception> /// <exception cref="Amazon.CodeStarNotifications.Model.ResourceAlreadyExistsException"> /// A resource with the same name or ID already exists. Notification rule names must be /// unique in your AWS account. /// </exception> /// <exception cref="Amazon.CodeStarNotifications.Model.ValidationException"> /// One or more parameter values are not valid. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/CreateNotificationRule">REST API Reference for CreateNotificationRule Operation</seealso> public virtual Task <CreateNotificationRuleResponse> CreateNotificationRuleAsync(CreateNotificationRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateNotificationRuleRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateNotificationRuleResponseUnmarshaller.Instance; return(InvokeAsync <CreateNotificationRuleResponse>(request, options, cancellationToken)); }