internal DescribeScheduledActionsResponse DescribeScheduledActions(DescribeScheduledActionsRequest request) { var marshaller = new DescribeScheduledActionsRequestMarshaller(); var unmarshaller = DescribeScheduledActionsResponseUnmarshaller.Instance; return Invoke<DescribeScheduledActionsRequest,DescribeScheduledActionsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeScheduledActions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScheduledActions 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<DescribeScheduledActionsResponse> DescribeScheduledActionsAsync(DescribeScheduledActionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeScheduledActionsRequestMarshaller(); var unmarshaller = DescribeScheduledActionsResponseUnmarshaller.Instance; return InvokeAsync<DescribeScheduledActionsRequest,DescribeScheduledActionsResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeScheduledActions operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DescribeScheduledActions"/> /// </summary> /// /// <param name="describeScheduledActionsRequest">Container for the necessary parameters to execute the DescribeScheduledActions operation on /// AmazonAutoScaling.</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 /// EndDescribeScheduledActions operation.</returns> public IAsyncResult BeginDescribeScheduledActions(DescribeScheduledActionsRequest describeScheduledActionsRequest, AsyncCallback callback, object state) { return invokeDescribeScheduledActions(describeScheduledActionsRequest, callback, state, false); }
IAsyncResult invokeDescribeScheduledActions(DescribeScheduledActionsRequest describeScheduledActionsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeScheduledActionsRequestMarshaller().Marshall(describeScheduledActionsRequest); var unmarshaller = DescribeScheduledActionsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DescribeScheduledActions operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DescribeScheduledActions"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScheduledActions 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<DescribeScheduledActionsResponse> DescribeScheduledActionsAsync(DescribeScheduledActionsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeScheduledActionsRequestMarshaller(); var unmarshaller = DescribeScheduledActionsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeScheduledActionsRequest, DescribeScheduledActionsResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para> Lists all the actions scheduled for your Auto Scaling group that haven't been executed. To see a list of actions already executed, /// see the activity record returned in DescribeScalingActivities. </para> /// </summary> /// /// <param name="describeScheduledActionsRequest">Container for the necessary parameters to execute the DescribeScheduledActions service method /// on AmazonAutoScaling.</param> /// /// <returns>The response from the DescribeScheduledActions service method, as returned by AmazonAutoScaling.</returns> /// /// <exception cref="InvalidNextTokenException"/> public DescribeScheduledActionsResponse DescribeScheduledActions(DescribeScheduledActionsRequest describeScheduledActionsRequest) { IAsyncResult asyncResult = invokeDescribeScheduledActions(describeScheduledActionsRequest, null, null, true); return EndDescribeScheduledActions(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the DescribeScheduledActions operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScheduledActions operation on AmazonAutoScalingClient.</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 EndDescribeScheduledActions /// operation.</returns> public IAsyncResult BeginDescribeScheduledActions(DescribeScheduledActionsRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeScheduledActionsRequestMarshaller(); var unmarshaller = DescribeScheduledActionsResponseUnmarshaller.Instance; return BeginInvoke<DescribeScheduledActionsRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para> Lists all the actions scheduled for your Auto Scaling group that haven't been executed. To see a list of actions already executed, /// see the activity record returned in DescribeScalingActivities. </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScheduledActions service method /// on AmazonAutoScaling.</param> /// /// <returns>The response from the DescribeScheduledActions service method, as returned by AmazonAutoScaling.</returns> /// /// <exception cref="T:Amazon.AutoScaling.Model.InvalidNextTokenException" /> public DescribeScheduledActionsResponse DescribeScheduledActions(DescribeScheduledActionsRequest request) { var task = DescribeScheduledActionsAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
private Amazon.AutoScaling.Model.DescribeScheduledActionsResponse CallAWSServiceOperation(IAmazonAutoScaling client, Amazon.AutoScaling.Model.DescribeScheduledActionsRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Auto Scaling", "DescribeScheduledActions"); try { #if DESKTOP return(client.DescribeScheduledActions(request)); #elif CORECLR return(client.DescribeScheduledActionsAsync(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> /// Paginator for DescribeScheduledActions operation ///</summary> public IDescribeScheduledActionsPaginator DescribeScheduledActions(DescribeScheduledActionsRequest request) { return(new DescribeScheduledActionsPaginator(this.client, request)); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; var useParameterSelect = this.Select.StartsWith("^") || this.PassThru.IsPresent; // create request and set iteration invariants var request = new Amazon.AutoScaling.Model.DescribeScheduledActionsRequest(); if (cmdletContext.AutoScalingGroupName != null) { request.AutoScalingGroupName = cmdletContext.AutoScalingGroupName; } if (cmdletContext.UtcEndTime != null) { request.EndTimeUtc = cmdletContext.UtcEndTime.Value; } if (cmdletContext.ScheduledActionName != null) { request.ScheduledActionNames = cmdletContext.ScheduledActionName; } if (cmdletContext.UtcStartTime != null) { request.StartTimeUtc = cmdletContext.UtcStartTime.Value; } #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute if (cmdletContext.EndTime != null) { if (cmdletContext.UtcEndTime != null) { throw new System.ArgumentException("Parameters EndTime and UtcEndTime are mutually exclusive.", nameof(this.EndTime)); } request.EndTime = cmdletContext.EndTime.Value; } #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute if (cmdletContext.StartTime != null) { if (cmdletContext.UtcStartTime != null) { throw new System.ArgumentException("Parameters StartTime and UtcStartTime are mutually exclusive.", nameof(this.StartTime)); } request.StartTime = cmdletContext.StartTime.Value; } #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute // Initialize loop variants and commence piping System.String _nextToken = null; int? _emitLimit = null; int _retrievedSoFar = 0; if (AutoIterationHelpers.HasValue(cmdletContext.NextToken)) { _nextToken = cmdletContext.NextToken; } if (cmdletContext.MaxRecord.HasValue) { _emitLimit = cmdletContext.MaxRecord; } var _userControllingPaging = this.NoAutoIteration.IsPresent || ParameterWasBound(nameof(this.NextToken)); var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); do { request.NextToken = _nextToken; if (_emitLimit.HasValue) { request.MaxRecords = AutoIterationHelpers.ConvertEmitLimitToInt32(_emitLimit.Value); } 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 }; int _receivedThisCall = response.ScheduledUpdateGroupActions.Count; _nextToken = response.NextToken; _retrievedSoFar += _receivedThisCall; if (_emitLimit.HasValue) { _emitLimit -= _receivedThisCall; } } catch (Exception e) { if (_retrievedSoFar == 0 || !_emitLimit.HasValue) { output = new CmdletOutput { ErrorResponse = e }; } else { break; } } ProcessOutput(output); } while (!_userControllingPaging && AutoIterationHelpers.HasValue(_nextToken) && (!_emitLimit.HasValue || _emitLimit.Value >= 1)); if (useParameterSelect) { WriteObject(cmdletContext.Select(null, this)); } return(null); }
internal DescribeScheduledActionsPaginator(IAmazonAutoScaling client, DescribeScheduledActionsRequest request) { this._client = client; this._request = request; }
/// <summary> /// <para> Lists all the actions scheduled for your Auto Scaling group that haven't been executed. To see a list of actions already executed, /// see the activity record returned in DescribeScalingActivities. </para> /// </summary> /// /// <param name="describeScheduledActionsRequest">Container for the necessary parameters to execute the DescribeScheduledActions service method /// on AmazonAutoScaling.</param> /// /// <returns>The response from the DescribeScheduledActions service method, as returned by AmazonAutoScaling.</returns> /// /// <exception cref="InvalidNextTokenException"/> public DescribeScheduledActionsResponse DescribeScheduledActions(DescribeScheduledActionsRequest describeScheduledActionsRequest) { IRequest<DescribeScheduledActionsRequest> request = new DescribeScheduledActionsRequestMarshaller().Marshall(describeScheduledActionsRequest); DescribeScheduledActionsResponse response = Invoke<DescribeScheduledActionsRequest, DescribeScheduledActionsResponse> (request, this.signer, DescribeScheduledActionsResponseUnmarshaller.GetInstance()); return response; }
internal DescribeScheduledActionsResponse DescribeScheduledActions(DescribeScheduledActionsRequest request) { var task = DescribeScheduledActionsAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the DescribeScheduledActions operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DescribeScheduledActions"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScheduledActions 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<DescribeScheduledActionsResponse> DescribeScheduledActionsAsync(DescribeScheduledActionsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeScheduledActionsRequestMarshaller(); var unmarshaller = DescribeScheduledActionsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeScheduledActionsRequest, DescribeScheduledActionsResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }