/// <summary> /// Returns a list of valid metrics stored for the AWS account owner. Returned metrics /// can be used with <a>GetMetricStatistics</a> to obtain statistical data for a given /// metric. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListMetrics service method.</param> /// /// <returns>The response from the ListMetrics service method, as returned by CloudWatch.</returns> /// <exception cref="Amazon.CloudWatch.Model.InternalServiceException"> /// Indicates that the request processing has failed due to some unknown error, exception, /// or failure. /// </exception> /// <exception cref="Amazon.CloudWatch.Model.InvalidParameterValueException"> /// Bad or out-of-range value was supplied for the input parameter. /// </exception> public ListMetricsResponse ListMetrics(ListMetricsRequest request) { var marshaller = new ListMetricsRequestMarshaller(); var unmarshaller = ListMetricsResponseUnmarshaller.Instance; return(Invoke <ListMetricsRequest, ListMetricsResponse>(request, marshaller, unmarshaller)); }
internal virtual ListMetricsResponse ListMetrics(ListMetricsRequest request) { var marshaller = ListMetricsRequestMarshaller.Instance; var unmarshaller = ListMetricsResponseUnmarshaller.Instance; return(Invoke <ListMetricsRequest, ListMetricsResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// <para> Returns a list of valid metrics stored for the AWS account owner. Returned metrics can be used with GetMetricStatistics to obtain /// statistical data for a given metric. </para> <para><b>NOTE:</b> Up to 500 results are returned for any one call. To retrieve further /// results, use returned NextToken values with subsequent ListMetrics operations. </para> <para><b>NOTE:</b> If you create a metric with the /// PutMetricData action, allow up to fifteen minutes for the metric to appear in calls to the ListMetrics action. Statistics about the metric, /// however, are available sooner using GetMetricStatistics. </para> /// </summary> /// /// <param name="listMetricsRequest">Container for the necessary parameters to execute the ListMetrics service method on /// AmazonCloudWatch.</param> /// /// <returns>The response from the ListMetrics service method, as returned by AmazonCloudWatch.</returns> /// /// <exception cref="T:Amazon.CloudWatch.Model.InternalServiceException" /> /// <exception cref="T:Amazon.CloudWatch.Model.InvalidParameterValueException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task <ListMetricsResponse> ListMetricsAsync(ListMetricsRequest listMetricsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListMetricsRequestMarshaller(); var unmarshaller = ListMetricsResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, ListMetricsRequest, ListMetricsResponse>(listMetricsRequest, marshaller, unmarshaller, signer, cancellationToken)); }
/// <summary> /// <para> Returns a list of valid metrics stored for the AWS account /// owner. Returned metrics can be used with <c>GetMetricStatistics</c> to /// obtain statistical data for a given metric. </para> <para><b>NOTE:</b> /// Up to 500 results are returned for any one call. To retrieve further /// results, use returned NextToken values with subsequent ListMetrics /// operations. </para> <para><b>NOTE:</b> If you create a metric with the /// PutMetricData action, allow up to fifteen minutes for the metric to /// appear in calls to the ListMetrics action. </para> /// </summary> /// /// <param name="listMetricsRequest">Container for the necessary /// parameters to execute the ListMetrics service method on /// AmazonCloudWatch.</param> /// /// <returns>The response from the ListMetrics service method, as returned /// by AmazonCloudWatch.</returns> /// /// <exception cref="InternalServiceException"/> /// <exception cref="InvalidParameterValueException"/> public ListMetricsResponse ListMetrics(ListMetricsRequest listMetricsRequest) { IRequest <ListMetricsRequest> request = new ListMetricsRequestMarshaller().Marshall(listMetricsRequest); ListMetricsResponse response = Invoke <ListMetricsRequest, ListMetricsResponse> (request, this.signer, ListMetricsResponseUnmarshaller.GetInstance()); return(response); }
/// <summary> /// Initiates the asynchronous execution of the ListMetrics operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListMetrics 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 <ListMetricsResponse> ListMetricsAsync(ListMetricsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListMetricsRequestMarshaller(); var unmarshaller = ListMetricsResponseUnmarshaller.Instance; return(InvokeAsync <ListMetricsRequest, ListMetricsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
IAsyncResult invokeListMetrics(ListMetricsRequest listMetricsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new ListMetricsRequestMarshaller().Marshall(listMetricsRequest); var unmarshaller = ListMetricsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the ListMetrics operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListMetrics 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> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics">REST API Reference for ListMetrics Operation</seealso> public virtual Task <ListMetricsResponse> ListMetricsAsync(ListMetricsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListMetricsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListMetricsResponseUnmarshaller.Instance; return(InvokeAsync <ListMetricsResponse>(request, options, cancellationToken)); }
internal virtual ListMetricsResponse ListMetrics(ListMetricsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListMetricsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListMetricsResponseUnmarshaller.Instance; return(Invoke <ListMetricsResponse>(request, options)); }
public async Task <List <Metric> > ListMetricsAsyncAsync(ListMetricsRequest request) { var httpRequest = new HttpRequestMessage(HttpMethod.Post, Endpoint) { Content = GetPostContent(request.ToParams()) }; var responseText = await SendAsync(httpRequest).ConfigureAwait(false); return(ListMetricsResponse.Parse(responseText)); }
private static IDictionary <string, string> ConvertListMetrics(ListMetricsRequest request) { IDictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["Action"] = "ListMetrics"; if (request.IsSetNextToken()) { dictionary["NextToken"] = request.NextToken; } return(dictionary); }
/** * Convert ListMetricsRequest to name value pairs */ private static IDictionary <string, string> ConvertListMetrics(ListMetricsRequest request) { IDictionary <string, string> parameters = new Dictionary <string, string>(); parameters["Action"] = "ListMetrics"; if (request.IsSetNextToken()) { parameters["NextToken"] = request.NextToken; } return(parameters); }
internal ListMetricsResponse ListMetrics(ListMetricsRequest request) { var task = ListMetricsAsync(request); try { return(task.Result); } catch (AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return(null); } }
/// <summary> /// Initiates the asynchronous execution of the ListMetrics operation. /// <seealso cref="Amazon.CloudWatch.AmazonCloudWatch.ListMetrics"/> /// </summary> /// /// <param name="listMetricsRequest">Container for the necessary parameters to execute the ListMetrics operation on AmazonCloudWatch.</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 EndListMetrics /// operation.</returns> public IAsyncResult BeginListMetrics(ListMetricsRequest listMetricsRequest, AsyncCallback callback, object state) { return(invokeListMetrics(listMetricsRequest, callback, state, false)); }
/// <summary> /// <para> Returns a list of valid metrics stored for the AWS account owner. Returned metrics can be used with GetMetricStatistics to obtain /// statistical data for a given metric. </para> <para><b>NOTE:</b> Up to 500 results are returned for any one call. To retrieve further /// results, use returned NextToken values with subsequent ListMetrics operations. </para> <para><b>NOTE:</b> If you create a metric with the /// PutMetricData action, allow up to fifteen minutes for the metric to appear in calls to the ListMetrics action. Statistics about the metric, /// however, are available sooner using GetMetricStatistics. </para> /// </summary> /// /// <param name="listMetricsRequest">Container for the necessary parameters to execute the ListMetrics service method on /// AmazonCloudWatch.</param> /// /// <returns>The response from the ListMetrics service method, as returned by AmazonCloudWatch.</returns> /// /// <exception cref="InternalServiceException"/> /// <exception cref="InvalidParameterValueException"/> public ListMetricsResponse ListMetrics(ListMetricsRequest listMetricsRequest) { IAsyncResult asyncResult = invokeListMetrics(listMetricsRequest, null, null, true); return(EndListMetrics(asyncResult)); }
/// <summary> /// List Metrics /// </summary> /// <param name="request">List Metrics request</param> /// <returns>List Metrics Response from the service</returns> public ListMetricsResponse ListMetrics(ListMetricsRequest request) { return(Invoke <ListMetricsResponse>(ConvertListMetrics(request))); }