internal virtual ListInputSecurityGroupsResponse ListInputSecurityGroups(ListInputSecurityGroupsRequest request)
        {
            var marshaller   = new ListInputSecurityGroupsRequestMarshaller();
            var unmarshaller = ListInputSecurityGroupsResponseUnmarshaller.Instance;

            return(Invoke <ListInputSecurityGroupsRequest, ListInputSecurityGroupsResponse>(request, marshaller, unmarshaller));
        }
Example #2
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonMediaLiveConfig config = new AmazonMediaLiveConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonMediaLiveClient client = new AmazonMediaLiveClient(creds, config);

            ListInputSecurityGroupsResponse resp = new ListInputSecurityGroupsResponse();

            do
            {
                ListInputSecurityGroupsRequest req = new ListInputSecurityGroupsRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.ListInputSecurityGroups(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.InputSecurityGroups)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListInputSecurityGroups operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListInputSecurityGroups operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputSecurityGroups">REST API Reference for ListInputSecurityGroups Operation</seealso>
        public virtual Task <ListInputSecurityGroupsResponse> ListInputSecurityGroupsAsync(ListInputSecurityGroupsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListInputSecurityGroupsRequestMarshaller();
            var unmarshaller = ListInputSecurityGroupsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListInputSecurityGroupsRequest, ListInputSecurityGroupsResponse>(request, marshaller,
                                                                                                 unmarshaller, cancellationToken));
        }