Container for the parameters to the ListStackResources operation.

Returns descriptions for all resources of the specified stack.

For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.

Inheritance: Amazon.Runtime.AmazonWebServiceRequest
        /// <summary>
        /// Initiates the asynchronous execution of the ListStackResources operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListStackResources 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<ListStackResourcesResponse> ListStackResourcesAsync(ListStackResourcesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListStackResourcesRequestMarshaller();
            var unmarshaller = ListStackResourcesResponseUnmarshaller.Instance;

            return InvokeAsync<ListStackResourcesRequest,ListStackResourcesResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
Example #2
0
 internal ListStackResourcesPaginator(IAmazonCloudFormation client, ListStackResourcesRequest request)
 {
     this._client  = client;
     this._request = request;
 }
 IAsyncResult invokeListStackResources(ListStackResourcesRequest listStackResourcesRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new ListStackResourcesRequestMarshaller().Marshall(listStackResourcesRequest);
     var unmarshaller = ListStackResourcesResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
        internal ListStackResourcesResponse ListStackResources(ListStackResourcesRequest request)
        {
            var marshaller = new ListStackResourcesRequestMarshaller();
            var unmarshaller = ListStackResourcesResponseUnmarshaller.Instance;

            return Invoke<ListStackResourcesRequest,ListStackResourcesResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// <para>Returns descriptions of all resources of the specified stack.</para> <para>For deleted stacks, ListStackResources returns resource
 /// information for up to 90 days after the stack has been deleted.</para>
 /// </summary>
 /// 
 /// <param name="listStackResourcesRequest">Container for the necessary parameters to execute the ListStackResources service method on
 ///          AmazonCloudFormation.</param>
 /// 
 /// <returns>The response from the ListStackResources service method, as returned by AmazonCloudFormation.</returns>
 /// 
 public ListStackResourcesResponse ListStackResources(ListStackResourcesRequest listStackResourcesRequest)
 {
     IAsyncResult asyncResult = invokeListStackResources(listStackResourcesRequest, null, null, true);
     return EndListStackResources(asyncResult);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the ListStackResources operation.
 /// <seealso cref="Amazon.CloudFormation.IAmazonCloudFormation.ListStackResources"/>
 /// </summary>
 /// 
 /// <param name="listStackResourcesRequest">Container for the necessary parameters to execute the ListStackResources 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
 ///         EndListStackResources operation.</returns>
 public IAsyncResult BeginListStackResources(ListStackResourcesRequest listStackResourcesRequest, AsyncCallback callback, object state)
 {
     return invokeListStackResources(listStackResourcesRequest, callback, state, false);
 }
        /// <summary>
        /// <para>Returns descriptions of all resources of the specified stack.</para> <para>For deleted stacks, ListStackResources returns resource
        /// information for up to 90 days after the stack has been deleted.</para>
        /// </summary>
        /// 
        /// <param name="listStackResourcesRequest">Container for the necessary parameters to execute the ListStackResources service method on
        /// AmazonCloudFormation.</param>
        /// 
        /// <returns>The response from the ListStackResources 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<ListStackResourcesResponse> ListStackResourcesAsync(ListStackResourcesRequest listStackResourcesRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListStackResourcesRequestMarshaller();
            var unmarshaller = ListStackResourcesResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, ListStackResourcesRequest, ListStackResourcesResponse>(listStackResourcesRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListStackResources operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListStackResources 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 EndListStackResources
        ///         operation.</returns>
        public IAsyncResult BeginListStackResources(ListStackResourcesRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ListStackResourcesRequestMarshaller();
            var unmarshaller = ListStackResourcesResponseUnmarshaller.Instance;

            return BeginInvoke<ListStackResourcesRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
Example #9
0
 /// <summary>
 /// Paginator for ListStackResources operation
 ///</summary>
 public IListStackResourcesPaginator ListStackResources(ListStackResourcesRequest request)
 {
     return(new ListStackResourcesPaginator(this.client, request));
 }
		internal ListStackResourcesResponse ListStackResources(ListStackResourcesRequest request)
        {
            var task = ListStackResourcesAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
		internal ListStackResourcesResponse ListStackResources(ListStackResourcesRequest request)
        {
            var task = ListStackResourcesAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
  /// <summary>
  /// <para> Returns descriptions for all resources of the specified stack. </para> <para>For deleted stacks, ListStackResources returns resource
  /// information for up to 90 days after the stack has been deleted. </para>
  /// </summary>
  /// 
  /// <param name="listStackResourcesRequest">Container for the necessary parameters to execute the ListStackResources service method on
  ///           AmazonCloudFormation.</param>
  /// 
  /// <returns>The response from the ListStackResources service method, as returned by AmazonCloudFormation.</returns>
  /// 
 public ListStackResourcesResponse ListStackResources(ListStackResourcesRequest listStackResourcesRequest) 
 {           
     IRequest<ListStackResourcesRequest> request = new ListStackResourcesRequestMarshaller().Marshall(listStackResourcesRequest);
     ListStackResourcesResponse response = Invoke<ListStackResourcesRequest, ListStackResourcesResponse> (request, this.signer, ListStackResourcesResponseUnmarshaller.GetInstance());
     return response;
 }
        /// <summary>
        /// Initiates the asynchronous execution of the ListStackResources operation.
        /// <seealso cref="Amazon.CloudFormation.IAmazonCloudFormation.ListStackResources"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListStackResources 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<ListStackResourcesResponse> ListStackResourcesAsync(ListStackResourcesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListStackResourcesRequestMarshaller();
            var unmarshaller = ListStackResourcesResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, ListStackResourcesRequest, ListStackResourcesResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
 private Amazon.CloudFormation.Model.ListStackResourcesResponse CallAWSServiceOperation(IAmazonCloudFormation client, Amazon.CloudFormation.Model.ListStackResourcesRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS CloudFormation", "ListStackResources");
     try
     {
         #if DESKTOP
         return(client.ListStackResources(request));
         #elif CORECLR
         return(client.ListStackResourcesAsync(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.ListStackResourcesRequest();

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

            // 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);
        }