Exemple #1
0
        /// <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));
        }
Exemple #2
0
 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 override PutMetricAlarmResponse GetResponse(UnmarshallerContext unmarshallerContext)
 {
     return(PutMetricAlarmResponseUnmarshaller.Unmarshall(unmarshallerContext));
 }
Exemple #4
0
        /// <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);
        }