internal PutScheduledUpdateGroupActionResponse PutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest request) { var marshaller = new PutScheduledUpdateGroupActionRequestMarshaller(); var unmarshaller = PutScheduledUpdateGroupActionResponseUnmarshaller.Instance; return Invoke<PutScheduledUpdateGroupActionRequest,PutScheduledUpdateGroupActionResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the PutScheduledUpdateGroupAction operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction 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<PutScheduledUpdateGroupActionResponse> PutScheduledUpdateGroupActionAsync(PutScheduledUpdateGroupActionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutScheduledUpdateGroupActionRequestMarshaller(); var unmarshaller = PutScheduledUpdateGroupActionResponseUnmarshaller.Instance; return InvokeAsync<PutScheduledUpdateGroupActionRequest,PutScheduledUpdateGroupActionResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the PutScheduledUpdateGroupAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.PutScheduledUpdateGroupAction"/> /// </summary> /// /// <param name="putScheduledUpdateGroupActionRequest">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction /// 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> public IAsyncResult BeginPutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest putScheduledUpdateGroupActionRequest, AsyncCallback callback, object state) { return invokePutScheduledUpdateGroupAction(putScheduledUpdateGroupActionRequest, callback, state, false); }
IAsyncResult invokePutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest putScheduledUpdateGroupActionRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new PutScheduledUpdateGroupActionRequestMarshaller().Marshall(putScheduledUpdateGroupActionRequest); var unmarshaller = PutScheduledUpdateGroupActionResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
private Amazon.AutoScaling.Model.PutScheduledUpdateGroupActionResponse CallAWSServiceOperation(IAmazonAutoScaling client, Amazon.AutoScaling.Model.PutScheduledUpdateGroupActionRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Auto Scaling", "PutScheduledUpdateGroupAction"); try { #if DESKTOP return(client.PutScheduledUpdateGroupAction(request)); #elif CORECLR return(client.PutScheduledUpdateGroupActionAsync(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> /// <para> Creates or updates a scheduled scaling action for an Auto Scaling group. When updating a scheduled scaling action, if you leave a /// parameter unspecified, the corresponding value remains unchanged in the affected Auto Scaling group. </para> <para>For information on /// creating or updating a scheduled action for your Auto Scaling group, see <a /// href="http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html" >Scale Based on a Schedule</a> .</para> /// <para><b>NOTE:</b> Auto Scaling supports the date and time expressed in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only. </para> /// </summary> /// /// <param name="putScheduledUpdateGroupActionRequest">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction /// service method on AmazonAutoScaling.</param> /// /// <exception cref="LimitExceededException"/> /// <exception cref="AlreadyExistsException"/> public PutScheduledUpdateGroupActionResponse PutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest putScheduledUpdateGroupActionRequest) { IAsyncResult asyncResult = invokePutScheduledUpdateGroupAction(putScheduledUpdateGroupActionRequest, null, null, true); return EndPutScheduledUpdateGroupAction(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the PutScheduledUpdateGroupAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.PutScheduledUpdateGroupAction"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction 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<PutScheduledUpdateGroupActionResponse> PutScheduledUpdateGroupActionAsync(PutScheduledUpdateGroupActionRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutScheduledUpdateGroupActionRequestMarshaller(); var unmarshaller = PutScheduledUpdateGroupActionResponseUnmarshaller.GetInstance(); return Invoke<IRequest, PutScheduledUpdateGroupActionRequest, PutScheduledUpdateGroupActionResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.AutoScaling.Model.PutScheduledUpdateGroupActionRequest(); if (cmdletContext.AutoScalingGroupName != null) { request.AutoScalingGroupName = cmdletContext.AutoScalingGroupName; } if (cmdletContext.DesiredCapacity != null) { request.DesiredCapacity = cmdletContext.DesiredCapacity.Value; } if (cmdletContext.UtcEndTime != null) { request.EndTimeUtc = cmdletContext.UtcEndTime.Value; } if (cmdletContext.MaxSize != null) { request.MaxSize = cmdletContext.MaxSize.Value; } if (cmdletContext.MinSize != null) { request.MinSize = cmdletContext.MinSize.Value; } if (cmdletContext.Recurrence != null) { request.Recurrence = cmdletContext.Recurrence; } if (cmdletContext.ScheduledActionName != null) { request.ScheduledActionName = cmdletContext.ScheduledActionName; } if (cmdletContext.UtcStartTime != null) { request.StartTimeUtc = cmdletContext.UtcStartTime.Value; } if (cmdletContext.UtcTime != null) { request.TimeUtc = cmdletContext.UtcTime.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 #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute if (cmdletContext.Time != null) { if (cmdletContext.UtcTime != null) { throw new System.ArgumentException("Parameters Time and UtcTime are mutually exclusive.", nameof(this.Time)); } request.Time = cmdletContext.Time.Value; } #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
/// <summary> /// <para> Creates or updates a scheduled scaling action for an Auto Scaling group. When updating a scheduled scaling action, if you leave a /// parameter unspecified, the corresponding value remains unchanged in the affected Auto Scaling group. </para> <para>For information on /// creating or updating a scheduled action for your Auto Scaling group, see <a href="http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html">Scale Based on a Schedule</a> .</para> /// <para><b>NOTE:</b> Auto Scaling supports the date and time expressed in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only. </para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction /// service method on AmazonAutoScaling.</param> /// /// <exception cref="T:Amazon.AutoScaling.Model.LimitExceededException" /> /// <exception cref="T:Amazon.AutoScaling.Model.AlreadyExistsException" /> public PutScheduledUpdateGroupActionResponse PutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest request) { var task = PutScheduledUpdateGroupActionAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the PutScheduledUpdateGroupAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction 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 EndPutScheduledUpdateGroupAction /// operation.</returns> public IAsyncResult BeginPutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest request, AsyncCallback callback, object state) { var marshaller = new PutScheduledUpdateGroupActionRequestMarshaller(); var unmarshaller = PutScheduledUpdateGroupActionResponseUnmarshaller.Instance; return BeginInvoke<PutScheduledUpdateGroupActionRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para> Creates a scheduled scaling action for an Auto Scaling group. If you leave a parameter unspecified, the corresponding value remains /// unchanged in the affected Auto Scaling group. </para> /// </summary> /// /// <param name="putScheduledUpdateGroupActionRequest">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction /// service method on AmazonAutoScaling.</param> /// /// <exception cref="LimitExceededException"/> /// <exception cref="AlreadyExistsException"/> public PutScheduledUpdateGroupActionResponse PutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest putScheduledUpdateGroupActionRequest) { IRequest<PutScheduledUpdateGroupActionRequest> request = new PutScheduledUpdateGroupActionRequestMarshaller().Marshall(putScheduledUpdateGroupActionRequest); PutScheduledUpdateGroupActionResponse response = Invoke<PutScheduledUpdateGroupActionRequest, PutScheduledUpdateGroupActionResponse> (request, this.signer, PutScheduledUpdateGroupActionResponseUnmarshaller.GetInstance()); return response; }
internal PutScheduledUpdateGroupActionResponse PutScheduledUpdateGroupAction(PutScheduledUpdateGroupActionRequest request) { var task = PutScheduledUpdateGroupActionAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the PutScheduledUpdateGroupAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.PutScheduledUpdateGroupAction"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutScheduledUpdateGroupAction 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<PutScheduledUpdateGroupActionResponse> PutScheduledUpdateGroupActionAsync(PutScheduledUpdateGroupActionRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutScheduledUpdateGroupActionRequestMarshaller(); var unmarshaller = PutScheduledUpdateGroupActionResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, PutScheduledUpdateGroupActionRequest, PutScheduledUpdateGroupActionResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }