Container for the parameters to the ListStacks operation.

Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have been deleted).

Inheritance: AmazonCloudFormationRequest
        internal ListStacksResponse ListStacks(ListStacksRequest request)
        {
            var marshaller = new ListStacksRequestMarshaller();
            var unmarshaller = ListStacksResponseUnmarshaller.Instance;

            return Invoke<ListStacksRequest,ListStacksResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListStacks operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListStacks 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>
        public Task<ListStacksResponse> ListStacksAsync(ListStacksRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListStacksRequestMarshaller();
            var unmarshaller = ListStacksResponseUnmarshaller.Instance;

            return InvokeAsync<ListStacksRequest,ListStacksResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the ListStacks operation.
 /// <seealso cref="Amazon.CloudFormation.IAmazonCloudFormation.ListStacks"/>
 /// </summary>
 /// 
 /// <param name="listStacksRequest">Container for the necessary parameters to execute the ListStacks operation on AmazonCloudFormation.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// 
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListStacks
 ///         operation.</returns>
 public IAsyncResult BeginListStacks(ListStacksRequest listStacksRequest, AsyncCallback callback, object state)
 {
     return invokeListStacks(listStacksRequest, callback, state, false);
 }
Example #4
0
 internal ListStacksPaginator(IAmazonCloudFormation client, ListStacksRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 IAsyncResult invokeListStacks(ListStacksRequest listStacksRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new ListStacksRequestMarshaller().Marshall(listStacksRequest);
     var unmarshaller = ListStacksResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 /// <summary>
 /// <para>Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that
 /// have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks
 /// is returned (including existing stacks and stacks that have been deleted).</para>
 /// </summary>
 /// 
 /// <param name="listStacksRequest">Container for the necessary parameters to execute the ListStacks service method on
 ///          AmazonCloudFormation.</param>
 /// 
 /// <returns>The response from the ListStacks service method, as returned by AmazonCloudFormation.</returns>
 /// 
 public ListStacksResponse ListStacks(ListStacksRequest listStacksRequest)
 {
     IAsyncResult asyncResult = invokeListStacks(listStacksRequest, null, null, true);
     return EndListStacks(asyncResult);
 }
        /// <summary>
        /// <para>Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that
        /// have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks
        /// is returned (including existing stacks and stacks that have been deleted).</para>
        /// </summary>
        /// 
        /// <param name="listStacksRequest">Container for the necessary parameters to execute the ListStacks service method on
        /// AmazonCloudFormation.</param>
        /// 
        /// <returns>The response from the ListStacks service method, as returned by AmazonCloudFormation.</returns>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<ListStacksResponse> ListStacksAsync(ListStacksRequest listStacksRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListStacksRequestMarshaller();
            var unmarshaller = ListStacksResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, ListStacksRequest, ListStacksResponse>(listStacksRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListStacks operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListStacks operation on AmazonCloudFormationClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListStacks
        ///         operation.</returns>
        public IAsyncResult BeginListStacks(ListStacksRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ListStacksRequestMarshaller();
            var unmarshaller = ListStacksResponseUnmarshaller.Instance;

            return BeginInvoke<ListStacksRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
Example #9
0
 /// <summary>
 /// Paginator for ListStacks operation
 ///</summary>
 public IListStacksPaginator ListStacks(ListStacksRequest request)
 {
     return(new ListStacksPaginator(this.client, request));
 }
		internal ListStacksResponse ListStacks(ListStacksRequest request)
        {
            var task = ListStacksAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
		internal ListStacksResponse ListStacks(ListStacksRequest request)
        {
            var task = ListStacksAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
  /// <summary>
  /// <para> Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that
  /// have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks
  /// is returned (including existing stacks and stacks that have been deleted). </para>
  /// </summary>
  /// 
  /// <param name="listStacksRequest">Container for the necessary parameters to execute the ListStacks service method on
  ///           AmazonCloudFormation.</param>
  /// 
  /// <returns>The response from the ListStacks service method, as returned by AmazonCloudFormation.</returns>
  /// 
 public ListStacksResponse ListStacks(ListStacksRequest listStacksRequest) 
 {           
     IRequest<ListStacksRequest> request = new ListStacksRequestMarshaller().Marshall(listStacksRequest);
     ListStacksResponse response = Invoke<ListStacksRequest, ListStacksResponse> (request, this.signer, ListStacksResponseUnmarshaller.GetInstance());
     return response;
 }
        /// <summary>
        /// Initiates the asynchronous execution of the ListStacks operation.
        /// <seealso cref="Amazon.CloudFormation.IAmazonCloudFormation.ListStacks"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListStacks 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>
		public async Task<ListStacksResponse> ListStacksAsync(ListStacksRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListStacksRequestMarshaller();
            var unmarshaller = ListStacksResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, ListStacksRequest, ListStacksResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
 private Amazon.CloudFormation.Model.ListStacksResponse CallAWSServiceOperation(IAmazonCloudFormation client, Amazon.CloudFormation.Model.ListStacksRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS CloudFormation", "ListStacks");
     try
     {
         #if DESKTOP
         return(client.ListStacks(request));
         #elif CORECLR
         return(client.ListStacksAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;

            #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute
            var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent;
            #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute

            // create request and set iteration invariants
            var request = new Amazon.CloudFormation.Model.ListStacksRequest();

            if (cmdletContext.StackStatusFilter != null)
            {
                request.StackStatusFilter = cmdletContext.StackStatusFilter;
            }

            // Initialize loop variant and commence piping
            var _nextToken             = cmdletContext.NextToken;
            var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken));

            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);
            do
            {
                request.NextToken = _nextToken;

                CmdletOutput output;

                try
                {
                    var response = CallAWSServiceOperation(client, request);

                    object pipelineOutput = null;
                    if (!useParameterSelect)
                    {
                        pipelineOutput = cmdletContext.Select(response, this);
                    }
                    output = new CmdletOutput
                    {
                        PipelineOutput  = pipelineOutput,
                        ServiceResponse = response
                    };

                    _nextToken = response.NextToken;
                }
                catch (Exception e)
                {
                    output = new CmdletOutput {
                        ErrorResponse = e
                    };
                }

                ProcessOutput(output);
            } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken));

            if (useParameterSelect)
            {
                WriteObject(cmdletContext.Select(null, this));
            }


            return(null);
        }