/// <summary> /// Initiates the asynchronous execution of the DescribeServices operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.DescribeServices"/> /// </summary> /// /// <param name="describeServicesRequest">Container for the necessary parameters to execute the DescribeServices operation on /// AmazonAWSSupport.</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 EndDescribeServices /// operation.</returns> public IAsyncResult BeginDescribeServices(DescribeServicesRequest describeServicesRequest, AsyncCallback callback, object state) { return invokeDescribeServices(describeServicesRequest, callback, state, false); }
IAsyncResult invokeDescribeServices(DescribeServicesRequest describeServicesRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DescribeServicesRequestMarshaller().Marshall(describeServicesRequest); var unmarshaller = DescribeServicesResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DescribeServices operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeServices operation on AmazonAWSSupportClient.</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 EndDescribeServices /// operation.</returns> public IAsyncResult BeginDescribeServices(DescribeServicesRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeServicesRequestMarshaller(); var unmarshaller = DescribeServicesResponseUnmarshaller.Instance; return BeginInvoke<DescribeServicesRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para>Returns the current list of AWS services and a list of service categories that applies to each one. You then use service names and /// categories in your CreateCase requests. Each AWS service has its own set of categories.</para> <para>The service codes and category codes /// correspond to the values that are displayed in the <b>Service</b> and <b>Category</b> drop-down lists on the AWS Support Center <a /// href="https://aws.amazon.com/support/createCase" >Open a new case</a> page. The values in those fields, however, do not necessarily match /// the service codes and categories returned by the <c>DescribeServices</c> request. Always use the service codes and categories obtained /// programmatically. This practice ensures that you always have the most recent set of service and category codes.</para> /// </summary> /// /// <param name="describeServicesRequest">Container for the necessary parameters to execute the DescribeServices service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeServices service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="InternalServerErrorException"/> public DescribeServicesResponse DescribeServices(DescribeServicesRequest describeServicesRequest) { IAsyncResult asyncResult = invokeDescribeServices(describeServicesRequest, null, null, true); return EndDescribeServices(asyncResult); }
/// <summary> /// <para>Returns the current list of AWS services and a list of service categories that applies to each one. You then use service names and /// categories in your <a href="http://docs.aws.amazon.com/awssupport/latest/APIReference/API_CreateCase.html">CreateCase</a> requests. Each /// AWS service has its own set of categories.</para> <para>The service codes and category codes correspond to the values that are displayed in /// the <b>Service</b> and <b>Category</b> drop-down lists on the AWS Support Center <a href="https://aws.amazon.com/support/createCase">Open a /// new case</a> page. The values in those fields, however, do not necessarily match the service codes and categories returned by the /// <c>DescribeServices</c> request. Always use the service codes and categories obtained programmatically. This practice ensures that you /// always have the most recent set of service and category codes.</para> /// </summary> /// /// <param name="describeServicesRequest">Container for the necessary parameters to execute the DescribeServices service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeServices service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<DescribeServicesResponse> DescribeServicesAsync(DescribeServicesRequest describeServicesRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeServicesRequestMarshaller(); var unmarshaller = DescribeServicesResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DescribeServicesRequest, DescribeServicesResponse>(describeServicesRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// Returns the current list of AWS services and a list of service categories that applies /// to each one. You then use service names and categories in your <a>CreateCase</a> requests. /// Each AWS service has its own set of categories. /// /// /// <para> /// The service codes and category codes correspond to the values that are displayed in /// the <b>Service</b> and <b>Category</b> drop-down lists on the AWS Support Center <a /// href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page. /// The values in those fields, however, do not necessarily match the service codes and /// categories returned by the <code>DescribeServices</code> request. Always use the service /// codes and categories obtained programmatically. This practice ensures that you always /// have the most recent set of service and category codes. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeServices service method.</param> /// /// <returns>The response from the DescribeServices service method, as returned by AWSSupport.</returns> /// <exception cref="Amazon.AWSSupport.Model.InternalServerErrorException"> /// An internal server error occurred. /// </exception> public DescribeServicesResponse DescribeServices(DescribeServicesRequest request) { var marshaller = new DescribeServicesRequestMarshaller(); var unmarshaller = DescribeServicesResponseUnmarshaller.Instance; return Invoke<DescribeServicesRequest,DescribeServicesResponse>(request, marshaller, unmarshaller); }
internal DescribeServicesResponse DescribeServices(DescribeServicesRequest request) { var task = DescribeServicesAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the DescribeServices operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeServices 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<DescribeServicesResponse> DescribeServicesAsync(DescribeServicesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeServicesRequestMarshaller(); var unmarshaller = DescribeServicesResponseUnmarshaller.Instance; return InvokeAsync<DescribeServicesRequest,DescribeServicesResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DescribeServices operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.DescribeServices"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeServices 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<DescribeServicesResponse> DescribeServicesAsync(DescribeServicesRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeServicesRequestMarshaller(); var unmarshaller = DescribeServicesResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DescribeServicesRequest, DescribeServicesResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Returns the current list of AWS services and a list of service categories that applies to each one. You then use service names and /// categories in your CreateCase requests. Each AWS service has its own set of categories.</para> <para>The service codes and category codes /// correspond to the values that are displayed in the <b>Service</b> and <b>Category</b> drop-down lists on the AWS Support Center <a href="https://aws.amazon.com/support/createCase">Open a new case</a> page. The values in those fields, however, do not necessarily match /// the service codes and categories returned by the <c>DescribeServices</c> request. Always use the service codes and categories obtained /// programmatically. This practice ensures that you always have the most recent set of service and category codes.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeServices service method on /// AmazonAWSSupport.</param> /// /// <returns>The response from the DescribeServices service method, as returned by AmazonAWSSupport.</returns> /// /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException" /> public DescribeServicesResponse DescribeServices(DescribeServicesRequest request) { var task = DescribeServicesAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeDescribeServices(DescribeServicesRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DescribeServicesRequestMarshaller(); var unmarshaller = DescribeServicesResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }