public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; var useParameterSelect = this.Select.StartsWith("^"); // create request and set iteration invariants var request = new Amazon.CloudFormation.Model.ListExportsRequest(); // 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); }
/// <summary> /// Paginator for ListExports operation ///</summary> public IListExportsPaginator ListExports(ListExportsRequest request) { return(new ListExportsPaginator(this.client, request)); }
internal ListExportsPaginator(IAmazonCloudFormation client, ListExportsRequest request) { this._client = client; this._request = request; }
private Amazon.CloudFormation.Model.ListExportsResponse CallAWSServiceOperation(IAmazonCloudFormation client, Amazon.CloudFormation.Model.ListExportsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS CloudFormation", "ListExports"); try { #if DESKTOP return(client.ListExports(request)); #elif CORECLR return(client.ListExportsAsync(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; } }
/// <summary> /// Initiates the asynchronous execution of the ListExports operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListExports 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<ListExportsResponse> ListExportsAsync(ListExportsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListExportsRequestMarshaller(); var unmarshaller = ListExportsResponseUnmarshaller.Instance; return InvokeAsync<ListExportsRequest,ListExportsResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Lists all exported output values in the account and region in which you call this /// action. Use this action to see the exported output values that you can import into /// other stacks. To import values, use the <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html"> /// <code>Fn::ImportValue</code> </a> function. /// /// /// <para> /// For more information, see <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-exports.html"> /// AWS CloudFormation Export Stack Output Values</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListExports service method.</param> /// /// <returns>The response from the ListExports service method, as returned by CloudFormation.</returns> public ListExportsResponse ListExports(ListExportsRequest request) { var marshaller = new ListExportsRequestMarshaller(); var unmarshaller = ListExportsResponseUnmarshaller.Instance; return Invoke<ListExportsRequest,ListExportsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the ListExports operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListExports 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 EndListExports /// operation.</returns> public IAsyncResult BeginListExports(ListExportsRequest request, AsyncCallback callback, object state) { var marshaller = new ListExportsRequestMarshaller(); var unmarshaller = ListExportsResponseUnmarshaller.Instance; return BeginInvoke<ListExportsRequest>(request, marshaller, unmarshaller, callback, state); }