/// <summary> /// <para> Temporarily sets the state of an alarm. When the updated <c>StateValue</c> differs from the previous value, the action configured for /// the appropriate state is invoked. This is not a permanent change. The next periodic alarm check (in about a minute) will set the alarm to /// its actual state. </para> /// </summary> /// /// <param name="setAlarmStateRequest">Container for the necessary parameters to execute the SetAlarmState service method on /// AmazonCloudWatch.</param> /// /// <exception cref="T:Amazon.CloudWatch.Model.ResourceNotFoundException" /> /// <exception cref="T:Amazon.CloudWatch.Model.InvalidFormatException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task <SetAlarmStateResponse> SetAlarmStateAsync(SetAlarmStateRequest setAlarmStateRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SetAlarmStateRequestMarshaller(); var unmarshaller = SetAlarmStateResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, SetAlarmStateRequest, SetAlarmStateResponse>(setAlarmStateRequest, marshaller, unmarshaller, signer, cancellationToken)); }
IAsyncResult invokeSetAlarmState(SetAlarmStateRequest setAlarmStateRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new SetAlarmStateRequestMarshaller().Marshall(setAlarmStateRequest); var unmarshaller = SetAlarmStateResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para> Temporarily sets the state of an alarm. When the updated /// <c>StateValue</c> differs from the previous value, the action /// configured for the appropriate state is invoked. This is not a /// permanent change. The next periodic alarm check (in about a minute) /// will set the alarm to its actual state. </para> /// </summary> /// /// <param name="setAlarmStateRequest">Container for the necessary /// parameters to execute the SetAlarmState service method on /// AmazonCloudWatch.</param> /// /// <exception cref="ResourceNotFoundException"/> /// <exception cref="InvalidFormatException"/> public SetAlarmStateResponse SetAlarmState(SetAlarmStateRequest setAlarmStateRequest) { IRequest <SetAlarmStateRequest> request = new SetAlarmStateRequestMarshaller().Marshall(setAlarmStateRequest); SetAlarmStateResponse response = Invoke <SetAlarmStateRequest, SetAlarmStateResponse> (request, this.signer, SetAlarmStateResponseUnmarshaller.GetInstance()); return(response); }