internal virtual DescribeReportDefinitionsResponse DescribeReportDefinitions(DescribeReportDefinitionsRequest request) { var marshaller = DescribeReportDefinitionsRequestMarshaller.Instance; var unmarshaller = DescribeReportDefinitionsResponseUnmarshaller.Instance; return(Invoke <DescribeReportDefinitionsRequest, DescribeReportDefinitionsResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Describe a list of report definitions owned by the account /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeReportDefinitions service method.</param> /// /// <returns>The response from the DescribeReportDefinitions service method, as returned by CostAndUsageReport.</returns> /// <exception cref="Amazon.CostAndUsageReport.Model.InternalErrorException"> /// This exception is thrown on a known dependency failure. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions">REST API Reference for DescribeReportDefinitions Operation</seealso> public DescribeReportDefinitionsResponse DescribeReportDefinitions(DescribeReportDefinitionsRequest request) { var marshaller = new DescribeReportDefinitionsRequestMarshaller(); var unmarshaller = DescribeReportDefinitionsResponseUnmarshaller.Instance; return(Invoke <DescribeReportDefinitionsRequest, DescribeReportDefinitionsResponse>(request, marshaller, unmarshaller)); }
public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonCostAndUsageReportConfig config = new AmazonCostAndUsageReportConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonCostAndUsageReportClient client = new AmazonCostAndUsageReportClient(creds, config); DescribeReportDefinitionsResponse resp = new DescribeReportDefinitionsResponse(); do { DescribeReportDefinitionsRequest req = new DescribeReportDefinitionsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.DescribeReportDefinitions(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.ReportDefinitions) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Initiates the asynchronous execution of the DescribeReportDefinitions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeReportDefinitions operation on AmazonCostAndUsageReportClient.</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 EndDescribeReportDefinitions /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions">REST API Reference for DescribeReportDefinitions Operation</seealso> public virtual IAsyncResult BeginDescribeReportDefinitions(DescribeReportDefinitionsRequest request, AsyncCallback callback, object state) { var marshaller = DescribeReportDefinitionsRequestMarshaller.Instance; var unmarshaller = DescribeReportDefinitionsResponseUnmarshaller.Instance; return(BeginInvoke <DescribeReportDefinitionsRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Lists the AWS Cost and Usage reports available to this account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeReportDefinitions service method.</param> /// /// <returns>The response from the DescribeReportDefinitions service method, as returned by CostAndUsageReport.</returns> /// <exception cref="Amazon.CostAndUsageReport.Model.InternalErrorException"> /// An error on the server occurred during the processing of your request. Try again later. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions">REST API Reference for DescribeReportDefinitions Operation</seealso> public virtual DescribeReportDefinitionsResponse DescribeReportDefinitions(DescribeReportDefinitionsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeReportDefinitionsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeReportDefinitionsResponseUnmarshaller.Instance; return Invoke<DescribeReportDefinitionsResponse>(request, options); }
/// <summary> /// Initiates the asynchronous execution of the DescribeReportDefinitions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeReportDefinitions operation on AmazonCostAndUsageReportClient.</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 EndDescribeReportDefinitions /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions">REST API Reference for DescribeReportDefinitions Operation</seealso> public virtual IAsyncResult BeginDescribeReportDefinitions(DescribeReportDefinitionsRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeReportDefinitionsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeReportDefinitionsResponseUnmarshaller.Instance; return(BeginInvoke(request, options, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the DescribeReportDefinitions operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeReportDefinitions 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/cur-2017-01-06/DescribeReportDefinitions">REST API Reference for DescribeReportDefinitions Operation</seealso> public Task <DescribeReportDefinitionsResponse> DescribeReportDefinitionsAsync(DescribeReportDefinitionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeReportDefinitionsRequestMarshaller(); var unmarshaller = DescribeReportDefinitionsResponseUnmarshaller.Instance; return(InvokeAsync <DescribeReportDefinitionsRequest, DescribeReportDefinitionsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Lists the AWS Cost and Usage reports available to this account. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeReportDefinitions service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the DescribeReportDefinitions service method, as returned by CostAndUsageReport.</returns> /// <exception cref="Amazon.CostAndUsageReport.Model.InternalErrorException"> /// An error on the server occurred during the processing of your request. Try again later. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions">REST API Reference for DescribeReportDefinitions Operation</seealso> public virtual Task <DescribeReportDefinitionsResponse> DescribeReportDefinitionsAsync(DescribeReportDefinitionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeReportDefinitionsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeReportDefinitionsResponseUnmarshaller.Instance; return(InvokeAsync <DescribeReportDefinitionsResponse>(request, options, cancellationToken)); }
/// <summary> /// Lists the AWS Cost and Usage reports available to this account. /// DescribeReportDefinitions /#X-Amz-Target=AWSOrigamiServiceGatewayService.DescribeReportDefinitions /// </summary> /// <param name="MaxResults">Pagination limit</param> /// <param name="NextToken">Pagination token</param> /// <returns>Success</returns> public async Task <DescribeReportDefinitionsResponse> DescribeReportDefinitionsAsync(string MaxResults, string NextToken, DescribeReportDefinitionsRequest requestBody, Action <System.Net.Http.Headers.HttpRequestHeaders> handleHeaders = null) { var requestUri = "/#X-Amz-Target=AWSOrigamiServiceGatewayService.DescribeReportDefinitions?MaxResults=" + (MaxResults == null? "" : Uri.EscapeDataString(MaxResults)) + "&NextToken=" + (NextToken == null? "" : Uri.EscapeDataString(NextToken)); using (var request = new HttpRequestMessage(HttpMethod.Post, requestUri)) { using (var requestWriter = new System.IO.StringWriter()) { var requestSerializer = JsonSerializer.Create(jsonSerializerSettings); requestSerializer.Serialize(requestWriter, requestBody); var content = new StringContent(requestWriter.ToString(), System.Text.Encoding.UTF8, "application/json"); request.Content = content; if (handleHeaders != null) { handleHeaders(request.Headers); } var responseMessage = await client.SendAsync(request); try { responseMessage.EnsureSuccessStatusCodeEx(); var stream = await responseMessage.Content.ReadAsStreamAsync(); using (JsonReader jsonReader = new JsonTextReader(new System.IO.StreamReader(stream))) { var serializer = new JsonSerializer(); return(serializer.Deserialize <DescribeReportDefinitionsResponse>(jsonReader)); } } finally { responseMessage.Dispose(); } } } }