/// <summary> /// <para> Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate /// one or more Amazon Simple Notification Service resources with the alarm. </para> <para> When this operation creates an alarm, the alarm /// state is immediately set to <c>INSUFFICIENT_DATA</c> . The alarm is evaluated and its <c>StateValue</c> is set appropriately. Any actions /// associated with the <c>StateValue</c> is then executed. </para> <para><b>NOTE:</b> When updating an existing alarm, its StateValue is left /// unchanged. </para> /// </summary> /// /// <param name="putMetricAlarmRequest">Container for the necessary parameters to execute the PutMetricAlarm service method on /// AmazonCloudWatch.</param> /// /// <exception cref="T:Amazon.CloudWatch.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task <PutMetricAlarmResponse> PutMetricAlarmAsync(PutMetricAlarmRequest putMetricAlarmRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, PutMetricAlarmRequest, PutMetricAlarmResponse>(putMetricAlarmRequest, marshaller, unmarshaller, signer, cancellationToken)); }
/// <summary> /// Creates or updates an alarm and associates it with the specified Amazon CloudWatch /// metric. Optionally, this operation can associate one or more Amazon Simple Notification /// Service resources with the alarm. /// /// /// <para> /// When this operation creates an alarm, the alarm state is immediately set to <code>INSUFFICIENT_DATA</code>. /// The alarm is evaluated and its <code>StateValue</code> is set appropriately. Any actions /// associated with the <code>StateValue</code> is then executed. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutMetricAlarm service method.</param> /// /// <returns>The response from the PutMetricAlarm service method, as returned by CloudWatch.</returns> /// <exception cref="Amazon.CloudWatch.Model.LimitExceededException"> /// The quota for alarms for this customer has already been reached. /// </exception> public PutMetricAlarmResponse PutMetricAlarm(PutMetricAlarmRequest request) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.Instance; return(Invoke <PutMetricAlarmRequest, PutMetricAlarmResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// <para> Creates or updates an alarm and associates it with the /// specified Amazon CloudWatch metric. Optionally, this operation can /// associate one or more Amazon Simple Notification Service resources /// with the alarm. </para> <para> When this operation creates an alarm, /// the alarm state is immediately set to <c>INSUFFICIENT_DATA</c> . The /// alarm is evaluated and its <c>StateValue</c> is set appropriately. /// Any actions associated with the <c>StateValue</c> is then executed. /// </para> <para><b>NOTE:</b> When updating an existing alarm, its /// StateValue is left unchanged. </para> /// </summary> /// /// <param name="putMetricAlarmRequest">Container for the necessary /// parameters to execute the PutMetricAlarm service method on /// AmazonCloudWatch.</param> /// /// <exception cref="LimitExceededException"/> public PutMetricAlarmResponse PutMetricAlarm(PutMetricAlarmRequest putMetricAlarmRequest) { IRequest <PutMetricAlarmRequest> request = new PutMetricAlarmRequestMarshaller().Marshall(putMetricAlarmRequest); PutMetricAlarmResponse response = Invoke <PutMetricAlarmRequest, PutMetricAlarmResponse> (request, this.signer, PutMetricAlarmResponseUnmarshaller.GetInstance()); return(response); }
/// <summary> /// Initiates the asynchronous execution of the PutMetricAlarm operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutMetricAlarm 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 <PutMetricAlarmResponse> PutMetricAlarmAsync(PutMetricAlarmRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.Instance; return(InvokeAsync <PutMetricAlarmRequest, PutMetricAlarmResponse>(request, marshaller, unmarshaller, cancellationToken)); }
IAsyncResult invokePutMetricAlarm(PutMetricAlarmRequest putMetricAlarmRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new PutMetricAlarmRequestMarshaller().Marshall(putMetricAlarmRequest); var unmarshaller = PutMetricAlarmResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
public void PutMetricAlarmMarshallTest() { var operation = service_model.FindOperation("PutMetricAlarm"); var request = InstantiateClassGenerator.Execute <PutMetricAlarmRequest>(); var marshaller = new PutMetricAlarmRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// <para> Creates or updates an alarm and associates it with the /// specified Amazon CloudWatch metric. Optionally, this operation can /// associate one or more Amazon Simple Notification Service resources /// with the alarm. </para> <para> When this operation creates an alarm, /// the alarm state is immediately set to <c>INSUFFICIENT_DATA</c> . The /// alarm is evaluated and its <c>StateValue</c> is set appropriately. /// Any actions associated with the <c>StateValue</c> is then executed. /// </para> <para><b>NOTE:</b> When updating an existing alarm, its /// StateValue is left unchanged. </para> /// </summary> /// /// <param name="putMetricAlarmRequest">Container for the necessary /// parameters to execute the PutMetricAlarm service method on /// AmazonCloudWatch.</param> /// /// <exception cref="LimitExceededException"/> public PutMetricAlarmResponse PutMetricAlarm(PutMetricAlarmRequest putMetricAlarmRequest) { IRequest<PutMetricAlarmRequest> request = new PutMetricAlarmRequestMarshaller().Marshall(putMetricAlarmRequest); PutMetricAlarmResponse response = Invoke<PutMetricAlarmRequest, PutMetricAlarmResponse> (request, this.signer, PutMetricAlarmResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the PutMetricAlarm operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutMetricAlarm operation on AmazonCloudWatchClient.</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 EndPutMetricAlarm /// operation.</returns> public IAsyncResult BeginPutMetricAlarm(PutMetricAlarmRequest request, AsyncCallback callback, object state) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.Instance; return BeginInvoke<PutMetricAlarmRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Creates or updates an alarm and associates it with the specified Amazon CloudWatch /// metric. Optionally, this operation can associate one or more Amazon Simple Notification /// Service resources with the alarm. /// /// /// <para> /// When this operation creates an alarm, the alarm state is immediately set to <code>INSUFFICIENT_DATA</code>. /// The alarm is evaluated and its <code>StateValue</code> is set appropriately. Any actions /// associated with the <code>StateValue</code> is then executed. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the PutMetricAlarm service method.</param> /// /// <returns>The response from the PutMetricAlarm service method, as returned by CloudWatch.</returns> /// <exception cref="Amazon.CloudWatch.Model.LimitExceededException"> /// The quota for alarms for this customer has already been reached. /// </exception> public PutMetricAlarmResponse PutMetricAlarm(PutMetricAlarmRequest request) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.Instance; return Invoke<PutMetricAlarmRequest,PutMetricAlarmResponse>(request, marshaller, unmarshaller); }
/// <summary> /// <para> Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate /// one or more Amazon Simple Notification Service resources with the alarm. </para> <para> When this operation creates an alarm, the alarm /// state is immediately set to <c>INSUFFICIENT_DATA</c> . The alarm is evaluated and its <c>StateValue</c> is set appropriately. Any actions /// associated with the <c>StateValue</c> is then executed. </para> <para><b>NOTE:</b> When updating an existing alarm, its StateValue is left /// unchanged. </para> /// </summary> /// /// <param name="putMetricAlarmRequest">Container for the necessary parameters to execute the PutMetricAlarm service method on /// AmazonCloudWatch.</param> /// /// <exception cref="T:Amazon.CloudWatch.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<PutMetricAlarmResponse> PutMetricAlarmAsync(PutMetricAlarmRequest putMetricAlarmRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.GetInstance(); return Invoke<IRequest, PutMetricAlarmRequest, PutMetricAlarmResponse>(putMetricAlarmRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para> Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate /// one or more Amazon Simple Notification Service resources with the alarm. </para> <para> When this operation creates an alarm, the alarm /// state is immediately set to <c>INSUFFICIENT_DATA</c> . The alarm is evaluated and its <c>StateValue</c> is set appropriately. Any actions /// associated with the <c>StateValue</c> is then executed. </para> <para><b>NOTE:</b> When updating an existing alarm, its StateValue is left /// unchanged. </para> /// </summary> /// /// <param name="putMetricAlarmRequest">Container for the necessary parameters to execute the PutMetricAlarm service method on /// AmazonCloudWatch.</param> /// /// <exception cref="T:Amazon.CloudWatch.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<PutMetricAlarmResponse> PutMetricAlarmAsync(PutMetricAlarmRequest putMetricAlarmRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, PutMetricAlarmRequest, PutMetricAlarmResponse>(putMetricAlarmRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
public void PutMetricAlarmMarshallTest() { var operation = service_model.FindOperation("PutMetricAlarm"); var request = InstantiateClassGenerator.Execute<PutMetricAlarmRequest>(); var marshaller = new PutMetricAlarmRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
} #endregion #region DeleteAlarms
/// <summary> /// Initiates the asynchronous execution of the PutMetricAlarm operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutMetricAlarm 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<PutMetricAlarmResponse> PutMetricAlarmAsync(PutMetricAlarmRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutMetricAlarmRequestMarshaller(); var unmarshaller = PutMetricAlarmResponseUnmarshaller.Instance; return InvokeAsync<PutMetricAlarmRequest,PutMetricAlarmResponse>(request, marshaller, unmarshaller, cancellationToken); }