public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.AutoScaling.Model.DeleteScheduledActionRequest(); if (cmdletContext.AutoScalingGroupName != null) { request.AutoScalingGroupName = cmdletContext.AutoScalingGroupName; } if (cmdletContext.ScheduledActionName != null) { request.ScheduledActionName = cmdletContext.ScheduledActionName; } 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> /// Initiates the asynchronous execution of the DeleteScheduledAction operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteScheduledAction 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<DeleteScheduledActionResponse> DeleteScheduledActionAsync(DeleteScheduledActionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteScheduledActionRequestMarshaller(); var unmarshaller = DeleteScheduledActionResponseUnmarshaller.Instance; return InvokeAsync<DeleteScheduledActionRequest,DeleteScheduledActionResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal DeleteScheduledActionResponse DeleteScheduledAction(DeleteScheduledActionRequest request) { var marshaller = new DeleteScheduledActionRequestMarshaller(); var unmarshaller = DeleteScheduledActionResponseUnmarshaller.Instance; return Invoke<DeleteScheduledActionRequest,DeleteScheduledActionResponse>(request, marshaller, unmarshaller); }
IAsyncResult invokeDeleteScheduledAction(DeleteScheduledActionRequest deleteScheduledActionRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteScheduledActionRequestMarshaller().Marshall(deleteScheduledActionRequest); var unmarshaller = DeleteScheduledActionResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DeleteScheduledAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DeleteScheduledAction"/> /// </summary> /// /// <param name="deleteScheduledActionRequest">Container for the necessary parameters to execute the DeleteScheduledAction 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 BeginDeleteScheduledAction(DeleteScheduledActionRequest deleteScheduledActionRequest, AsyncCallback callback, object state) { return invokeDeleteScheduledAction(deleteScheduledActionRequest, callback, state, false); }
/// <summary> /// <para>Deletes a scheduled action previously created using the PutScheduledUpdateGroupAction.</para> /// </summary> /// /// <param name="deleteScheduledActionRequest">Container for the necessary parameters to execute the DeleteScheduledAction service method on /// AmazonAutoScaling.</param> /// public DeleteScheduledActionResponse DeleteScheduledAction(DeleteScheduledActionRequest deleteScheduledActionRequest) { IAsyncResult asyncResult = invokeDeleteScheduledAction(deleteScheduledActionRequest, null, null, true); return EndDeleteScheduledAction(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the DeleteScheduledAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DeleteScheduledAction"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteScheduledAction 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<DeleteScheduledActionResponse> DeleteScheduledActionAsync(DeleteScheduledActionRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteScheduledActionRequestMarshaller(); var unmarshaller = DeleteScheduledActionResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteScheduledActionRequest, DeleteScheduledActionResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Deletes a scheduled action previously created using the PutScheduledUpdateGroupAction.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteScheduledAction service method on /// AmazonAutoScaling.</param> public DeleteScheduledActionResponse DeleteScheduledAction(DeleteScheduledActionRequest request) { var task = DeleteScheduledActionAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the DeleteScheduledAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteScheduledAction 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 EndDeleteScheduledAction /// operation.</returns> public IAsyncResult BeginDeleteScheduledAction(DeleteScheduledActionRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteScheduledActionRequestMarshaller(); var unmarshaller = DeleteScheduledActionResponseUnmarshaller.Instance; return BeginInvoke<DeleteScheduledActionRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para>Deletes a scheduled action previously created using the PutScheduledUpdateGroupAction.</para> /// </summary> /// /// <param name="deleteScheduledActionRequest">Container for the necessary parameters to execute the DeleteScheduledAction service method on /// AmazonAutoScaling.</param> /// public DeleteScheduledActionResponse DeleteScheduledAction(DeleteScheduledActionRequest deleteScheduledActionRequest) { IRequest<DeleteScheduledActionRequest> request = new DeleteScheduledActionRequestMarshaller().Marshall(deleteScheduledActionRequest); DeleteScheduledActionResponse response = Invoke<DeleteScheduledActionRequest, DeleteScheduledActionResponse> (request, this.signer, DeleteScheduledActionResponseUnmarshaller.GetInstance()); return response; }
internal DeleteScheduledActionResponse DeleteScheduledAction(DeleteScheduledActionRequest request) { var task = DeleteScheduledActionAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the DeleteScheduledAction operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.DeleteScheduledAction"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteScheduledAction 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<DeleteScheduledActionResponse> DeleteScheduledActionAsync(DeleteScheduledActionRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteScheduledActionRequestMarshaller(); var unmarshaller = DeleteScheduledActionResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteScheduledActionRequest, DeleteScheduledActionResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
private Amazon.AutoScaling.Model.DeleteScheduledActionResponse CallAWSServiceOperation(IAmazonAutoScaling client, Amazon.AutoScaling.Model.DeleteScheduledActionRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Auto Scaling", "DeleteScheduledAction"); try { #if DESKTOP return(client.DeleteScheduledAction(request)); #elif CORECLR return(client.DeleteScheduledActionAsync(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; } }