DescribeNotificationConfigurations() public method

Describes the notification actions associated with the specified Auto Scaling group.
/// The NextToken value is not valid. /// /// You already have a pending update to an Auto Scaling resource (for example, a group, /// instance, or load balancer). ///
public DescribeNotificationConfigurations ( ) : DescribeNotificationConfigurationsResponse
return DescribeNotificationConfigurationsResponse
        /// <summary>
        /// Load auto scaling groups to view model with AWS data based on region selected and EC2 classic/vpc
        /// </summary>
        private void LoadAutoScalingGroups(AmazonAutoScalingClient asClient)
        {
            try
            {
                DescribeAutoScalingGroupsRequest asreq = new DescribeAutoScalingGroupsRequest();
                DescribeAutoScalingGroupsResponse asresp = asClient.DescribeAutoScalingGroups(asreq);
                Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
                {
                    vm.AutoScalingGroups.Clear();
                }));
                foreach (AutoScalingGroup asg in asresp.DescribeAutoScalingGroupsResult.AutoScalingGroups)
                {
                    if (vm.IsVpc)
                    {
                        if (!string.IsNullOrEmpty(asg.VPCZoneIdentifier) && vm.SelectedVpc != null)
                        {
                            foreach (Models.ConsoleSubnet subnet in vm.SelectedVpc.Subnets)
                            {
                                if (asg.VPCZoneIdentifier.Contains(subnet.Subnet.SubnetId))
                                {
                                    //vm.AutoScalingGroups.Add(asg);
                                    Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
                                    {
                                        vm.AutoScalingGroups.Add(new Models.ConsoleASG() { AutoScalingGroup = asg });
                                    }));
                                    break;
                                }
                            }
                        }
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(asg.VPCZoneIdentifier))
                        {
                            Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
                            {
                                vm.AutoScalingGroups.Add(new Models.ConsoleASG() { AutoScalingGroup = asg });
                            }));
                        }
                    }
                }

                Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
                {
                    for (int i = 0; i < vm.AutoScalingGroups.Count(); i++)
                    {
                        DescribeNotificationConfigurationsRequest nreq = new DescribeNotificationConfigurationsRequest();
                        nreq.WithAutoScalingGroupNames(vm.AutoScalingGroups[i].AutoScalingGroup.AutoScalingGroupName);
                        DescribeNotificationConfigurationsResponse nresp = asClient.DescribeNotificationConfigurations(nreq);
                        vm.AutoScalingGroups[i].NotificationConfigurations = new List<NotificationConfiguration>();
                        foreach (NotificationConfiguration nc in nresp.DescribeNotificationConfigurationsResult.NotificationConfigurations)
                        {
                            vm.AutoScalingGroups[i].NotificationConfigurations.Add(nc);
                        }
                    }
                }));
            }
            catch (Exception ex)
            {
                LogManager.LogEntry(ex.Message);
                LogManager.LogEntry(ex.StackTrace);
                throw new DataLoadingException("Error occurred loading auto scaling groups for region and environment type");
            }
        }